-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
241 lines (231 loc) · 17 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<Window x:Class="Microsoft.Samples.Kinect.RecordAndPlaybackBasics.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
xmlns:local="clr-namespace:Microsoft.Samples.Kinect.RecordAndPlaybackBasics"
Title="Record and Playback Basics"
Height="650" Width="1700">
<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>
<!-- This style is used for buttons, to remove the WPF default 'animated' mouse over effect -->
<Style x:Key="MyButtonStyle" TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="border"
BorderThickness="1"
Padding="4,2"
BorderBrush="DarkGray"
CornerRadius="3"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="Black" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<dragablz:TabablzControl SelectionChanged="TabControl_SelectionChanged">
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController />
</dragablz:TabablzControl.InterTabController>
<TabItem x:Name="Main" Header="主畫面">
<Grid Background="#bfb8ae">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="18*"/>
<ColumnDefinition Width="19*"/>
<ColumnDefinition Width="1649*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border Grid.Row="1" Margin="2.416,0,20,20" BorderBrush="#2a4357" BorderThickness="7" Grid.ColumnSpan="2" Grid.Column="1">
<Grid Background="#b29f98">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="250"/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" HorizontalAlignment="Center" Orientation="Horizontal">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Viewbox Height="40" Margin="0, 0, 0, 0">
<RadioButton x:Name="leftColorRadio" GroupName="left" Grid.Row="0" HorizontalAlignment="Center" Margin="0, 10, 25, 10" IsChecked="True" Click="ToggleButtonLeft_Checked">彩色</RadioButton>
</Viewbox>
<Viewbox Height="40">
<RadioButton x:Name="leftBodyRadio" GroupName="left" Grid.Row="0" HorizontalAlignment="Center" Margin="0, 10, 0, 10" Click="ToggleButtonLeft_Checked" Content="骨架"/>
</Viewbox>
</StackPanel>
<ComboBox x:Name="classList" HorizontalAlignment="Center" Margin="50,0,0,0" VerticalAlignment="Center" Width="70" Loaded="ClassLoaded" SelectionChanged="ClassSelectionChanged"/>
<ComboBox x:Name="week_main" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" Width="70" Loaded="ComboBox_Loaded_Main" SelectionChanged="ComboBox_SelectionChanged_Main"/>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Orientation="Horizontal">
<Viewbox Height="40" Margin="200, 0, 0, 0">
<RadioButton x:Name="rightColorRadio" GroupName="right" Grid.Row="0" HorizontalAlignment="Center" Margin="0, 10, 50, 10" IsChecked="True" Click="ToggleButtonRight_Checked">彩色</RadioButton>
</Viewbox>
<Viewbox Height="40">
<RadioButton x:Name="rightBodyRadio" GroupName="right" Grid.Row="0" HorizontalAlignment="Center" Margin="25, 10, 0, 10" Click="ToggleButtonRight_Checked" Content="骨架"/>
</Viewbox>
</StackPanel>
<Grid Grid.Row="1" Grid.Column="0" Margin="30 0 30 0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Button x:Name="MediaPlayerLeftButton" Style="{StaticResource MyButtonStyle}" Grid.Row="0" Margin="10,0,0.2,44.2" Background="#3a475b" MouseDown="MediaPlayer_left_MouseRightButtonDown" Grid.RowSpan="2">
<MediaElement x:Name="MediaPlayer_left" Grid.Row="0" LoadedBehavior="Manual" HorizontalAlignment="Center" MediaOpened="MediaLeftOpened" MediaEnded="MediaLeftEnded" RenderTransformOrigin="0.5,0.5">
<MediaElement.RenderTransform>
<ScaleTransform ScaleX="-1"/>
</MediaElement.RenderTransform>
</MediaElement>
</Button>
<Viewbox Grid.Row="1" Height="40" HorizontalAlignment="Left" Margin="0,5">
<RadioButton x:Name="lobRadio" GroupName="action" Grid.Row="0" HorizontalAlignment="Center" Margin="5, 10, 0, 10" IsChecked="True" Click="ActionSwitch_Click" Content="挑球"/>
</Viewbox>
<Viewbox Grid.Row="2" Height="40" HorizontalAlignment="Left" Margin="0,5">
<RadioButton x:Name="serveRadio" GroupName="action" Grid.Row="0" HorizontalAlignment="Center" Margin="5, 10, 0, 10" Click="ActionSwitch_Click" Content="發球"/>
</Viewbox>
<Viewbox Grid.Row="3" Height="40" HorizontalAlignment="Left" Margin="0,5">
<RadioButton x:Name="smashRadio" GroupName="action" Grid.Row="0" HorizontalAlignment="Center" Margin="5, 10, 0, 10" Click="ActionSwitch_Click" Content="殺球"/>
</Viewbox>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="3" >
<Image x:Name="MenuLeftButton" Source="Images/menu.png" Height="30" MouseLeftButtonDown="MenuLeftButton_MouseLeftButtonDown"></Image>
<Image x:Name="PlayPauseLeftButton" Source="Images/play-circle.png" Width="50" MouseLeftButtonDown="PlayPauseLeftButton_Click" Margin="8" />
<Image x:Name="StopLeftButton" Source="Images/stop-circle.png" MouseLeftButtonDown="StopLeftButton_Click" Margin="8" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="2">
<Button x:Name="Output_txt" Content="輸出" Click="OutputCSVClick" Margin="10" Padding="5" />
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="3">
<TextBlock x:Name="LeftMediaLabel" Text="00:000" Margin="0, 12, 0, 0"/>
<Slider x:Name="LeftTimelineSlider" Width="200" Margin="5,10,5,18" ValueChanged="LeftTimelineSlider_ValueChanged" RenderTransformOrigin="0.5,1.533"
TickPlacement="BottomRight"
AutoToolTipPlacement="BottomRight"
TickFrequency="200"
/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="3">
<Image Source="Images/turtle-128.png" Width="35" Margin="0, -10, 0, 0"></Image>
<Slider x:Name="LeftSpeedSlider" Width="200" Margin="5,10,5,18" ValueChanged="RightSpeedSlider_ValueChanged_1" RenderTransformOrigin="0.5,1.533" Minimum="0.1" Maximum="1" Value="1"
Ticks="0.1, 0.25, 0.5, 0.75, 1"
TickPlacement="BottomRight"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="2"
/>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Grid.Column="1" Margin="30 0 30 0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Button x:Name="MediaPlayerRightButton" Style="{StaticResource MyButtonStyle}" Grid.Row="0" Margin="10,0,0.2,49.2" Background="#3a475b" MouseDown="MediaPlayer_right_MouseRightButtonDown" Grid.RowSpan="2">
<MediaElement x:Name="MediaPlayer_right" Grid.Row="0" LoadedBehavior="Manual" HorizontalAlignment="Center" MediaOpened="MediaRightOpened" MediaEnded="MediaRightEnded" RenderTransformOrigin="0.5,0.5">
<MediaElement.RenderTransform>
<ScaleTransform ScaleX="-1"/>
</MediaElement.RenderTransform>
</MediaElement>
</Button>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Image x:Name="MenuRightButton" Source="Images/menu.png" Height="30" MouseLeftButtonDown="MenuRightButton_MouseLeftButtonDown"></Image>
<Image x:Name="PlayPauseRightButton" Source="Images/play-circle.png" Width="50" MouseLeftButtonDown="PlayPauseRightButton_Click" Margin="8" />
<Image x:Name="StopRightButton" Source="Images/stop-circle.png" MouseLeftButtonDown="StopRightButton_Click" Margin="8" />
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock x:Name="RightMediaLabel" Text="00:000" Margin="0,12,0, 0" />
<Slider x:Name="RightTimelineSlider" Width="200" Margin="5,10,5,18" ValueChanged="RightTimelineSlider_ValueChanged" RenderTransformOrigin="0.5,1.533"
TickPlacement="BottomRight"
AutoToolTipPlacement="BottomRight"
TickFrequency="200"
/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
<Image Source="Images/turtle-128.png" Width="35" Margin="0, -10, 0, 0"></Image>
<Slider x:Name="RightSpeedSlider" Width="200" Margin="5,10,5,18" ValueChanged="RightSpeedSlider_ValueChanged" RenderTransformOrigin="0.5,1.533" Minimum="0.1" Maximum="1" Value="1"
Ticks="0.1, 0.25, 0.5, 0.75, 1"
TickPlacement="BottomRight"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="2"
/>
</StackPanel>
</Grid>
<Border Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" BorderBrush="#2a4357" BorderThickness="10, 0, 0, 0" Margin="-10, 0, 0, 0"></Border>
<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" Margin="20 50 10 50" Background="#bfb7ae">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" x:Name="grid0">
<TextBlock Name="textBlock1" TextAlignment="Center" VerticalAlignment="Center" Foreground="#001C70" FontWeight="Heavy" FontSize="20"></TextBlock>
</UniformGrid>
<Grid Grid.Row="1" x:Name="stuGrid">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
</Grid>
</Grid>
<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" Margin="10 50 20 50" Background="#bfb7ae">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" x:Name="grid6">
<TextBlock Name="textBlock2" TextAlignment="Center" VerticalAlignment="Center" Foreground="#001C70" FontWeight="Heavy" FontSize="20"></TextBlock>
</UniformGrid>
<Grid Grid.Row="1" x:Name="coachGrid">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
</Grid>
</Grid>
</Grid>
</Border>
</Grid>
</TabItem>
<TabItem x:Name="Record" Header="錄製/評分" HorizontalAlignment="Left" Width="52">
<local:MenuUserControl />
</TabItem>
</dragablz:TabablzControl>
</Window>