-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
137 lines (136 loc) · 6.31 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VectorEditor"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pcl="clr-namespace:PhoenixControlLib;assembly=PhoenixControlLib"
xmlns:local="clr-namespace:WpfApplication2"
xmlns:layers="clr-namespace:WpfApplication2.Layers"
MinHeight="555"
MinWidth="300"
Height="555"
Width="800"
mc:Ignorable="d"
d:DesignHeight="555"
d:DesignWidth="792">
<Window.Resources>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Background"
Value="White" />
</Style>
<Style TargetType="{x:Type pcl:RadioToggleButton}">
<Setter Property="Width"
Value="40" />
<Setter Property="Padding"
Value="0" />
<Setter Property="Margin"
Value="3" />
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Height"
Value="40" />
</Style>
</Window.Resources>
<DockPanel LastChildFill="true">
<Menu DockPanel.Dock="Top">
<MenuItem Header="Файл">
<MenuItem Header="Создать" Click="New_click">
</MenuItem>
<MenuItem Header="Открыть" Click="open_click"></MenuItem>
<MenuItem Header="Сохранить" Name="save_btn" Click="save_click"></MenuItem>
<MenuItem Header="Сохранить Как" Name="save_as_btn" Click="save_as_click" ></MenuItem>
<MenuItem Header="Очистить поле" Click="clear_click"></MenuItem>
<MenuItem Header="Выход" Click="exit_click"></MenuItem>
</MenuItem>
<MenuItem Header="Редактировать">
<MenuItem Header="Отмена" Click="undo_click"></MenuItem>
<MenuItem Header="Возврат" Click="redo_click"></MenuItem>
</MenuItem>
<MenuItem Header="Помощь">
<MenuItem Header="О программе" Click="About_click"/>
<MenuItem Header="Посмотреть помощь" Click="Help_click"/>
</MenuItem>
</Menu>
<StatusBar DockPanel.Dock="Bottom" Name="coords"
Height="21" Margin="0" Padding="0">
<Label FontFamily="Times New Roman" FontSize="13" Margin="0" Padding="0"> x : y</Label>
</StatusBar>
<StackPanel DockPanel.Dock="Top"
Width="778"
Orientation="Horizontal"
Background="#ABCECECE"
MinHeight="40"
MinWidth="778" Height="40">
<pcl:RadioToggleButton Name="New" Height="30" Width="30" Click="New_click">
<Image Source="Icons/newfile.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Name="Open" Height="30" Width="30" Click="open_click">
<Image Source="Icons/open2.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Name="Save" Height="30" Width="30" Click="save_click">
<Image Source="Icons/save.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Name="SaveAs" Height="30" Width="30" Click="save_as_click">
<Image Source="Icons/saveas.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Name="Undo" Height="30" Width="30" Click="undo_click">
<Image Source="Icons/undo.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Name="Redo" Height="30" Width="30" Click="redo_click">
<Image Source="Icons/redo.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<Separator Height="1" Name="separator1" Width="17" />
<pcl:RadioToggleButton Name="hand_btn" Click="hand_click" Height="30" Width="30">
<Image Source="Icons/hand.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="point_click" Height="30" Width="30">
<Image Source="Icons/1.png" Width="23" Height="22" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="line_click" Height="30" Width="30">
<Image Source="Icons/2.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="square_click" Height="30" Width="30">
<Image Source="Icons/3.png" Margin="-2,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="rect_click" Height="30" Width="30">
<Image Source="Icons/4.png" Margin="-2,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="triangle_click" Height="30" Width="30">
<Image Source="Icons/triangle.png" Margin="-2,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="ellipse_click" Height="30" Width="30">
<Image Source="Icons/5.png" Height="22" Width="22" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="erase_click" Height="30" Width="30">
<Image Source="Icons/eraser.png" Margin="-4,0,0,0"></Image>
</pcl:RadioToggleButton>
<pcl:RadioToggleButton Click="fill_click" Height="30" Width="30" >
<Image Source="Icons/6.png" Margin="-5,0,0,0"></Image>
</pcl:RadioToggleButton>
<ComboBox SelectedIndex="1" Name="setFigSize" FontSize="10" SelectionChanged="setFigSize_SelectionChanged" Width="45" Height="22">
<ComboBoxItem>Small</ComboBoxItem>
<ComboBoxItem>Medium</ComboBoxItem>
<ComboBoxItem>Large</ComboBoxItem>
</ComboBox>
<xctk:ColorPicker Height="32"
Width="38"
Name="colorPick"
ShowRecentColors="True"
SelectiveScrollingGrid.SelectiveScrollingOrientation="Horizontal"
ShowAvailableColors="False"
Margin="5,5,0,5"
HorizontalAlignment="Center"
SelectedColorChanged="colorPick_SelectedColorChanged">
</xctk:ColorPicker>
</StackPanel>
<layers:CanvasLayer x:Name="drawingSurface"
Background="White"
ClipToBounds="true"
MouseLeftButtonDown="drawingSurface_MouseLeftButtonDown"
MouseLeftButtonUp="drawingSurface_MouseLeftButtonUp"
MouseMove="mouse_move">
</layers:CanvasLayer>
</DockPanel>
</Window>