-
Notifications
You must be signed in to change notification settings - Fork 0
/
GraphWindow.xaml
82 lines (77 loc) · 5.02 KB
/
GraphWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<Window x:Class="AsusFanControl.GraphWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
xmlns:local="clr-namespace:AsusFanControl"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="График" Height="500" Width="834" MinHeight="720" MinWidth="1280" WindowStartupLocation="CenterScreen">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" >
<lvc:CartesianChart Series="{Binding Series}"
MouseMove="CartesianChart_MouseMove"
MouseUp="CartesianChart_MouseUp"
XAxes="{Binding XAxis}"
YAxes="{Binding YAxis}"
Title="{Binding Title}" >
</lvc:CartesianChart>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.2*"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="НАСТРОЙКИ" FontSize="22" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Grid Grid.Row="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="0.1*"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<ComboBox Style="{DynamicResource MaterialDesignFloatingHintComboBox}" HorizontalContentAlignment="Stretch"
ItemsSource="{Binding Graphs}" SelectedItem="{Binding SelectedGraph}" Grid.ColumnSpan="3" materialDesign:HintAssist.Hint="Графики" >
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button Grid.Column="2" Grid.Row="1" Content="Сохранить" Command="{Binding SaveCommand}"></Button>
<Button Grid.Column="0" Grid.Row="2" Content="Отменить" Style="{StaticResource MaterialDesignRaisedDarkButton}"
Command="{Binding UndoCommand}" ></Button>
<Button Grid.Column="2" Grid.Row="2" Content="Удалить" Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
Command="{Binding RemoveCommand}" ></Button>
<materialDesign:DialogHost Grid.Column="0" Grid.Row="1" CloseOnClickAway="True" IsOpen="{Binding IsOpenDialog}" >
<Button Content="Создать новый" Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" ></Button>
<materialDesign:DialogHost.DialogContent>
<StackPanel Margin="16">
<TextBlock Text="Создание графика" />
<TextBox Text="{Binding NameGraph}" materialDesign:HintAssist.Hint="Название графика" Margin="0,8,0,0" HorizontalAlignment="Stretch" />
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="0,8,8,0" Command="{Binding CreateCommand}"
Content="СОЗДАТЬ" IsCancel="True" Style="{StaticResource MaterialDesignFlatButton}"></Button>
<Button Margin="0,8,8,0" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
Content="ОТМЕНА" IsCancel="True" Style="{StaticResource MaterialDesignFlatButton}"></Button>
</StackPanel>
</StackPanel>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
</Grid>
<Button Grid.Row="3" Content="Закрыть окно" Style="{StaticResource MaterialDesignRaisedSecondaryButton}"
VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="Close_Click" Margin="0,0,10,10" />
</Grid>
</Grid>
</Window>