This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
101 lines (83 loc) · 5.57 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
<Window x:Class="WPF_Game_Checkers.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:WPF_Game_Checkers"
mc:Ignorable="d"
Title="Dáma"
Height="450"
Width="800"
MinWidth="800"
MinHeight="450"
WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style x:Key="playerStyle" TargetType="Ellipse">
<EventSetter Event="MouseMove" Handler="Ellipse_MouseMove"/>
</Style>
</Window.Resources>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="canvasBorder" BorderBrush="Black" BorderThickness="2">
<Grid x:Name="gameGrid" x:FieldModifier="public" AllowDrop="True" Drop="gameGrid_Drop"></Grid>
</Border>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Header="Nová Hra" Grid.Row="0">
<DockPanel>
<Grid DockPanel.Dock="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Content="Šířka herního pole:" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,0"/>
<TextBox x:Name="textBoxWidth" VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Margin="20,0" Text="8"/>
<Label Content="Výška herního pole:" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,0"/>
<TextBox x:Name="textBoxHeight" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" Margin="20,0" Text="8"/>
<Label Content="Počet řad hráčů:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,0"/>
<TextBox x:Name="textBoxNumStoneRows" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" Margin="20,0" Text="2"/>
<Label Content="Povolit volný pohyb:" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,0"/>
<CheckBox x:Name="freeMovementCheckBox" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="False"/>
</Grid>
<Button x:Name="ButtonNewGame" DockPanel.Dock="Bottom" Content="Nová hra" Height="30" Margin="50,0,50,0" Click="ButtonNewGame_Click"/>
</DockPanel>
</GroupBox>
<GroupBox Header="Aktuální Hra" Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Content="Počet pokusných pohybů:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Label x:Name="numOfTriedMoves" Content="0" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<Label Content="Počet vykonaných pohybů:" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Label x:Name="numOfValidMoves" Content="0" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<Label Content="Který hráč je na tahu?:" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label x:Name="player1Label" Content="Hráč s bílými figurkami" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label x:Name="player2Label" Content="Hráč s černými figurkami" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Button x:Name="debugButton" Content="Show players list (DEBUG)" Height="30" Grid.Row="3" VerticalAlignment="Center" Margin="15,0,15,0" Click="debugButton_Click"/>
<!--<Button x:Name="gameInfoButton" Content="Info a nastavení" Height="30" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Margin="15,0,15,0" Click="gameInfoButton_Click"/>-->
</Grid>
</GroupBox>
</Grid>
</Grid>
</Window>