-
Notifications
You must be signed in to change notification settings - Fork 8
/
MainWindow.xaml
172 lines (157 loc) · 7.44 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<Window x:Class="KinectKannon.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"
Title="Body Basics"
Width="1754.412"
Height="1361.493"
Closing="MainWindow_Closing"
Loaded="MainWindow_Loaded"
mc:Ignorable="d">
<Window.Resources>
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />
<SolidColorBrush x:Key="KinectBlueBrush" Color="#ff00BCF2" />
<Style TargetType="{x:Type Image}">
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Color x:Key="KinectPurpleColor">#ff52318f</Color>
</Window.Resources>
<Grid Margin="0 0 0 0" Background="Black">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Kinect Logo -->
<Image Grid.Row="0"
Width="50"
Margin="0 10 0 10"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Source="Images\Logo.png"
Stretch="Fill" />
<!-- Kinect Kannon Words -->
<TextBlock Grid.Row="0"
Margin="0 0 -1 0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
FontFamily="Segoe UI"
FontSize="18"
Foreground="{StaticResource MediumGreyBrush}"><Run Text="Kinect Kannon" />
</TextBlock>
<!-- Kinect Icon -->
<Image Grid.Row="0"
Margin="10 10 10 10"
HorizontalAlignment="Left"
Source="Images\Status.png"
Stretch="None" />
<!-- Camera Feed + Skeletons -->
<Viewbox Grid.Row="1" HorizontalAlignment="Center">
<Image x:Name="CameraFeedImageSource" Source="{Binding ImageSource}" Stretch="UniformToFill" />
</Viewbox>
<!-- Scope -->
<Viewbox Grid.Row="1"
HorizontalAlignment="Center"
Panel.ZIndex="1">
<Image Opacity=".30"
Source="Images\Scope3.png"
Stretch="UniformToFill" />
</Viewbox>
<!-- The Laser Sight -->
<Viewbox Grid.Row="1" HorizontalAlignment="Center">
<Ellipse Width="1"
Height="1"
Margin="25,0,25,0"
Fill="#1948FF"
Opacity=".85" />
</Viewbox>
<!-- The Actual Image -->
<Viewbox Grid.Row="1"
HorizontalAlignment="Center"
Panel.ZIndex="1">
<Image Source="{Binding HudSource}" Stretch="UniformToFill" />
</Viewbox>
<!-- Audio Hud View -->
<Viewbox x:Name="AudioViewBox"
Grid.Row="1"
Grid.RowSpan="2"
Width="1978"
Margin="-103,4.8,-147,-169"
HorizontalAlignment="Center"
Panel.ZIndex="2"
OpacityMask="Black"
Stretch="Uniform"
Visibility="{Binding AudioMeterVisibility}">
<Canvas Width="1"
Height="1"
Margin="0"
HorizontalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform Angle="179.497" />
<TranslateTransform />
</TransformGroup>
</Canvas.RenderTransform>
<Path Data="M 0.1503,0.2832 L 0.228,0.2203 A 0.35,0.35 102 0 0 0.772,0.2203 L 0.8497,0.2832 A 0.45,0.45 102 0 1 0.1503,0.2832 Z">
<Path.Fill>
<RadialGradientBrush Center="0.5 -0.32" RadiusX="0.65" RadiusY="1.1">
<GradientStop Offset="0" Color="LightGray" />
<GradientStop Offset="0.4" Color="LightGray" />
<GradientStop Offset="0.6" Color="WhiteSmoke" />
<GradientStop Offset="1" Color="WhiteSmoke" />
</RadialGradientBrush>
</Path.Fill>
</Path>
<Path Data="M 0.1270,0.3021 L 0.1503,0.2832 A 0.45,0.45 102 0 0 0.8497,0.2832 L 0.8730,0.3021 A 0.48,0.48 102 0 1 0.1270,0.3021 Z">
<Path.Fill>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush.Transform>
<RotateTransform x:Name="beamBarRotation" Angle="0" CenterX="0.5" CenterY="0.0" />
</LinearGradientBrush.Transform>
<GradientStop x:Name="beamBarGsStart" Offset="0" Color="#7FFFFFFF" />
<GradientStop x:Name="beamBarGsPre" Offset="0.45" Color="#7FFFFFFF" />
<GradientStop x:Name="beamBarGsMain" Offset="0.5" Color="#7F52318F" />
<GradientStop x:Name="beamBarGsPost" Offset="0.55" Color="#7FFFFFFF" />
<GradientStop x:Name="beamBarGsEnd" Offset="1" Color="#7FFFFFFF" />
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path Data="M 0.495,0.35 L 0.505,0.35 L 0.5,0.44 Z">
<Path.RenderTransform>
<RotateTransform x:Name="beamNeedleRotation" Angle="0" CenterX="0.5" CenterY="0.0" />
</Path.RenderTransform>
<Path.Fill>
<LinearGradientBrush>
<GradientStop Offset="0" Color="LightGray" />
<GradientStop Offset="0.5" Color="{StaticResource KinectPurpleColor}" />
<GradientStop Offset="1" Color="{StaticResource KinectPurpleColor}" />
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path Data="M 0.1270,0.3021 L 0.228,0.2203 A 0.35,0.35 102 0 0 0.772,0.2203 L 0.8730,0.3021 A 0.48,0.48 102 0 1 0.1270,0.3021 Z"
Stroke="#7FD3D3D3"
StrokeThickness="0.001" />
<Path Data="M 0.2280,0.2203 L 0.13,0.2203 L 0.13,0.0353 L 0.15,0.0353"
Stroke="#7FD3D3D3"
StrokeThickness="0.001" />
<Path Data="M 0.7720,0.2203 L 0.87,0.2203 L 0.87,0.0353 L 0.85,0.0353"
Stroke="#7FD3D3D3"
StrokeThickness="0.001" />
</Canvas>
</Viewbox>
<!-- The Status Bar (ie. What Mode are we in) -->
<StatusBar x:Name="statusBar"
Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Background="White"
Foreground="Red">
<StatusBarItem Content="{Binding StatusText}" />
</StatusBar>
</Grid>
</Window>