-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
96 lines (95 loc) · 6.38 KB
/
MainWindow.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<controls:MetroWindow x:Class="Graphs.MainWindow"
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:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Graphs"
mc:Ignorable="d"
xmlns:graphx="http://schemas.panthernet.ru/graphx/"
xmlns:model="clr-namespace:Graphs.Model"
Title="Рисовалка графов" Height="800" Width="1200" WindowState="Maximized"
TitleAlignment="Center" GlowBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
<controls:MetroWindow.RightWindowCommands>
<controls:WindowCommands>
<Button x:Name="BAbout" Content="О программе" Click="BAbout_Click"/>
<Button x:Name="BHelp" Content="Помощь" Click="BHelp_Click"/>
</controls:WindowCommands>
</controls:MetroWindow.RightWindowCommands>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="125"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="400"/>
</Grid.ColumnDefinitions>
<Button x:Name="BUndo" Grid.Column="0" Content="Назад" Margin="10,10,2,10" Click="BUndo_Click"/>
<Button x:Name="BRedo" Grid.Column="1" Content="Вперед" Margin="2,10,10,10" Click="BRedo_Click"/>
<ToggleButton x:Name="BChangeMode" Grid.Column="2" Content="Перемещение" Margin="10,10" FontSize="14" Checked="BChangeMode_Checked" Unchecked="BChangeMode_Unchecked" ToolTip="Переместить вершины и ребра с ними"/>
<Button x:Name="BBuildByCliqueMatrix" Grid.Column="3" Content="Матрица кликов" Margin="10,10" FontSize="14" Click="BBuildByCliqueMatrix_Click"/>
</Grid>
<Grid Grid.Row="1">
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Templates/GraphXTemplates.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="400"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Выберите вариант" Margin="10"
FontStretch="Expanded" FontWeight="SemiBold" FontSize="16"
HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
<RadioButton x:Name="RbGraphFromFile" Tag="0" Grid.Row="1" Content="Загрузить из файла" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
<RadioButton x:Name="RbExampleGraph" Tag="1" Grid.Row="2" Content="Пример" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
<RadioButton x:Name="RbTetrahedronGraph" Tag="2" Grid.Row="3" Content="Тетраэдр" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
<RadioButton x:Name="RbOctahedronGraph" Tag="3" Grid.Row="4" Content="Октаэдр" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
<RadioButton x:Name="RbWheelGraaph" Tag="4" Grid.Row="5" Content="Колесо" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
<RadioButton x:Name="RbPetersenGraph" Tag="5" Grid.Row="6" Content="Питерсена" Margin="30,10" FontSize="14" Checked="RBSelectGraph_Checked"/>
</Grid>
<graphx:ZoomControl x:Name="ZoomCtrl" Grid.Column="1" Margin="10" BorderBrush="LightGray" BorderThickness="1" Background="Transparent" VerticalContentAlignment="Center" VerticalAlignment="Center">
<model:GraphZone x:Name="GraphArea" VertexSelected="GraphArea_VertexSelected"/>
</graphx:ZoomControl>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="80"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Удаление клик в графе" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button x:Name="BDeleteCliques" Grid.Column="0" Content="Последовательное" Margin="10,10" FontSize="14" Click="BDeleteCliques_Click" ToolTip="Найти все клики и удалить первую"/>
<Button x:Name="BDeleteParallelCliques" Grid.Column="1" Content="Параллельное" Margin="10,10" FontSize="14" Click="BDeleteParallelCliques_Click" ToolTip="Сгруппировать несвязанные клики и удалить"/>
</Grid>
<ScrollViewer Grid.Row="2" Margin="10" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" CanContentScroll="True">
<StackPanel x:Name="SpDeletedClicks" Margin="5">
</StackPanel>
</ScrollViewer>
</Grid>
</Grid>
</Grid>
</controls:MetroWindow>