-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
116 lines (104 loc) · 8.11 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
<!--
Project: SpeechTurtle (http://SpeechTurtle.codeplex.com)
Filename: MainWindows.xaml
Version: 20150911
-->
<Window x:Class="SpeechTurtle.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SpeechTurtle"
Icon="Images/Logo.ico"
Width="640" Height="600"
Closing="Window_Closing"
KeyDown="Window_KeyDown"
>
<Window.Resources>
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e"/>
<SolidColorBrush x:Key="LightGreyBrush" Color="#ffd2d2d2"/>
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f"/>
<Style TargetType="{x:Type Image}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
</Window.Resources>
<Grid Margin="10 0 10 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Viewbox Grid.Row="1" Stretch="Uniform">
<Canvas x:Name="playArea" Width="600" Height="400">
<Canvas
x:Name="turtle"
Width="99.057" Height="128.859"
>
<Canvas.RenderTransform>
<TransformGroup>
<TranslateTransform X="-49.5285" Y="-64.4295"/>
<RotateTransform Angle="0" x:Name="turtleRotation"/>
<ScaleTransform x:Name="turtleScale" ScaleX="1" ScaleY="1" />
<TranslateTransform x:Name="turtleTranslation" X="300" Y="200"/>
</TransformGroup>
</Canvas.RenderTransform>
<Path x:Name="turtleHead"
Stroke="{StaticResource KinectPurpleBrush}" StrokeThickness="2"
Fill="Black" Data="F1 M 61.715,29.865 C 64.850,26.697 66.789,22.343 66.789,17.534 C 66.789,7.850 58.939,0.000 49.256,0.000 C 39.572,0.000 31.722,7.850 31.722,17.534 C 31.722,22.357 33.671,26.723 36.822,29.893 C 40.737,28.375 44.935,27.538 49.305,27.538 C 53.648,27.538 57.820,28.365 61.715,29.865 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 45.151,113.209 C 51.105,121.359 44.672,128.859 44.672,128.859 C 52.939,125.963 54.227,115.555 54.418,113.072 C 52.744,113.324 51.039,113.466 49.305,113.466 C 47.900,113.466 46.516,113.375 45.151,113.209 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 10.551,39.545 C 4.724,39.545 0.000,44.269 0.000,50.096 C 0.000,55.923 4.724,60.646 10.551,60.646 C 11.063,60.646 11.562,60.597 12.054,60.527 C 13.354,54.418 15.818,48.816 19.172,44.026 C 17.262,41.318 14.116,39.545 10.551,39.545 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 16.551,92.758 C 11.078,93.147 6.756,97.698 6.756,103.269 C 6.756,109.097 11.479,113.820 17.307,113.820 C 22.251,113.820 26.389,110.414 27.532,105.823 C 23.108,102.381 19.354,97.930 16.551,92.758 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 99.057,50.096 C 99.057,44.269 94.332,39.545 88.506,39.545 C 84.800,39.545 81.547,41.459 79.664,44.347 C 82.891,49.047 85.268,54.512 86.543,60.457 C 87.180,60.577 87.834,60.646 88.506,60.646 C 94.332,60.646 99.057,55.923 99.057,50.096 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 71.447,105.528 C 72.482,110.269 76.699,113.820 81.750,113.820 C 87.578,113.820 92.301,109.097 92.301,103.269 C 92.301,97.551 87.749,92.908 82.071,92.737 C 79.345,97.772 75.717,102.124 71.447,105.528 Z"/>
<Path Fill="{StaticResource KinectPurpleBrush}" Data="F1 M 49.279,30.538 C 29.813,30.538 13.975,48.466 13.975,70.502 C 13.975,92.539 29.813,110.466 49.279,110.466 C 68.748,110.466 84.586,92.539 84.586,70.502 C 84.586,48.466 68.748,30.538 49.279,30.538 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 50.676,52.776 C 50.068,53.384 49.082,53.384 48.475,52.776 L 41.311,45.612 C 40.703,45.004 40.703,44.019 41.311,43.412 L 48.475,36.248 C 49.082,35.640 50.067,35.639 50.676,36.248 L 57.840,43.412 C 58.447,44.019 58.447,45.004 57.840,45.612 L 50.676,52.776 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 50.676,78.766 C 50.068,79.375 49.082,79.375 48.475,78.766 L 41.311,71.603 C 40.703,70.995 40.703,70.009 41.311,69.402 L 48.475,62.238 C 49.082,61.630 50.067,61.630 50.676,62.238 L 57.840,69.402 C 58.447,70.009 58.447,70.995 57.840,71.603 L 50.676,78.766 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 67.915,67.358 C 67.308,67.966 66.321,67.966 65.714,67.358 L 58.550,60.195 C 57.942,59.586 57.942,58.601 58.550,57.994 L 65.714,50.830 C 66.321,50.222 67.307,50.221 67.915,50.830 L 75.079,57.994 C 75.687,58.601 75.687,59.586 75.079,60.195 L 67.915,67.358 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 67.915,90.669 C 67.308,91.277 66.321,91.277 65.714,90.669 L 58.550,83.505 C 57.942,82.898 57.942,81.912 58.550,81.304 L 65.714,74.140 C 66.321,73.533 67.307,73.532 67.915,74.140 L 75.079,81.304 C 75.687,81.912 75.687,82.898 75.079,83.505 L 67.915,90.669 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 32.848,67.358 C 32.240,67.966 31.254,67.966 30.646,67.358 L 23.482,60.195 C 22.875,59.586 22.875,58.601 23.482,57.994 L 30.646,50.830 C 31.254,50.222 32.240,50.221 32.848,50.830 L 40.012,57.994 C 40.619,58.601 40.619,59.586 40.012,60.195 L 32.848,67.358 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 32.848,90.669 C 32.240,91.277 31.254,91.277 30.646,90.669 L 23.482,83.505 C 22.875,82.898 22.875,81.912 23.482,81.304 L 30.646,74.140 C 31.254,73.533 32.240,73.532 32.848,74.140 L 40.012,81.304 C 40.619,81.912 40.619,82.898 40.012,83.505 L 32.848,90.669 Z"/>
<Path Fill="{StaticResource LightGreyBrush}" Data="F1 M 50.676,104.757 C 50.068,105.365 49.082,105.365 48.475,104.757 L 41.311,97.593 C 40.703,96.986 40.703,96.000 41.311,95.392 L 48.475,88.228 C 49.082,87.621 50.067,87.621 50.676,88.228 L 57.840,95.392 C 58.447,96.000 58.447,96.986 57.840,97.593 L 50.676,104.757 Z"/>
</Canvas>
</Canvas>
</Viewbox>
<StackPanel
Grid.Row="2"
Orientation="Horizontal"
HorizontalAlignment="Stretch"
Margin="0,5"
>
<Image
x:Name="imgKinect"
Source="Images\Kinect.png"
HorizontalAlignment="Left"
VerticalAlignment="Center"
/>
<TextBlock
x:Name="txtCommands"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Margin="10 0 0 0"
Foreground="{StaticResource MediumGreyBrush}"
>
Say:
<Hyperlink x:Name="CLOSE" Click="Command_Click">Cl<Run FontWeight="SemiBold">o</Run>se</Hyperlink>,
<Hyperlink x:Name="FORWARD" Click="Command_Click"><Run FontWeight="SemiBold">F</Run>orward</Hyperlink>,
<Hyperlink x:Name="BACK" Click="Command_Click"><Run FontWeight="SemiBold">B</Run>ack</Hyperlink>,
<Hyperlink x:Name="LEFT" Click="Command_Click">Turn <Run FontWeight="SemiBold">L</Run>eft</Hyperlink>,
<Hyperlink x:Name="RIGHT" Click="Command_Click">Turn <Run FontWeight="SemiBold">R</Run>ight</Hyperlink>,
<LineBreak />
<Separator Width="28" Visibility="Hidden"/>
<Hyperlink x:Name="PENDOWN" Click="Command_Click">Pen <Run FontWeight="SemiBold">D</Run>own</Hyperlink>,
<Hyperlink x:Name="PENUP" Click="Command_Click">Pen <Run FontWeight="SemiBold">U</Run>p</Hyperlink>,
<Hyperlink x:Name="BIGGER" Click="Command_Click">Bi<Run FontWeight="SemiBold">g</Run>ger</Hyperlink>,
<Hyperlink x:Name="SMALLER" Click="Command_Click"><Run FontWeight="SemiBold">S</Run>maller</Hyperlink>
or names of <Hyperlink x:Name="COLORS" Click="Command_Click"><Run FontWeight="SemiBold">C</Run>olors</Hyperlink>
</TextBlock>
</StackPanel>
<StatusBar Grid.Row="3" Height="23" HorizontalAlignment="Stretch" x:Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="{StaticResource MediumGreyBrush}">
<StatusBarItem Padding="0">
<TextBlock x:Name="statusBarText"></TextBlock>
</StatusBarItem>
</StatusBar>
</Grid>
</Window>