xaml of main window
This commit is contained in:
149
Main/MainWindow.xaml
Normal file
149
Main/MainWindow.xaml
Normal file
@@ -0,0 +1,149 @@
|
||||
<Window x:Class="Main.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:local="clr-namespace:Main"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TabControl Grid.Column="0" Margin="0,0,10,0">
|
||||
<TabItem Header="Добавление фигур">
|
||||
<TabControl Margin="8">
|
||||
<TabItem Header="Прямоугольник">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="RectName" />
|
||||
<TextBlock Text="X" /> <TextBox x:Name="RectX" />
|
||||
<TextBlock Text="Y" /> <TextBox x:Name="RectY" />
|
||||
<TextBlock Text="W" /> <TextBox x:Name="RectW" />
|
||||
<TextBlock Text="H" /> <TextBox x:Name="RectH" />
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddRectangle" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Квадрат">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="SquareName" />
|
||||
<TextBlock Text="X" /> <TextBox x:Name="SquareX" />
|
||||
<TextBlock Text="Y" /> <TextBox x:Name="SquareY" />
|
||||
<TextBlock Text="Side" /> <TextBox x:Name="SquareSide" />
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddSquare" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Эллипс">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="EllipseName" />
|
||||
<TextBlock Text="X" /> <TextBox x:Name="EllipseX" />
|
||||
<TextBlock Text="Y" /> <TextBox x:Name="EllipseY" />
|
||||
<TextBlock Text="W" /> <TextBox x:Name="EllipseW" />
|
||||
<TextBlock Text="H" /> <TextBox x:Name="EllipseH" />
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddEllipse" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Окружность">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="CircleName" />
|
||||
<TextBlock Text="X" /> <TextBox x:Name="CircleX" />
|
||||
<TextBlock Text="Y" /> <TextBox x:Name="CircleY" />
|
||||
<TextBlock Text="Диаметр" /> <TextBox x:Name="CircleD" />
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddCircle" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Многоугольник">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="PolyName" />
|
||||
<TextBlock Text="Кол-во вершин" /> <TextBox x:Name="PolyCount" />
|
||||
|
||||
<Button
|
||||
x:Name = "PolyStartBtn"
|
||||
Content = "Начать ввод точек"
|
||||
Margin = "0,10,0,0"
|
||||
Click = "ClickPolyStart"
|
||||
/>
|
||||
|
||||
<Separator Margin="0,5,0,5" />
|
||||
|
||||
<TextBlock Text="X точки" /> <TextBox x:Name="PolyX" IsEnabled="False" />
|
||||
<TextBlock Text="Y точки" /> <TextBox x:Name="PolyY" IsEnabled="False" />
|
||||
|
||||
<Button
|
||||
x:Name = "PolyAddPointBtn"
|
||||
Content = "Добавить точку"
|
||||
Margin = "0,10,0,0"
|
||||
IsEnabled = "False"
|
||||
Click = "ClickPolyAddPoint"
|
||||
/>
|
||||
|
||||
<TextBlock x:Name="PolyStatus" Margin="0,10,0,0" />
|
||||
|
||||
<Button
|
||||
x:Name = "PolyFinishBtn"
|
||||
Content = "Добавить многоугольник"
|
||||
Margin = "0,10,0,0"
|
||||
IsEnabled = "False"
|
||||
Click = "ClickPolyFinish"
|
||||
/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Треугольник">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="TriName" />
|
||||
<TextBlock Text="Ax" /> <TextBox x:Name="Ax" />
|
||||
<TextBlock Text="Ay" /> <TextBox x:Name="Ay" />
|
||||
<TextBlock Text="Bx" /> <TextBox x:Name="Bx" />
|
||||
<TextBlock Text="By" /> <TextBox x:Name="By" />
|
||||
<TextBlock Text="Cx" /> <TextBox x:Name="Cx" />
|
||||
<TextBlock Text="Cy" /> <TextBox x:Name="Cy" />
|
||||
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddTriangle" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Поле. Солнце. Человек. Текст">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Имя" /> <TextBox x:Name="SceneName" />
|
||||
<TextBlock Text="X" /> <TextBox x:Name="SceneX" />
|
||||
<TextBlock Text="Y" /> <TextBox x:Name="SceneY" />
|
||||
<TextBlock Text="W" /> <TextBox x:Name="SceneW" />
|
||||
<TextBlock Text="H" /> <TextBox x:Name="SceneH" />
|
||||
|
||||
<Button Content="Добавить" Margin="0,10,0,0" Click="ClickAddTerrainPointSunPointHumanPointText"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</TabItem>
|
||||
<TabItem Header="Управление фигурами">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Text="Выбор фигуры" />
|
||||
|
||||
<ComboBox x:Name="FigureCombo" Height="28" />
|
||||
|
||||
<Separator Margin="0,10,0,10" />
|
||||
|
||||
<TextBlock Text="Смещение dX" /> <TextBox x:Name="MoveDx" />
|
||||
<TextBlock Text="Смещение dY" /> <TextBox x:Name="MoveDy" />
|
||||
|
||||
<Button Content="Переместить" Margin="0,10,0,0" Click="ClickMoveSelected" />
|
||||
<Button Content="Удалить" Margin="0,10,0,0" Click="ClickDeleteSelected" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Border Grid.Column="1" BorderBrush="Gray" BorderThickness="1" x:Name="ImgBorder" Margin="8">
|
||||
<Image
|
||||
x:Name="DrawingImage"
|
||||
Stretch="Uniform"
|
||||
MouseLeftButtonDown="MouseLeftButtonDown"
|
||||
MouseMove="MouseMove"
|
||||
MouseLeftButtonUp="MouseLeftButtonUp"
|
||||
/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user