-
Notifications
You must be signed in to change notification settings - Fork 0
/
trisPage.xaml
81 lines (81 loc) · 5.14 KB
/
trisPage.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
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:tris" x:Class="tris.trisPage">
<ContentPage.BindingContext>
<local:trisPageViewModel />
</ContentPage.BindingContext>
<Grid RowSpacing="0" Padding="2,20,2,2" BackgroundColor="White">
<!--Score Display -->
<Grid.RowDefinitions>
<RowDefinition Height="0.25*" />
<RowDefinition Height="0.60*" />
<RowDefinition Height="0.1*" />
</Grid.RowDefinitions>
<Grid BackgroundColor="Black" Grid.Row="0" Padding="5">
<Grid.RowDefinitions>
<RowDefinition Height="4*" />
<RowDefinition Height="4*"/>
<RowDefinition Height="3*" /><RowDefinition Height="2*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
</Grid.ColumnDefinitions>
<!--Elements of first line on Display -->
<Label Text="Player X" Grid.Row="0" Grid.Column="0" Style="{StaticResource LblDisplay}" />
<Label Text="" Grid.Row="0" Grid.Column="1" Style="{StaticResource LblDisplay}"/>
<Label Text="Player O" Grid.Row="0" Grid.Column="2" Style="{StaticResource LblDisplay}"/>
<!--Elements of second line on Display -->
<Label x:Name="lblPlayerX" Text="{Binding DisplayNamePlayerX}" Grid.Row="1" Grid.Column="0" Style="{StaticResource LblDisplay}"/>
<Label Text="Pareggio" Grid.Row="1" Grid.Column="1" Style="{StaticResource LblDisplay}"/>
<Label x:Name="lblPlayerO" Text="{Binding DisplayNamePlayerO}" Grid.Row="1" Grid.Column="2" Style="{StaticResource LblDisplay}"/>
<!--Elements of thirth line on Display -->
<Label x:Name="lblScoreX" Text="--" Grid.Row="2" Grid.Column="0" Style="{StaticResource LblDisplay}"/>
<Label x:Name="lblScoreTie" Text="--" Grid.Row="2" Grid.Column="1" Style="{StaticResource LblDisplay}"/>
<Label x:Name="lblScoreO" Text="--" Grid.Row="2" Grid.Column="2" Style="{StaticResource LblDisplay}"/>
</Grid>
<Grid BackgroundColor = "White" Grid.Row="1" Padding="0,5,0,0">
<Grid BackgroundColor="#EFB97D" RowSpacing="10" ColumnSpacing="10">
<Grid.RowDefinitions>
<RowDefinition Height="0.33*"/>
<RowDefinition Height="0.33*" />
<RowDefinition Height="0.34*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.33*" />
<ColumnDefinition Width="0.33*" />
<ColumnDefinition Width="0.34*" />
</Grid.ColumnDefinitions>
<!--Elements of first line Grid of Tris-->
<!--<Button x:Name="btn0" Text="" ClassId="0" Command="{Binding ClickOkCommand}" CommandParameter="0" Grid.Row="0" Grid.Column="0" Style="{StaticResource btnGrid}" />-->
<Button x:Name="btn0" Text="" ClassId="0" Clicked="BtnClick" Grid.Row="0" Grid.Column="0" Style="{StaticResource btnGrid}" />
<Button x:Name="btn1" Text="" ClassId="1" Clicked="BtnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource btnGrid}" />
<Button x:Name="btn2" Text="" ClassId="2" Clicked="BtnClick" Grid.Row="0" Grid.Column="2" Style="{StaticResource btnGrid}" />
<!--Elements of second line Grid of Tris-->
<Button x:Name="btn3" Text="" ClassId="3" Clicked="BtnClick" Grid.Row="1" Grid.Column="0" Style="{StaticResource btnGrid}" />
<Button x:Name="btn4" Text="" ClassId="4" Clicked="BtnClick" Grid.Row="1" Grid.Column="1" Style="{StaticResource btnGrid}" />
<Button x:Name="btn5" Text="" ClassId="5" Clicked="BtnClick" Grid.Row="1" Grid.Column="2" Style="{StaticResource btnGrid}" />
<!--Elements of thirth line Grid of Tris-->
<Button x:Name="btn6" Text="" ClassId="6" Clicked="BtnClick" Grid.Row="2" Grid.Column="0" Style="{StaticResource btnGrid}" />
<Button x:Name="btn7" Text="" ClassId="7" Clicked="BtnClick" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnGrid}" />
<Button x:Name="btn8" Text="" ClassId="8" Clicked="BtnClick" Grid.Row="2" Grid.Column="2" Style="{StaticResource btnGrid}" />
</Grid>
</Grid>
<Grid BackgroundColor="White" Grid.Row="2" Padding="0, 5, 0, 2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="6*" />
</Grid.ColumnDefinitions>
<!--Elements of button content of Tris-->
<Entry x:Name="entryPlayerX" Text="{Binding Name, Mode=TwoWay}" Placeholder="io mi chiamo X..." Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource entryPlayer}"/>
<Button x:Name="btnPlayerX" Text="Fatto" Grid.Row="0" Grid.Column="2" Style="{StaticResource btnOk}" Clicked="BtnClickOk"/>
<Entry x:Name="entryPlayerO" Text="{Binding NameO, Mode=TwoWay}" Placeholder="io sono O..." Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" IsVisible="false" Style="{StaticResource entryPlayer}"/>
<Button x:Name="btnPlayerO" Text="Fatto" Grid.Row="0" Grid.Column="2" IsVisible="false" Style="{StaticResource btnOk}" Clicked="BtnClickOkO" />
<Button x:Name="btnNewGame" Text="Ricomincia" Grid.Row="0" Grid.Column="2" IsVisible="false" Style="{StaticResource btnOk}" Clicked="BtnRestart" TranslationX="-95"/>
</Grid>
</Grid>
</ContentPage>