Browse Source

界面UI整体更换

设备检测重做
已知BUG修复
tags/3.0.0
张剑 3 years ago
parent
commit
1da2658638
38 changed files with 980 additions and 2289 deletions
  1. 2
    2
      XHWK.WKTool/App.config
  2. 10
    9
      XHWK.WKTool/CreateAMicroLessonWindow.xaml
  3. 308
    439
      XHWK.WKTool/DeviceWindow.xaml
  4. 231
    483
      XHWK.WKTool/DeviceWindow.xaml.cs
  5. BIN
      XHWK.WKTool/Images/VideoList_Play.png
  6. 352
    120
      XHWK.WKTool/LoginWindow.xaml
  7. BIN
      XHWK.WKTool/Resources/AlbumArtSmall.jpg
  8. BIN
      XHWK.WKTool/Resources/AudioFrequency.mp3
  9. BIN
      XHWK.WKTool/Resources/Folder.jpg
  10. BIN
      XHWK.WKTool/Resources/audiotest.mp3
  11. 35
    231
      XHWK.WKTool/ScreenRecordingToolbarWindow.xaml
  12. 7
    177
      XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs
  13. BIN
      XHWK.WKTool/SkinImages/SR/SR_Out.png
  14. BIN
      XHWK.WKTool/SkinImages/SR/SR_Out_MI.png
  15. BIN
      XHWK.WKTool/SkinImages/SR/SR_Out_N.png
  16. BIN
      XHWK.WKTool/SkinImages/SR/SR_Pause.png
  17. BIN
      XHWK.WKTool/SkinImages/SR/SR_Pause_MI.png
  18. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenBlue.png
  19. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenBlue_CL.png
  20. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenBlue_MI.png
  21. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenBlue_N.png
  22. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenRed.png
  23. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenRed_CL.png
  24. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenRed_MI.png
  25. BIN
      XHWK.WKTool/SkinImages/SR/SR_PenRed_N.png
  26. BIN
      XHWK.WKTool/SkinImages/SR/SR_Start.png
  27. BIN
      XHWK.WKTool/SkinImages/SR/SR_Start_MI.png
  28. BIN
      XHWK.WKTool/SkinImages/SR/SR_Stop.png
  29. BIN
      XHWK.WKTool/SkinImages/SR/SR_Stop_MI.png
  30. BIN
      XHWK.WKTool/SkinImages/SR/SR_Stop_N.png
  31. 1
    1
      XHWK.WKTool/UControl/Uc_VideoItem.xaml
  32. 2
    3
      XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs
  33. 3
    1
      XHWK.WKTool/Welcome.xaml.cs
  34. 17
    281
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml
  35. 5
    488
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
  36. 5
    16
      XHWK.WKTool/XHWK.WKTool.csproj
  37. 1
    37
      XHWK.WKTool/system/FFMpeg.cs
  38. 1
    1
      打包脚本/Inno Setup星火微课.iss

+ 2
- 2
XHWK.WKTool/App.config View File

@@ -9,8 +9,8 @@
9 9
     <!--参数是否加密 0不加密 1加密-->
10 10
     <add key="IsParameterEncryption" value="0" />
11 11
     <!--版本号-->
12
-    <add key="VersionCode" value="88" />
13
-    <add key="VersionName" value="2.6.8" />
12
+    <add key="VersionCode" value="89" />
13
+    <add key="VersionName" value="2.6.9" />
14 14
     <!--皮肤样式 0白 1蓝 2黑色 -->
15 15
     <add key="SkinStyle" value="0" />
16 16
     <!--是否输出视频记录日志:0否-->

+ 10
- 9
XHWK.WKTool/CreateAMicroLessonWindow.xaml View File

@@ -123,7 +123,7 @@
123 123
                                     VerticalAlignment="Top"
124 124
                                     Content="创建"
125 125
                                     FontSize="21"
126
-                                    Foreground="#FF4B62EA" />
126
+                                    Foreground="#3F6FFF" />
127 127
                             </Grid>
128 128
                             <!--  讲解名称  -->
129 129
                             <Grid Grid.Row="1">
@@ -140,7 +140,7 @@
140 140
                                         FontSize="14"
141 141
                                         Foreground="#FF999999"
142 142
                                         Text="微课1" />
143
-                                    <Label Height="1.5" Background="#FF317EEC" />
143
+                                    <Label Height="1.5" Background="#3F6FFF" />
144 144
                                 </StackPanel>
145 145
                             </Grid>
146 146
                             <!--  存放路径  -->
@@ -168,17 +168,18 @@
168 168
                                         <Button
169 169
                                             x:Name="btnBrowse"
170 170
                                             Grid.Column="1"
171
-                                            Margin="0,5,0,0"
172
-                                            Background="#F7F7F7"
173
-                                            BorderBrush="#cccccc"
171
+                                            Margin="0,5,0,5"
172
+                                            Padding="4"
173
+                                            Background="#F1F2F8"
174
+                                            BorderBrush="#E1E1E1"
174 175
                                             BorderThickness="1"
175 176
                                             Click="BtnBrowse_Click"
176 177
                                             Content="浏览"
177 178
                                             Cursor="Hand"
178
-                                            FontSize="14"
179
-                                            Style="{StaticResource Button_Menu}" />
179
+                                            FontSize="12"
180
+                                            Foreground="#333333" />
180 181
                                     </Grid>
181
-                                    <Label Height="1.5" Background="#FF317EEC" />
182
+                                    <Label Height="1.5" Background="#3F6FFF" />
182 183
                                 </StackPanel>
183 184
                                 <!--<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="30,0,30,1" Grid.ColumnSpan="2">
184 185
                                 <Label Content="*" FontSize="18" Padding="0,27,0,0" Foreground="#FF0000"/>
@@ -229,7 +230,7 @@
229 230
                                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
230 231
                                                 BorderThickness="1"
231 232
                                                 CornerRadius="20">
232
-                                                <Border.Background>#FF1D64DA</Border.Background>
233
+                                                <Border.Background>#3F6FFF</Border.Background>
233 234
                                                 <ContentPresenter
234 235
                                                     HorizontalAlignment="Center"
235 236
                                                     VerticalAlignment="Center"

+ 308
- 439
XHWK.WKTool/DeviceWindow.xaml View File

@@ -7,13 +7,13 @@
7 7
     xmlns:local="clr-namespace:XHWK.WKTool"
8 8
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9 9
     Title="设备检测"
10
-    Width="650"
11
-    Height="450"
10
+    Width="569"
11
+    Height="367"
12 12
     AllowsTransparency="True"
13 13
     BorderBrush="#FFE9E9E9"
14 14
     BorderThickness="1"
15
-    ShowInTaskbar="False"
16
-    WindowStartupLocation="CenterOwner"
15
+    ShowInTaskbar="True"
16
+    WindowStartupLocation="CenterScreen"
17 17
     WindowStyle="None"
18 18
     mc:Ignorable="d">
19 19
 
@@ -140,7 +140,7 @@
140 140
     </Window.Resources>
141 141
     <Grid>
142 142
         <Grid.RowDefinitions>
143
-            <RowDefinition Height="46" />
143
+            <RowDefinition Height="42" />
144 144
             <RowDefinition Height="*" />
145 145
         </Grid.RowDefinitions>
146 146
         <Grid
@@ -160,29 +160,27 @@
160 160
                 Grid.Row="0"
161 161
                 Width="46"
162 162
                 HorizontalAlignment="Right"
163
-                VerticalAlignment="Top"
164 163
                 Click="BtnDown_Click"
165 164
                 Content="×"
166 165
                 Cursor="Hand"
167 166
                 FontSize="30"
168
-                Foreground="White"
169
-                Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
167
+                Foreground="White" />
170 168
         </Grid>
171 169
         <Grid Grid.Row="1">
172 170
             <Grid.ColumnDefinitions>
173
-                <ColumnDefinition Width="100*" />
174
-                <ColumnDefinition Width="300*" />
171
+                <ColumnDefinition Width="140" />
172
+                <ColumnDefinition Width="*" />
175 173
             </Grid.ColumnDefinitions>
176 174
             <Grid Grid.Column="0">
177 175
                 <Border BorderBrush="#FFE9E9E9" BorderThickness="0,0,1,0">
178 176
                     <StackPanel Margin="0,10" VerticalAlignment="Top">
179 177
                         <Button
180 178
                             x:Name="BtnCamera"
181
-                            Margin="0,10,0,10"
179
+                            Height="40"
180
+                            Margin="0,0,0,0"
182 181
                             HorizontalAlignment="Stretch"
183 182
                             VerticalAlignment="Stretch"
184
-                            Click="BtnCamera_Click"
185
-                            Cursor="Hand"
183
+                            IsEnabled="False"
186 184
                             Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
187 185
                             <StackPanel Orientation="Horizontal">
188 186
                                 <Image
@@ -194,17 +192,19 @@
194 192
                                     Width="100"
195 193
                                     Padding="0,0,0,0"
196 194
                                     HorizontalAlignment="Center"
197
-                                    FontSize="18"
195
+                                    FontSize="16"
198 196
                                     Text="摄像头" />
199 197
                             </StackPanel>
198
+
199
+
200 200
                         </Button>
201 201
                         <Button
202 202
                             x:Name="BtnSpeaker"
203
-                            Margin="0,10,0,10"
203
+                            Height="40"
204
+                            Margin="0,0,0,0"
204 205
                             HorizontalAlignment="Stretch"
205 206
                             VerticalAlignment="Stretch"
206
-                            Click="BtnSpeaker_Click"
207
-                            Cursor="Hand"
207
+                            IsEnabled="False"
208 208
                             Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
209 209
                             <StackPanel Orientation="Horizontal">
210 210
                                 <Image
@@ -216,17 +216,18 @@
216 216
                                     Width="100"
217 217
                                     Padding="0,0,0,0"
218 218
                                     HorizontalAlignment="Center"
219
-                                    FontSize="18"
219
+                                    FontSize="16"
220 220
                                     Text="扬声器" />
221 221
                             </StackPanel>
222 222
                         </Button>
223 223
                         <Button
224 224
                             x:Name="BtnMicrophone"
225
-                            Margin="0,10,0,10"
225
+                            Height="40"
226
+                            Margin="0,0,0,0"
226 227
                             HorizontalAlignment="Stretch"
227 228
                             VerticalAlignment="Stretch"
228
-                            Click="BtnMicrophone_Click"
229 229
                             Cursor="Hand"
230
+                            IsEnabled="False"
230 231
                             Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
231 232
                             <StackPanel Orientation="Horizontal">
232 233
                                 <Image
@@ -238,17 +239,17 @@
238 239
                                     Width="100"
239 240
                                     Padding="0,0,0,0"
240 241
                                     HorizontalAlignment="Center"
241
-                                    FontSize="18"
242
+                                    FontSize="16"
242 243
                                     Text="麦克风" />
243 244
                             </StackPanel>
244 245
                         </Button>
245 246
                         <Button
246 247
                             x:Name="BtnDetectionPage"
247
-                            Margin="0,10,0,10"
248
+                            Height="40"
249
+                            Margin="0,0,0,0"
248 250
                             HorizontalAlignment="Stretch"
249 251
                             VerticalAlignment="Stretch"
250
-                            Click="BtnDetectionPage_Click"
251
-                            Cursor="Hand"
252
+                            IsEnabled="False"
252 253
                             Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
253 254
                             <StackPanel Orientation="Horizontal">
254 255
                                 <Image
@@ -260,187 +261,63 @@
260 261
                                     Width="100"
261 262
                                     Padding="0,0,0,0"
262 263
                                     HorizontalAlignment="Center"
263
-                                    FontSize="18"
264
-                                    Text="设备检测" />
264
+                                    FontSize="16"
265
+                                    Text="检测结果" />
265 266
                             </StackPanel>
266 267
                         </Button>
267 268
                     </StackPanel>
268 269
                 </Border>
269 270
             </Grid>
270
-            <Grid
271
-                x:Name="GridDetection"
272
-                Grid.Column="1"
273
-                Margin="25,15"
274
-                Visibility="Visible">
275
-                <Grid.ColumnDefinitions>
276
-                    <ColumnDefinition Width="50*" />
277
-                    <ColumnDefinition Width="50*" />
278
-                </Grid.ColumnDefinitions>
279
-                <Grid.RowDefinitions>
280
-                    <RowDefinition Height="50*" />
281
-                    <RowDefinition Height="50*" />
282
-                    <RowDefinition Height="50*" />
283
-                    <RowDefinition Height="50*" />
284
-                    <RowDefinition Height="50*" />
285
-                    <RowDefinition Height="50*" />
286
-                    <RowDefinition Height="50*" />
287
-                </Grid.RowDefinitions>
288
-                <Grid Grid.Row="0" Grid.Column="0">
289
-                    <TextBlock
290
-                        HorizontalAlignment="Center"
291
-                        VerticalAlignment="Center"
292
-                        FontSize="18"
293
-                        Foreground="#FF999999"
294
-                        Text="设备名称" />
295
-                </Grid>
296
-                <Grid Grid.Row="0" Grid.Column="1">
297
-                    <TextBlock
298
-                        HorizontalAlignment="Center"
299
-                        VerticalAlignment="Center"
300
-                        FontSize="18"
301
-                        Foreground="#FF999999"
302
-                        Text="检测结果" />
303
-                </Grid>
304
-                <!--  摄像头  -->
305
-                <Grid Grid.Row="1" Grid.Column="0">
306
-                    <TextBlock
307
-                        HorizontalAlignment="Center"
308
-                        VerticalAlignment="Center"
309
-                        FontSize="17"
310
-                        Foreground="#FF000000"
311
-                        Text="摄像头" />
312
-                </Grid>
313
-                <Grid Grid.Row="1" Grid.Column="1">
314
-                    <TextBlock
315
-                        x:Name="TxbCamera"
316
-                        HorizontalAlignment="Center"
317
-                        VerticalAlignment="Center"
318
-                        FontSize="17"
319
-                        Foreground="#FF000000"
320
-                        Text="" />
321
-                </Grid>
322
-                <!--  扬声器  -->
323
-                <Grid Grid.Row="2" Grid.Column="0">
324
-                    <TextBlock
325
-                        HorizontalAlignment="Center"
326
-                        VerticalAlignment="Center"
327
-                        FontSize="17"
328
-                        Foreground="#FF000000"
329
-                        Text="扬声器" />
330
-                </Grid>
331
-                <Grid Grid.Row="2" Grid.Column="1">
332
-                    <TextBlock
333
-                        x:Name="TxbSpeaker"
334
-                        HorizontalAlignment="Center"
335
-                        VerticalAlignment="Center"
336
-                        FontSize="17"
337
-                        Foreground="#FF000000"
338
-                        Text="" />
339
-                </Grid>
340
-                <!--  麦克风  -->
341
-                <Grid Grid.Row="3" Grid.Column="0">
342
-                    <TextBlock
343
-                        HorizontalAlignment="Center"
344
-                        VerticalAlignment="Center"
345
-                        FontSize="17"
346
-                        Foreground="#FF000000"
347
-                        Text="麦克风" />
348
-                </Grid>
349
-                <Grid Grid.Row="3" Grid.Column="1">
350
-                    <TextBlock
351
-                        x:Name="TxbMicrophone"
352
-                        HorizontalAlignment="Center"
353
-                        VerticalAlignment="Center"
354
-                        FontSize="17"
355
-                        Foreground="#FF000000"
356
-                        Text="" />
357
-                </Grid>
358 271
 
359
-                <Grid Grid.Row="6" Grid.Column="1">
360
-                    <Button
361
-                        x:Name="BtnDetection"
362
-                        Grid.Row="2"
363
-                        Width="116"
364
-                        Height="46"
365
-                        Margin="0"
366
-                        HorizontalAlignment="Right"
367
-                        VerticalAlignment="Stretch"
368
-                        Click="BtnDetection_Click"
369
-                        Content="开始检测"
370
-                        Cursor="Hand"
371
-                        FontSize="17"
372
-                        Foreground="White"
373
-                        IsDefault="True"
374
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
375
-                        <Button.Template>
376
-                            <ControlTemplate TargetType="{x:Type Button}">
377
-                                <Border
378
-                                    BorderBrush="{TemplateBinding BorderBrush}"
379
-                                    BorderThickness="1"
380
-                                    CornerRadius="23">
381
-                                    <Border.Background>
382
-                                        <Brush>#3f6fff</Brush>
383
-                                    </Border.Background>
384
-                                    <ContentPresenter
385
-                                        HorizontalAlignment="Center"
386
-                                        VerticalAlignment="Center"
387
-                                        Content="{TemplateBinding Content}" />
388
-                                </Border>
389
-                            </ControlTemplate>
390
-                        </Button.Template>
391
-                    </Button>
392
-                </Grid>
393
-            </Grid>
394 272
             <Grid
395 273
                 x:Name="GridCamera"
396 274
                 Grid.Column="1"
397
-                Visibility="Collapsed">
275
+                Visibility="Visible">
398 276
                 <Grid.RowDefinitions>
399
-                    <RowDefinition Height="66*" />
400
-                    <RowDefinition Height="250*" />
401
-                    <RowDefinition Height="70*" />
277
+                    <RowDefinition Height="64" />
278
+                    <RowDefinition Height="*" />
279
+                    <RowDefinition Height="64" />
402 280
                 </Grid.RowDefinitions>
403 281
                 <StackPanel
404 282
                     Grid.Row="0"
405
-                    Margin="30,20,0,0"
406
-                    HorizontalAlignment="Left"
407
-                    VerticalAlignment="Top"
283
+                    Margin="30,0,0,0"
408 284
                     Orientation="Horizontal">
409 285
                     <TextBlock
410 286
                         Margin="0,5,0,0"
411 287
                         HorizontalAlignment="Left"
412
-                        VerticalAlignment="Top"
413
-                        FontSize="17"
288
+                        VerticalAlignment="Center"
289
+                        FontSize="16"
414 290
                         Foreground="#FF000000"
415
-                        Text="摄像头" />
291
+                        Text="摄像头" />
416 292
                     <ComboBox
417 293
                         x:Name="CmbCameraList"
418
-                        Width="210"
419
-                        Padding="30,0,10,0"
294
+                        Width="236"
295
+                        Margin="16,0,0,0"
296
+                        Padding="30,0,0,0"
420 297
                         HorizontalAlignment="Left"
421
-                        VerticalAlignment="Top"
298
+                        VerticalAlignment="Center"
422 299
                         HorizontalContentAlignment="Center"
423 300
                         VerticalContentAlignment="Center"
424 301
                         Background="White"
425 302
                         BorderThickness="0"
426 303
                         Cursor="Hand"
427
-                        DisplayMemberPath="Value"
304
+                        DisplayMemberPath="Name"
428 305
                         FontSize="14"
429
-                        SelectedValuePath="Key"
306
+                        SelectionChanged="CmbCameraList_SelectionChanged"
430 307
                         Style="{StaticResource stlComboBox}"
431 308
                         Text="请选择" />
432 309
                 </StackPanel>
433 310
                 <Grid
434 311
                     Grid.Row="1"
435 312
                     Width="300"
436
-                    Height="250"
313
+                    Height="160"
437 314
                     Margin="30,0,0,0"
438 315
                     HorizontalAlignment="Left"
439
-                    VerticalAlignment="Top"
440
-                    Background="#FFF1F2F8">
316
+                    VerticalAlignment="Top">
441 317
                     <Image
442 318
                         x:Name="imgPlayer"
443 319
                         RenderTransformOrigin="0.5,0.5"
320
+                        Stretch="Fill"
444 321
                         Visibility="Visible">
445 322
                         <Image.RenderTransform>
446 323
                             <ScaleTransform ScaleX="-1" />
@@ -449,103 +326,37 @@
449 326
                 </Grid>
450 327
                 <StackPanel
451 328
                     Grid.Row="2"
452
-                    Margin="30,15,0,0"
453
-                    HorizontalAlignment="Left"
454
-                    VerticalAlignment="Top"
329
+                    Margin="30,0,0,0"
330
+                    HorizontalAlignment="Right"
455 331
                     Orientation="Horizontal">
456 332
                     <Button
457
-                        x:Name="BtnCameraStat"
458
-                        Width="70"
459
-                        Height="30"
460
-                        Margin="0,0,0,0"
461
-                        HorizontalAlignment="Stretch"
462
-                        VerticalAlignment="Stretch"
463
-                        Click="BtnCameraStat_Click"
464
-                        Content="播放"
465
-                        Cursor="Hand"
466
-                        FontSize="15"
467
-                        Foreground="White"
468
-                        IsDefault="True"
469
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
470
-                        <Button.Template>
471
-                            <ControlTemplate TargetType="{x:Type Button}">
472
-                                <Border
473
-                                    BorderBrush="{TemplateBinding BorderBrush}"
474
-                                    BorderThickness="1"
475
-                                    CornerRadius="7">
476
-                                    <Border.Background>
477
-                                        <Brush>#3f6fff</Brush>
478
-                                    </Border.Background>
479
-                                    <ContentPresenter
480
-                                        HorizontalAlignment="Center"
481
-                                        VerticalAlignment="Center"
482
-                                        Content="{TemplateBinding Content}" />
483
-                                </Border>
484
-                            </ControlTemplate>
485
-                        </Button.Template>
486
-                    </Button>
487
-                    <Button
488
-                        x:Name="BtnCameraStop"
489
-                        Width="70"
333
+                        x:Name="btn_camera_good"
334
+                        Width="100"
490 335
                         Height="30"
491
-                        Margin="10,0,0,0"
492
-                        HorizontalAlignment="Stretch"
493
-                        VerticalAlignment="Stretch"
494
-                        Click="BtnCameraStop_Click"
495
-                        Content="停止"
336
+                        Margin="0,0,10,0"
337
+                        HorizontalAlignment="Right"
338
+                        VerticalAlignment="Center"
339
+                        Background="#3f6fff"
340
+                        Click="btn_camera_good_Click"
341
+                        Content="可以看见"
496 342
                         Cursor="Hand"
497 343
                         FontSize="15"
498 344
                         Foreground="White"
499
-                        IsDefault="True"
500
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
501
-                        <Button.Template>
502
-                            <ControlTemplate TargetType="{x:Type Button}">
503
-                                <Border
504
-                                    BorderBrush="{TemplateBinding BorderBrush}"
505
-                                    BorderThickness="1"
506
-                                    CornerRadius="7">
507
-                                    <Border.Background>
508
-                                        <Brush>#CCCCCC</Brush>
509
-                                    </Border.Background>
510
-                                    <ContentPresenter
511
-                                        HorizontalAlignment="Center"
512
-                                        VerticalAlignment="Center"
513
-                                        Content="{TemplateBinding Content}" />
514
-                                </Border>
515
-                            </ControlTemplate>
516
-                        </Button.Template>
517
-                    </Button>
345
+                        IsDefault="True" />
518 346
                     <Button
519
-                        x:Name="BtnCameraSave"
520
-                        Width="70"
347
+                        x:Name="btn_camera_bad"
348
+                        Width="100"
521 349
                         Height="30"
522
-                        Margin="80,0,0,0"
523
-                        HorizontalAlignment="Stretch"
524
-                        VerticalAlignment="Stretch"
525
-                        Click="BtnCameraSave_Click"
526
-                        Content="设置"
350
+                        Margin="0,0,10,0"
351
+                        HorizontalAlignment="Right"
352
+                        VerticalAlignment="Center"
353
+                        Background="#F1F2F3"
354
+                        Click="btn_camera_bad_Click"
355
+                        Content="看不见"
527 356
                         Cursor="Hand"
528 357
                         FontSize="15"
529
-                        Foreground="White"
530
-                        IsDefault="True"
531
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
532
-                        <Button.Template>
533
-                            <ControlTemplate TargetType="{x:Type Button}">
534
-                                <Border
535
-                                    BorderBrush="{TemplateBinding BorderBrush}"
536
-                                    BorderThickness="1"
537
-                                    CornerRadius="7">
538
-                                    <Border.Background>
539
-                                        <Brush>#3f6fff</Brush>
540
-                                    </Border.Background>
541
-                                    <ContentPresenter
542
-                                        HorizontalAlignment="Center"
543
-                                        VerticalAlignment="Center"
544
-                                        Content="{TemplateBinding Content}" />
545
-                                </Border>
546
-                            </ControlTemplate>
547
-                        </Button.Template>
548
-                    </Button>
358
+                        Foreground="#333333"
359
+                        IsDefault="True" />
549 360
                 </StackPanel>
550 361
             </Grid>
551 362
             <Grid
@@ -553,9 +364,9 @@
553 364
                 Grid.Column="1"
554 365
                 Visibility="Collapsed">
555 366
                 <Grid.RowDefinitions>
556
-                    <RowDefinition Height="56*" />
557
-                    <RowDefinition Height="180*" />
558
-                    <RowDefinition Height="150*" />
367
+                    <RowDefinition Height="64" />
368
+                    <RowDefinition Height="*" />
369
+                    <RowDefinition Height="64" />
559 370
                 </Grid.RowDefinitions>
560 371
                 <Grid Grid.Row="0">
561 372
                     <StackPanel
@@ -605,16 +416,21 @@
605 416
                             Stretch="Fill"
606 417
                             Visibility="Hidden"
607 418
                             Volume="1" />
608
-                        <!--<Slider x:Name="timelineSlider" Minimum="0" VerticalAlignment="Center"  BorderThickness="0,5,0,0" Width="150" Height="30" />-->
609 419
                     </StackPanel>
610 420
                 </Grid>
611 421
                 <Grid Grid.Row="1">
612
-                    <!--<MediaElement Source="/SkinImages/Other/Dev_AcousticWave2.gif" OpacityMask="#FF000000" HorizontalAlignment="Left" Margin="10,0,0,0" LoadedBehavior="{Binding ElementName=MediaAudio,Path=LoadedBehavior}"/>-->
613
-                    <Grid Margin="30,0,127,0" Background="#FFF1F2F8">
422
+                    <!--<MediaElement Source="/SkinImages/Other/Dev_AcousticWave2.gif" OpacityMask="#FF000000" HorizontalAlignment="Left" Margin="10,0,0,0" LoadedBehavior="{Binding ElementName=MediaAudio,Path=LoadedBehavior}" />-->
423
+                    <Grid
424
+                        Width="300"
425
+                        Height="100"
426
+                        Margin="30,0,0,0"
427
+                        HorizontalAlignment="Left"
428
+                        VerticalAlignment="Top"
429
+                        Background="#FFF1F2F8">
614 430
                         <Image
615 431
                             x:Name="ImgAcousticWave"
616
-                            HorizontalAlignment="Left"
617
-                            VerticalAlignment="Top"
432
+                            HorizontalAlignment="Center"
433
+                            VerticalAlignment="Center"
618 434
                             gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
619 435
                             gif:ImageBehavior.AutoStart="True"
620 436
                             gif:ImageBehavior.RepeatBehavior="Forever"
@@ -623,25 +439,38 @@
623 439
                 </Grid>
624 440
                 <Grid Grid.Row="2">
625 441
                     <StackPanel
442
+                        Grid.Row="2"
626 443
                         Margin="30,0,0,0"
627
-                        HorizontalAlignment="Left"
628
-                        VerticalAlignment="Top"
444
+                        HorizontalAlignment="Right"
629 445
                         Orientation="Horizontal">
630
-                        <TextBlock
631
-                            Margin="0,5,0,0"
632
-                            HorizontalAlignment="Left"
633
-                            VerticalAlignment="Top"
634
-                            FontSize="17"
635
-                            Foreground="#FF000000"
636
-                            Text="声音采集:" />
637
-                        <TextBlock
638
-                            x:Name="TbxSpeakerDetection"
639
-                            Margin="0,5,0,0"
640
-                            HorizontalAlignment="Left"
641
-                            VerticalAlignment="Top"
642
-                            FontSize="17"
643
-                            Foreground="#FF000000"
644
-                            Text="待检测" />
446
+                        <Button
447
+                            x:Name="btn_speaker_good"
448
+                            Width="100"
449
+                            Height="30"
450
+                            Margin="0,0,10,0"
451
+                            HorizontalAlignment="Right"
452
+                            VerticalAlignment="Center"
453
+                            Background="#3f6fff"
454
+                            Click="btn_speaker_good_Click"
455
+                            Content="可以听见"
456
+                            Cursor="Hand"
457
+                            FontSize="15"
458
+                            Foreground="White"
459
+                            IsDefault="True" />
460
+                        <Button
461
+                            x:Name="btn_speaker_bad"
462
+                            Width="100"
463
+                            Height="30"
464
+                            Margin="0,0,10,0"
465
+                            HorizontalAlignment="Right"
466
+                            VerticalAlignment="Center"
467
+                            Background="#F1F2F3"
468
+                            Click="btn_speaker_bad_Click"
469
+                            Content="听不见"
470
+                            Cursor="Hand"
471
+                            FontSize="15"
472
+                            Foreground="#333333"
473
+                            IsDefault="True" />
645 474
                     </StackPanel>
646 475
                 </Grid>
647 476
             </Grid>
@@ -650,10 +479,9 @@
650 479
                 Grid.Column="1"
651 480
                 Visibility="Collapsed">
652 481
                 <Grid.RowDefinitions>
653
-                    <RowDefinition Height="50*" />
654
-                    <RowDefinition Height="45*" />
655
-                    <RowDefinition Height="196*" />
656
-                    <RowDefinition Height="95*" />
482
+                    <RowDefinition Height="64" />
483
+                    <RowDefinition Height="*" />
484
+                    <RowDefinition Height="64" />
657 485
                 </Grid.RowDefinitions>
658 486
                 <StackPanel
659 487
                     Grid.Row="0"
@@ -665,13 +493,14 @@
665 493
                         Margin="0,5,0,0"
666 494
                         HorizontalAlignment="Left"
667 495
                         VerticalAlignment="Top"
668
-                        FontSize="17"
496
+                        FontSize="16"
669 497
                         Foreground="#FF000000"
670
-                        Text="麦克风" />
498
+                        Text="麦克风" />
671 499
                     <ComboBox
672 500
                         x:Name="CmbMicrophoneList"
673
-                        Width="210"
674
-                        Padding="30,0,10,0"
501
+                        Width="236"
502
+                        Margin="16,0,0,0"
503
+                        Padding="30,0,0,0"
675 504
                         HorizontalAlignment="Left"
676 505
                         VerticalAlignment="Top"
677 506
                         HorizontalContentAlignment="Center"
@@ -684,174 +513,214 @@
684 513
                         SelectedValuePath="Key"
685 514
                         Style="{StaticResource stlComboBox}"
686 515
                         Text="请选择" />
687
-                    <Button
688
-                        x:Name="BtnMicrophoneSave"
689
-                        Grid.Row="2"
690
-                        Width="70"
691
-                        Height="30"
692
-                        Margin="10,0,0,0"
693
-                        HorizontalAlignment="Stretch"
694
-                        VerticalAlignment="Stretch"
695
-                        Click="BtnMicrophoneSave_Click"
696
-                        Content="设置"
697
-                        Cursor="Hand"
698
-                        FontSize="15"
699
-                        Foreground="White"
700
-                        IsDefault="True"
701
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
702
-                        <Button.Template>
703
-                            <ControlTemplate TargetType="{x:Type Button}">
704
-                                <Border
705
-                                    BorderBrush="{TemplateBinding BorderBrush}"
706
-                                    BorderThickness="1"
707
-                                    CornerRadius="7">
708
-                                    <Border.Background>
709
-                                        <Brush>#3f6fff</Brush>
710
-                                    </Border.Background>
711
-                                    <ContentPresenter
712
-                                        HorizontalAlignment="Center"
713
-                                        VerticalAlignment="Center"
714
-                                        Content="{TemplateBinding Content}" />
715
-                                </Border>
716
-                            </ControlTemplate>
717
-                        </Button.Template>
718
-                    </Button>
719 516
                 </StackPanel>
720
-                <StackPanel
721
-                    Grid.Row="1"
722
-                    Margin="30,0,0,0"
723
-                    HorizontalAlignment="Left"
724
-                    VerticalAlignment="Center"
725
-                    Orientation="Horizontal">
726
-                    <Button
727
-                        x:Name="BtnMicrophoneDetection"
728
-                        Width="100"
729
-                        Height="30"
730
-                        Margin="0"
731
-                        HorizontalAlignment="Stretch"
732
-                        VerticalAlignment="Stretch"
733
-                        Click="BtnMicrophoneDetection_Click"
734
-                        Content="开始录音"
735
-                        Cursor="Hand"
736
-                        FontSize="15"
737
-                        Foreground="White"
738
-                        IsDefault="True"
739
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
740
-                        <Button.Template>
741
-                            <ControlTemplate TargetType="{x:Type Button}">
742
-                                <Border
743
-                                    BorderBrush="{TemplateBinding BorderBrush}"
744
-                                    BorderThickness="1"
745
-                                    CornerRadius="7">
746
-                                    <Border.Background>
747
-                                        <Brush>#3f6fff</Brush>
748
-                                    </Border.Background>
749
-                                    <ContentPresenter
750
-                                        HorizontalAlignment="Center"
751
-                                        VerticalAlignment="Center"
752
-                                        Content="{TemplateBinding Content}" />
753
-                                </Border>
754
-                            </ControlTemplate>
755
-                        </Button.Template>
756
-                    </Button>
757
-
758
-                    <Button
759
-                        x:Name="BtnMicrophoneDetectionPlay"
760
-                        Width="100"
761
-                        Height="30"
762
-                        Margin="10,0,0,0"
763
-                        HorizontalAlignment="Stretch"
764
-                        VerticalAlignment="Stretch"
765
-                        Click="BtnMicrophoneDetectionPlay_Click"
766
-                        Content="播放"
767
-                        Cursor="Hand"
768
-                        FontSize="15"
769
-                        Foreground="White"
770
-                        IsDefault="True"
771
-                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
772
-                        <Button.Template>
773
-                            <ControlTemplate TargetType="{x:Type Button}">
774
-                                <Border
775
-                                    BorderBrush="{TemplateBinding BorderBrush}"
776
-                                    BorderThickness="1"
777
-                                    CornerRadius="7">
778
-                                    <Border.Background>
779
-                                        <Brush>#3f6fff</Brush>
780
-                                    </Border.Background>
781
-                                    <ContentPresenter
782
-                                        HorizontalAlignment="Center"
783
-                                        VerticalAlignment="Center"
784
-                                        Content="{TemplateBinding Content}" />
785
-                                </Border>
786
-                            </ControlTemplate>
787
-                        </Button.Template>
788
-                    </Button>
789
-                    <MediaElement
790
-                        x:Name="MediaAudioMicPlay"
791
-                        Width="0"
792
-                        LoadedBehavior="Manual"
793
-                        MediaEnded="MediaAudioMicPlay_MediaEnded"
794
-                        Stretch="Fill"
795
-                        Visibility="Hidden"
796
-                        Volume="1" />
797
-                </StackPanel>
798
-                <Grid Grid.Row="3">
799
-                    <StackPanel
800
-                        Margin="30,0,0,0"
801
-                        HorizontalAlignment="Left"
802
-                        VerticalAlignment="Top"
803
-                        Orientation="Horizontal">
804
-                        <TextBlock
805
-                            Margin="0,5,0,0"
806
-                            HorizontalAlignment="Left"
807
-                            VerticalAlignment="Top"
808
-                            FontSize="17"
809
-                            Foreground="#FF000000"
810
-                            Text="麦克风采集:" />
811
-                        <TextBlock
812
-                            x:Name="TbxMicrophoneDetection"
813
-                            Margin="0,5,0,0"
814
-                            HorizontalAlignment="Left"
815
-                            VerticalAlignment="Top"
816
-                            FontSize="17"
817
-                            Foreground="#FF000000"
818
-                            Text="待检测" />
819
-                    </StackPanel>
820
-                    <CheckBox
821
-                        x:Name="CbxRecordingMicrophone"
822
-                        Margin="30,40,0,0"
823
-                        Padding="5,0,0,0"
824
-                        HorizontalAlignment="Left"
825
-                        VerticalAlignment="Top"
826
-                        VerticalContentAlignment="Center"
827
-                        Click="CbxRecordingMicrophone_Click"
828
-                        Content="录制麦克风"
829
-                        FontSize="16"
830
-                        IsChecked="True" />
831 517
 
832
-                </Grid>
833
-                <!--<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="30,0,0,0">
834
-                </StackPanel>-->
835
-                <Grid Grid.Row="2">
518
+                <Grid Grid.Row="1">
519
+                    <Grid.RowDefinitions>
520
+                        <RowDefinition Height="Auto" />
521
+                        <RowDefinition Height="64" />
522
+                    </Grid.RowDefinitions>
836 523
                     <Grid
837 524
                         x:Name="GridMicImg"
838
-                        Width="320"
839
-                        Height="180"
525
+                        Width="300"
526
+                        Height="100"
840 527
                         Margin="30,0,0,0"
841 528
                         HorizontalAlignment="Left"
529
+                        VerticalAlignment="Top"
842 530
                         Background="#FFF1F2F8"
843 531
                         Visibility="Visible">
844 532
                         <Image
845 533
                             x:Name="ImgMicAcousticWave"
846
-                            HorizontalAlignment="Left"
847
-                            VerticalAlignment="Top"
848 534
                             gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
849 535
                             gif:ImageBehavior.AutoStart="True"
850 536
                             gif:ImageBehavior.RepeatBehavior="Forever"
851 537
                             Visibility="Hidden" />
852 538
                     </Grid>
539
+
540
+                    <StackPanel
541
+                        Grid.Row="1"
542
+                        Margin="30,0,0,0"
543
+                        HorizontalAlignment="Left"
544
+                        VerticalAlignment="Center"
545
+                        Orientation="Horizontal">
546
+                        <Button
547
+                            x:Name="BtnMicrophoneDetection"
548
+                            Width="100"
549
+                            Height="30"
550
+                            Margin="0"
551
+                            HorizontalAlignment="Stretch"
552
+                            VerticalAlignment="Stretch"
553
+                            Background="#3f6fff"
554
+                            Click="BtnMicrophoneDetection_Click"
555
+                            Content="回响测试"
556
+                            Cursor="Hand"
557
+                            FontSize="15"
558
+                            Foreground="White"
559
+                            IsDefault="True" />
560
+
561
+                        <TextBlock
562
+                            x:Name="TbxMicrophoneDetection"
563
+                            Margin="10,0,0,0"
564
+                            HorizontalAlignment="Left"
565
+                            VerticalAlignment="Center"
566
+                            FontSize="16"
567
+                            Foreground="#FF000000"
568
+                            Text="待检测" />
569
+                        <MediaElement
570
+                            x:Name="MediaAudioMicPlay"
571
+                            Width="0"
572
+                            LoadedBehavior="Manual"
573
+                            MediaEnded="MediaAudioMicPlay_MediaEnded"
574
+                            Stretch="Fill"
575
+                            Visibility="Hidden"
576
+                            Volume="1" />
577
+                    </StackPanel>
578
+                </Grid>
579
+
580
+                <Grid Grid.Row="2">
581
+                    <StackPanel
582
+                        Grid.Row="2"
583
+                        Margin="30,0,0,0"
584
+                        HorizontalAlignment="Right"
585
+                        Orientation="Horizontal">
586
+                        <Button
587
+                            x:Name="btn_microphone_good"
588
+                            Width="100"
589
+                            Height="30"
590
+                            Margin="0,0,10,0"
591
+                            HorizontalAlignment="Right"
592
+                            VerticalAlignment="Center"
593
+                            Background="#3f6fff"
594
+                            Click="btn_microphone_good_Click"
595
+                            Content="可以听见"
596
+                            Cursor="Hand"
597
+                            FontSize="15"
598
+                            Foreground="White"
599
+                            IsDefault="True" />
600
+                        <Button
601
+                            x:Name="btn_microphone_bad"
602
+                            Width="100"
603
+                            Height="30"
604
+                            Margin="0,0,10,0"
605
+                            HorizontalAlignment="Right"
606
+                            VerticalAlignment="Center"
607
+                            Background="#F1F2F3"
608
+                            Click="btn_microphone_bad_Click"
609
+                            Content="听不见"
610
+                            Cursor="Hand"
611
+                            FontSize="15"
612
+                            Foreground="#333333"
613
+                            IsDefault="True" />
614
+                    </StackPanel>
615
+                </Grid>
616
+            </Grid>
617
+            <Grid
618
+                x:Name="GridDetection"
619
+                Grid.Column="1"
620
+                Margin="25,15"
621
+                Visibility="Collapsed">
622
+                <Grid.ColumnDefinitions>
623
+                    <ColumnDefinition Width="50*" />
624
+                    <ColumnDefinition Width="50*" />
625
+                </Grid.ColumnDefinitions>
626
+                <Grid.RowDefinitions>
627
+                    <RowDefinition Height="50*" />
628
+                    <RowDefinition Height="50*" />
629
+                    <RowDefinition Height="50*" />
630
+                    <RowDefinition Height="50*" />
631
+                    <RowDefinition Height="50*" />
632
+                    <RowDefinition Height="50*" />
633
+                    <RowDefinition Height="50*" />
634
+                </Grid.RowDefinitions>
635
+                <Grid Grid.Row="0" Grid.Column="0">
636
+                    <TextBlock
637
+                        HorizontalAlignment="Center"
638
+                        VerticalAlignment="Center"
639
+                        FontSize="16"
640
+                        Foreground="#FF999999"
641
+                        Text="设备名称" />
642
+                </Grid>
643
+                <Grid Grid.Row="0" Grid.Column="1">
644
+                    <TextBlock
645
+                        HorizontalAlignment="Center"
646
+                        VerticalAlignment="Center"
647
+                        FontSize="16"
648
+                        Foreground="#FF999999"
649
+                        Text="检测结果" />
650
+                </Grid>
651
+                <!--  摄像头  -->
652
+                <Grid Grid.Row="1" Grid.Column="0">
653
+                    <TextBlock
654
+                        HorizontalAlignment="Center"
655
+                        VerticalAlignment="Center"
656
+                        FontSize="16"
657
+                        Foreground="#FF000000"
658
+                        Text="摄像头" />
659
+                </Grid>
660
+                <Grid Grid.Row="1" Grid.Column="1">
661
+                    <TextBlock
662
+                        x:Name="TxbCamera"
663
+                        HorizontalAlignment="Center"
664
+                        VerticalAlignment="Center"
665
+                        FontSize="16"
666
+                        Foreground="#FF000000"
667
+                        Text="" />
668
+                </Grid>
669
+                <!--  扬声器  -->
670
+                <Grid Grid.Row="2" Grid.Column="0">
671
+                    <TextBlock
672
+                        HorizontalAlignment="Center"
673
+                        VerticalAlignment="Center"
674
+                        FontSize="16"
675
+                        Foreground="#FF000000"
676
+                        Text="扬声器" />
677
+                </Grid>
678
+                <Grid Grid.Row="2" Grid.Column="1">
679
+                    <TextBlock
680
+                        x:Name="TxbSpeaker"
681
+                        HorizontalAlignment="Center"
682
+                        VerticalAlignment="Center"
683
+                        FontSize="16"
684
+                        Foreground="#FF000000"
685
+                        Text="" />
686
+                </Grid>
687
+                <!--  麦克风  -->
688
+                <Grid Grid.Row="3" Grid.Column="0">
689
+                    <TextBlock
690
+                        HorizontalAlignment="Center"
691
+                        VerticalAlignment="Center"
692
+                        FontSize="16"
693
+                        Foreground="#FF000000"
694
+                        Text="麦克风" />
695
+                </Grid>
696
+                <Grid Grid.Row="3" Grid.Column="1">
697
+                    <TextBlock
698
+                        x:Name="TxbMicrophone"
699
+                        HorizontalAlignment="Center"
700
+                        VerticalAlignment="Center"
701
+                        FontSize="16"
702
+                        Foreground="#FF000000"
703
+                        Text="" />
704
+                </Grid>
705
+
706
+                <Grid Grid.Row="6" Grid.Column="1">
707
+                    <Button
708
+                        x:Name="BtnDetection"
709
+                        Grid.Row="2"
710
+                        Width="116"
711
+                        Height="30"
712
+                        Margin="0"
713
+                        HorizontalAlignment="Right"
714
+                        VerticalAlignment="Stretch"
715
+                        Background="#3f6fff"
716
+                        Click="BtnDetection_Click"
717
+                        Content="重新检测"
718
+                        Cursor="Hand"
719
+                        FontSize="14"
720
+                        Foreground="White"
721
+                        IsDefault="True" />
853 722
                 </Grid>
854 723
             </Grid>
855 724
         </Grid>
856 725
     </Grid>
857
-</Window>
726
+</Window>

+ 231
- 483
XHWK.WKTool/DeviceWindow.xaml.cs View File

@@ -1,8 +1,16 @@
1
-using Common.system;
1
+using Accord.Video;
2
+using Accord.Video.DirectShow;
3
+
4
+using Common.system;
5
+
6
+using NAudio.CoreAudioApi;
2 7
 
3 8
 using System;
4 9
 using System.Collections.Generic;
5 10
 using System.Data;
11
+using System.Drawing.Imaging;
12
+using System.IO;
13
+using System.Linq;
6 14
 using System.Threading;
7 15
 using System.Windows;
8 16
 using System.Windows.Input;
@@ -17,10 +25,17 @@ namespace XHWK.WKTool
17 25
     /// </summary>
18 26
     public partial class DeviceWindow : Window
19 27
     {
28
+        private bool cameraGood = false;
29
+        private bool microphoneGood = false;
30
+        private bool loudspeakerGood = false;
31
+
20 32
         public DeviceWindow()
21 33
         {
22 34
             InitializeComponent();
35
+
36
+            cameraCheck();
23 37
         }
38
+
24 39
         /// <summary>
25 40
         /// 初始化
26 41
         /// </summary>
@@ -29,19 +44,9 @@ namespace XHWK.WKTool
29 44
             TxbCamera.Text = "";
30 45
             TxbSpeaker.Text = "";
31 46
             TxbMicrophone.Text = "";
32
-            BtnDetection.Content = "开始检测";
33
-            HidePage();
34
-            GridDetection.Visibility = Visibility.Visible;
35
-            bool IsRecordingMicrophone = FileToolsCommon.GetConfigValue("IsRecordingMicrophone") == "1";
36
-            if(IsRecordingMicrophone)
37
-            {
38
-                CbxRecordingMicrophone.IsChecked = true;
39
-            }
40
-            else
41
-            {
42
-                CbxRecordingMicrophone.IsChecked = false;
43
-            }
47
+       
44 48
         }
49
+
45 50
         /// <summary>
46 51
         /// 窗体移动
47 52
         /// </summary>
@@ -51,6 +56,7 @@ namespace XHWK.WKTool
51 56
         {
52 57
             DragMove();
53 58
         }
59
+
54 60
         /// <summary>
55 61
         /// 关闭当前页
56 62
         /// </summary>
@@ -59,259 +65,94 @@ namespace XHWK.WKTool
59 65
         private void BtnDown_Click(object sender, RoutedEventArgs e)
60 66
         {
61 67
             imgPlayer.Visibility = Visibility.Hidden;
62
-            try
63
-            {
64
-                CameraHelper.CloseDevice();
65
-            }
66
-            catch (Exception)
67
-            {
68
-            }
69
-            Hide();
68
+
69
+            Close();
70 70
         }
71 71
 
72
-        #region 设备检测
73
-        /// <summary>
74
-        /// 开始检测
75
-        /// </summary>
76
-        /// <param name="sender"></param>
77
-        /// <param name="e"></param>
78
-        private void BtnDetection_Click(object sender, RoutedEventArgs e)
72
+        #region 摄像头
73
+
74
+        private void cameraCheck()
79 75
         {
80
-            string AudioPath = FileToolsCommon.GetFileAbsolutePath("/temp/audio/");
81
-            FileToolsCommon.CreateDirectory(AudioPath);
82
-            string audioSpeakerPath = AudioPath + "adoS" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".m";//FileToolsCommon.GetFileAbsolutePath("adoS.m");
83
-            string audioMicrophonePath = AudioPath + "adoM" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".m";//FileToolsCommon.GetFileAbsolutePath("adoM.m");
84
-            string PhotoPath = AudioPath + "Photo" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".jpg";
85
-            TxbCamera.Text = "检测中...";
86
-            TxbSpeaker.Text = "检测中...";
87
-            TxbMicrophone.Text = "检测中...";
88
-            BtnDetection.Content = "正在检测";
89
-            BtnDetection.IsEnabled = false;
90
-            try
91
-            {
92
-                FileToolsCommon.DeleteFile(audioSpeakerPath);
93
-                FileToolsCommon.DeleteFile(audioMicrophonePath);
94
-                FileToolsCommon.DeleteFile(PhotoPath);
95
-            }
96
-            catch (Exception)
97
-            {
76
+            HidePage();
77
+            GridCamera.Visibility = Visibility.Visible;
98 78
 
79
+            var devs = new FilterInfoCollection(FilterCategory.VideoInputDevice);//获取摄像头列表
80
+            CmbCameraList.ItemsSource = devs;
81
+            if (devs.Count > 0)
82
+            {
83
+                CmbCameraList.SelectedIndex = 0;
99 84
             }
100
-            new Thread(new ThreadStart(new Action(() =>
101
-                {
102
-                    #region 检测摄像头
103
-                    try
104
-                    {
105
-                        //new Thread(new ThreadStart(new Action(() =>
106
-                        //{
107
-                        //Dispatcher.Invoke(() =>
108
-                        //{
109
-                        //});
110
-                        //}))).Start();
111
-                        Dispatcher.Invoke(() =>
112
-                        {
113
-                            CameraHelper.UpdateCameraDevices();
114
-                        });
115
-                        Thread.Sleep(500);
116
-                        if (CameraHelper.CameraDevices != null && CameraHelper.CameraDevices.Count > 0)
117
-                        {
118
-                            Dispatcher.Invoke(() =>
119
-                            {
120
-                                int CameraIndex = 0;
121
-                                for (int i = 0; i < CameraHelper.CameraDevices.Count; i++)
122
-                                {
123
-                                    if (CameraHelper.CameraDevices[i].Name == "screen-capture-recorder")
124
-                                    {
125
-                                        continue;
126
-                                    }
127
-                                    if (CameraHelper.CameraDevices[i].MonikerString == APP.CameraName)
128
-                                    {
129
-                                        CameraIndex = i;
130
-                                    }
131
-                                }
132
-                                CameraHelper.SetCameraDevice(CameraIndex);
133
-                            });
134
-                            Thread.Sleep(2000);
135
-                            //while()
136
-                            Dispatcher.Invoke(() =>
137
-                            {
138
-                                long time = Timestamp();
139
-                                string path = CameraHelper.CaptureImage(PhotoPath, time.ToString());
140
-
141
-                                if (string.IsNullOrWhiteSpace(path))
142
-                                {
143
-                                    TxbCamera.Text = "不可用";
144
-
145
-                                }
146
-                                else
147
-                                {
148
-                                    TxbCamera.Text = "正常";
149
-                                }
150
-                                CameraHelper.CloseDevice();
151
-                            });
152
-                        }
153
-                        else
154
-                        {
155
-                            Dispatcher.Invoke(() =>
156
-                            {
157
-                                TxbCamera.Text = "无设备";
158
-                            });
159
-                        }
160
-                    }
161
-                    catch (Exception)
162
-                    {
163
-                        Dispatcher.Invoke(() =>
164
-                        {
165
-                            TxbCamera.Text = "不可用";
166
-                        });
167
-                    }
168
-                    #endregion
169
-                    #region 检测扬声器
170
-                    if (APP.FFmpeg.StartRecordSpeakerAudio(audioSpeakerPath))
171
-                    {
172
-                        Dispatcher.Invoke(() =>
173
-                        {
174
-                            TxbSpeaker.Text = "正常";
175
-                        });
176
-                    }
177
-                    else
178
-                    {
179
-                        //无法录制扬声器音频
180
-
181
-                        Dispatcher.Invoke(() =>
182
-                        {
183
-                            TxbSpeaker.Text = "不可用";
184
-                        });
185
-                    }
186
-                    APP.FFmpeg.StopRecordAudio(2);
187
-                    #endregion
188
-                    Thread.Sleep(300);
189
-                    #region 检测麦克风
190
-                    if (APP.FFmpeg.StartRecordAudio(audioMicrophonePath, APP.MicrophoneName))
191
-                    {
192
-                        Dispatcher.Invoke(() =>
193
-                        {
194
-                            TxbMicrophone.Text = "正常";
195
-                        });
196
-                    }
197
-                    else
198
-                    {
199
-                        //无法录制麦克风
200
-                        Dispatcher.Invoke(() =>
201
-                        {
202
-                            TxbMicrophone.Text = "不可用";
203
-                            CbxRecordingMicrophone.IsChecked = false;
204
-                            FileToolsCommon.SetConfigValue("IsRecordingMicrophone", "0");
205
-                        });
206
-                    }
207
-                    APP.FFmpeg.StopRecordAudio(1);
208
-                    #endregion
209
-                    Dispatcher.Invoke(() =>
210
-                    {
211
-                        BtnDetection.Content = "再次检测";
212
-                        BtnDetection.IsEnabled = true;
213
-                    });
214
-                }))).Start();
215 85
         }
216 86
 
217
-        /// <summary>
218
-        /// 返回一个时间戳到毫秒
219
-        /// </summary>
220
-        /// <returns></returns>
221
-        public static long Timestamp()
87
+        private void CmbCameraList_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
222 88
         {
223
-            TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
224
-            long timestr = Convert.ToInt64(ts.TotalMilliseconds);
225
-            return timestr;
89
+            Console.WriteLine("选择变化");
90
+            checkCamera();
226 91
         }
227
-        #endregion
228 92
 
229
-        #region 摄像头
93
+        private VideoCaptureDevice Camera;//用来操作摄像头
94
+
230 95
         /// <summary>
231
-        /// 设置摄像头
96
+        /// 检测
232 97
         /// </summary>
233 98
         /// <param name="sender"></param>
234 99
         /// <param name="e"></param>
235
-        private void BtnCameraSave_Click(object sender, RoutedEventArgs e)
100
+        private void checkCamera()
236 101
         {
237 102
             try
238 103
             {
239
-                for (int i = 0; i < CameraHelper.CameraDevices.Count; i++)
240
-                {
241
-                    if (CameraHelper.CameraDevices[i].Name == "screen-capture-recorder")
242
-                    {
243
-                        continue;
244
-                    }
245
-                    if (CameraHelper.CameraDevices[i].Name == CmbCameraList.Text)
246
-                    {
247
-                        APP.CameraName = CameraHelper.CameraDevices[i].Name;
248
-                    }
249
-                }
250
-                if (times != null && times.Enabled == true)
251
-                {
252
-                    times.Enabled = false;
253
-                }
254
-                imgPlayer.Visibility = Visibility.Hidden;
255
-                try
256
-                {
257
-                    CameraHelper.CloseDevice();
258
-                }
259
-                catch (Exception)
104
+                closeCamera();
105
+
106
+                imgPlayer.Visibility = Visibility.Visible;
107
+                if (CmbCameraList.SelectedIndex >= 0)
260 108
                 {
109
+                    var info = CmbCameraList.SelectedItem as FilterInfo;
110
+                    Camera = new VideoCaptureDevice(info.MonikerString);
111
+                    //配置录像参数(宽,高,帧率,比特率等参数)VideoCapabilities这个属性会返回摄像头支持哪些配置
112
+                    Camera.VideoResolution = Camera.VideoCapabilities[0];
113
+                    Camera.NewFrame += Camera_NewFrame;//设置回调,aforge会不断从这个回调推出图像数据,SnapshotFrame也是有待比较
114
+                    Camera.Start();//打开摄像头
261 115
                 }
262
-                I = 9999;
263
-                MessageWindow.Show("设置成功!");
264 116
             }
265 117
             catch (Exception ex)
266 118
             {
267
-                APP.CameraName = "";
268
-                MessageWindow.Show("当前无法设置摄像头!");
269
-                LogHelper.WriteErrLog("【摄像头检测】(DeviceWindow)当前无法设置摄像头:" + ex.Message, ex);
119
+                LogHelper.WriteErrLog("【摄像头检测】(DeviceWindow)摄像头不可用:" + ex.Message, ex);
270 120
             }
271
-            //APP.CameraListIndex = CmbCameraList.SelectedIndex;
272 121
         }
273
-        /// <summary>
274
-        /// 检测
275
-        /// </summary>
276
-        /// <param name="sender"></param>
277
-        /// <param name="e"></param>
278
-        private void BtnCameraStat_Click(object sender, RoutedEventArgs e)
122
+
123
+        private void closeCamera()
279 124
         {
280 125
             try
281 126
             {
282
-                imgPlayer.Visibility = Visibility.Visible;
283
-                CameraHelper.UpdateCameraDevices();
284
-                if (CameraHelper.CameraDevices.Count > 0)
127
+                if (Camera != null)
285 128
                 {
286
-                    int CameraIndex = 0;
287
-                    for (int i = 0; i < CameraHelper.CameraDevices.Count; i++)
288
-                    {
289
-                        if (CameraHelper.CameraDevices[i].Name == "screen-capture-recorder")
290
-                        {
291
-                            continue;
292
-                        }
293
-                        if (CameraHelper.CameraDevices[i].MonikerString == APP.CameraName)
294
-                        {
295
-                            CameraIndex = i;
296
-                        }
297
-                    }
298
-                    CameraHelper.SetCameraDevice(CameraIndex);
299
-                    string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayertest");
300
-                    FileToolsCommon.CreateDirectory(imgPath);
301
-                    times = new System.Timers.Timer(200)//初始值为300
302
-                    {
303
-                        AutoReset = true//设置是否执行System.Timers.Timer.Elapsed事件
304
-                    };//设置执行一次(false)还是一直执行(true)
305
-                    times.Elapsed += new System.Timers.ElapsedEventHandler(Times_Elapsed);
306
-                    times.Enabled = true; //启动计时器
129
+                    Camera.SignalToStop();
307 130
                 }
308 131
             }
309
-            catch (Exception ex)
132
+            catch (Exception)
310 133
             {
311
-                LogHelper.WriteErrLog("【摄像头检测】(DeviceWindow)摄像头不可用:" + ex.Message, ex);
312 134
             }
313 135
         }
314 136
 
137
+        /// <summary>
138
+        /// 摄像头输出回调
139
+        /// </summary>
140
+        private void Camera_NewFrame(object sender, NewFrameEventArgs eventArgs)
141
+        {
142
+            Dispatcher.Invoke(new Action(
143
+                    () =>
144
+                    {
145
+                        MemoryStream ms = new MemoryStream();
146
+                        eventArgs.Frame.Save(ms, ImageFormat.Bmp);
147
+                        BitmapImage image = new BitmapImage();
148
+                        image.BeginInit();
149
+                        image.StreamSource = new MemoryStream(ms.GetBuffer());
150
+                        ms.Close();
151
+                        image.EndInit();
152
+                        imgPlayer.Source = image;
153
+                    }));//同步显示
154
+        }
155
+
315 156
         /// <summary>
316 157
         /// 停止
317 158
         /// </summary>
@@ -319,52 +160,29 @@ namespace XHWK.WKTool
319 160
         /// <param name="e"></param>
320 161
         private void BtnCameraStop_Click(object sender, RoutedEventArgs e)
321 162
         {
322
-            times.Enabled = false;
323
-            imgPlayer.Visibility = Visibility.Hidden;
324
-            try
163
+            if (Camera != null)
325 164
             {
326
-                CameraHelper.CloseDevice();
165
+                Camera.SignalToStop();
327 166
             }
328
-            catch (Exception ex)
329
-            {
330
-                LogHelper.WriteErrLog("【摄像头检测】(DeviceWindow)摄像头不可用:" + ex.Message, ex);
331
-            }
332
-            I = 9999;
333 167
         }
334
-        #region 检测摄像头
335 168
 
336
-        private System.Timers.Timer times;
169
+        #endregion 摄像头
170
+
171
+        #region 扬声器
337 172
 
338
-        private int I = 9999;
339
-        private void Times_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
173
+        /// <summary>
174
+        /// 扬声器
175
+        /// </summary>
176
+        /// <param name="sender"></param>
177
+        /// <param name="e"></param>
178
+        private void Speaker_Check()
340 179
         {
341
-            try
342
-            {
343
-                Dispatcher.Invoke(() =>
344
-                {
345
-                    if (I > 10010)
346
-                    {
347
-                        long time = Timestamp();
348
-                        string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayertest");
349
-                        //string FilePathName = ImgPath + RsImgName.Count + ".png";
350
-                        string path = CameraHelper.CaptureImage(imgPath, time.ToString());
351
-                        if (!string.IsNullOrWhiteSpace(path))
352
-                        {
353
-                            imgPlayer.Source = new BitmapImage(new Uri(path));
354
-                        }
355
-                    }
356
-                    I++;
357
-                });
358
-            }
359
-            catch (Exception ex)
360
-            {
361
-                LogHelper.WriteErrLog("【摄像】(Times_Elapsed)生成图片错误:" + ex.Message, ex);
362
-            }
180
+            closeCamera();
181
+            CmbCameraList.SelectedIndex = -1;
182
+            HidePage();
183
+            GridSpeaker.Visibility = Visibility.Visible;
363 184
         }
364
-        #endregion
365
-        #endregion
366 185
 
367
-        #region 扬声器
368 186
         /// <summary>
369 187
         /// 检测扬声器
370 188
         /// </summary>
@@ -372,53 +190,15 @@ namespace XHWK.WKTool
372 190
         /// <param name="e"></param>
373 191
         private void BtnSpeakerDetection_Click(object sender, RoutedEventArgs e)
374 192
         {
375
-            string AudioPath = FileToolsCommon.GetFileAbsolutePath("/temp/audio/");
376
-            FileToolsCommon.CreateDirectory(AudioPath);
377
-            string audioSpeakerPath = AudioPath + "adoS" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".m";
378
-            TbxSpeakerDetection.Text = "检测中...";
379
-            BtnSpeakerDetection.Content = "正在检测";
380
-            BtnSpeakerDetection.IsEnabled = false;
381
-            new Thread(new ThreadStart(new Action(() =>
382
-            {
383
-                Dispatcher.Invoke(() =>
384
-                {
385
-                    MediaAudio.Play();
386
-                    ImgAcousticWave.Visibility = Visibility.Visible;
387
-                });
388
-                Thread.Sleep(4000);
389
-                #region 检测扬声器
390
-                if (APP.FFmpeg.StartRecordSpeakerAudio(audioSpeakerPath))
391
-                {
392
-                    Dispatcher.Invoke(() =>
393
-                    {
394
-                        TbxSpeakerDetection.Text = "正常";
395
-                    });
396
-                }
397
-                else
398
-                {
399
-                    //无法录制扬声器音频
400
-                    Dispatcher.Invoke(() =>
401
-                    {
402
-                        TbxSpeakerDetection.Text = "不可用";
403
-                    });
404
-                }
405
-                APP.FFmpeg.StopRecordAudio(2);
406
-                #endregion
407
-
408
-                Dispatcher.Invoke(() =>
409
-                {
410
-                    ImgAcousticWave.Visibility = Visibility.Hidden;
411
-                    BtnSpeakerDetection.Content = "再次检测";
412
-                    BtnSpeakerDetection.IsEnabled = true;
413
-                });
414
-            }))).Start();
415
-
193
+            Console.WriteLine("播放");
194
+            MediaAudio.Source = new Uri(FileToolsCommon.GetFileAbsolutePath("/Resources/audiotest.mp3"));
195
+            MediaAudio.Position = TimeSpan.Zero;
196
+            MediaAudio.Play();
197
+            ImgAcousticWave.Visibility = Visibility.Visible;
416 198
         }
199
+
417 200
         #region 音频播放
418
-        ///// <summary>
419
-        ///// 计时器
420
-        ///// </summary>
421
-        //DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); // 定义一个DT
201
+
422 202
         /// <summary>
423 203
         /// 音频播放 同步进度条和视频进度
424 204
         /// </summary>
@@ -426,48 +206,62 @@ namespace XHWK.WKTool
426 206
         /// <param name="e"></param>
427 207
         private void MediaAudio_MediaOpened(object sender, RoutedEventArgs e)
428 208
         {
429
-            //timelineSlider.Maximum = MediaAudio.NaturalDuration.TimeSpan.TotalMilliseconds;  //设置slider最大值
430
-            //int sec = (int)MediaAudio.NaturalDuration.TimeSpan.TotalSeconds;
431
-            //dispatcherTimer.Start(); //DT启动 
432
-        }
433
-        /// <summary>
434
-        /// slider滑动值随播放内容位置变化
435
-        /// </summary>
436
-        /// <param name="sender"></param>
437
-        /// <param name="e"></param>
438
-        private void dispatcherTimer_Tick(object sender, EventArgs e)
439
-        {
440
-            //timelineSlider.Value = MediaAudio.Position.TotalMilliseconds; //slider滑动值随播放内容位置变化
209
+            Console.WriteLine("播放中。。。");
441 210
         }
211
+
442 212
         private void MediaAudio_MediaEnded(object sender, RoutedEventArgs e)
443 213
         {
444
-            //dispatcherTimer.Stop();
445
-            //timelineSlider.Value = 0;
446 214
             MediaAudio.Stop();
447 215
             MediaAudio.Position = TimeSpan.Zero;
448 216
         }
449
-        #endregion
450
-        #endregion
217
+
218
+        #endregion 音频播放
219
+
220
+        #endregion 扬声器
451 221
 
452 222
         #region 麦克风
223
+
453 224
         /// <summary>
454
-        /// 设置麦克风
225
+        /// 麦克风
455 226
         /// </summary>
456 227
         /// <param name="sender"></param>
457 228
         /// <param name="e"></param>
458
-        private void BtnMicrophoneSave_Click(object sender, RoutedEventArgs e)
459
-        {
460
-            //CmbMicrophoneList.SelectedValue.ToString();
461
-            APP.MicrophoneName = CmbMicrophoneList.Text;
462
-        }
463
-        /// <summary>
464
-        /// 加载麦克风列表
465
-        /// </summary>
466
-        void lodingMicrophoneList()
229
+        private void Microphone_Check()
467 230
         {
468
-            //string name = APP.FFmpeg.GetMicrophoneName();
469
-            //List<string> MicrophoneList = APP.FFmpeg.GetMicrophoneNameList();
231
+            MediaAudio.Stop();
232
+            ImgAcousticWave.Visibility = Visibility.Collapsed;
233
+            HidePage();
234
+            GridMicrophone.Visibility = Visibility.Visible;
235
+
236
+            ImgMicAcousticWave.Visibility = Visibility.Hidden;
237
+            string AudioPath = FileToolsCommon.GetFileAbsolutePath("/temp/audio/");
238
+            FileToolsCommon.DeleteDirectory(AudioPath);
239
+
240
+            DataTable data = new DataTable();
241
+            List<string> MicrophoneList = APP.FFmpeg.GetMicrophoneNameList();
242
+            if (MicrophoneList.Count > 0)
243
+            {
244
+                data.Columns.Add("Value");
245
+                data.Columns.Add("Key");
246
+                for (int i = 0; i < MicrophoneList.Count; i++)
247
+                {
248
+                    //创建一行
249
+                    DataRow row = data.NewRow();
250
+                    //将此行添加到table中
251
+                    data.Rows.Add(row);
252
+                    data.Rows[i]["Value"] = MicrophoneList[i];
253
+                    data.Rows[i]["Key"] = i.ToString();
254
+                }
255
+                CmbMicrophoneList.ItemsSource = data.DefaultView;
256
+                int CameraIndex = 0;
257
+                if (MicrophoneList.Exists(x => x == APP.MicrophoneName))
258
+                {
259
+                    CameraIndex = MicrophoneList.FindIndex(x => x == APP.MicrophoneName);
260
+                }
261
+                CmbMicrophoneList.SelectedIndex = CameraIndex;
262
+            }
470 263
         }
264
+
471 265
         /// <summary>
472 266
         /// 检测麦克风
473 267
         /// </summary>
@@ -475,7 +269,6 @@ namespace XHWK.WKTool
475 269
         /// <param name="e"></param>
476 270
         private void BtnMicrophoneDetection_Click(object sender, RoutedEventArgs e)
477 271
         {
478
-            BtnMicrophoneDetectionPlay.Visibility = Visibility.Hidden;
479 272
             ImgMicAcousticWave.Visibility = Visibility.Hidden;
480 273
             //GridMicImg.Visibility = Visibility.Hidden;
481 274
             string AudioPath = FileToolsCommon.GetFileAbsolutePath("/temp/audio/");
@@ -487,12 +280,13 @@ namespace XHWK.WKTool
487 280
             new Thread(new ThreadStart(new Action(() =>
488 281
             {
489 282
                 #region 检测麦克风
283
+
490 284
                 bool Record = APP.FFmpeg.StartRecordAudio(audioMicrophonePath, APP.MicrophoneName, false);
491 285
                 for (int i = 5; i > 0; i--)
492 286
                 {
493 287
                     Dispatcher.Invoke(() =>
494 288
                     {
495
-                        TbxMicrophoneDetection.Text = "录制中..." + i + "s";
289
+                        TbxMicrophoneDetection.Text = "请说话(" + i + "s)";
496 290
                     });
497 291
                     Thread.Sleep(1000);
498 292
                 }
@@ -503,9 +297,13 @@ namespace XHWK.WKTool
503 297
                         Dispatcher.Invoke(() =>
504 298
                         {
505 299
                             TbxMicrophoneDetection.Text = "录制成功";
506
-                            BtnMicrophoneDetectionPlay.Visibility = Visibility.Visible;
507
-                            //GridMicImg.Visibility = Visibility.Visible;
300
+
508 301
                             MediaAudioMicPlay.Source = new Uri(audioMicrophonePath);
302
+
303
+                            ImgMicAcousticWave.Visibility = Visibility.Visible;
304
+                            MediaAudioMicPlay.Play();
305
+
306
+                            BtnMicrophoneDetection.Content = "回响中";
509 307
                         });
510 308
                     }
511 309
                     else
@@ -514,8 +312,7 @@ namespace XHWK.WKTool
514 312
                         Dispatcher.Invoke(() =>
515 313
                         {
516 314
                             TbxMicrophoneDetection.Text = "不可用";
517
-                            BtnMicrophoneDetectionPlay.Visibility = Visibility.Hidden;
518
-                            CbxRecordingMicrophone.IsChecked = false;
315
+
519 316
                             FileToolsCommon.SetConfigValue("IsRecordingMicrophone", "0");
520 317
                             //GridMicImg.Visibility = Visibility.Hidden;
521 318
                         });
@@ -527,33 +324,23 @@ namespace XHWK.WKTool
527 324
                     Dispatcher.Invoke(() =>
528 325
                     {
529 326
                         TbxMicrophoneDetection.Text = "不可用";
530
-                        BtnMicrophoneDetectionPlay.Visibility = Visibility.Hidden;
531
-                        CbxRecordingMicrophone.IsChecked = false;
327
+
532 328
                         FileToolsCommon.SetConfigValue("IsRecordingMicrophone", "0");
533 329
                         //GridMicImg.Visibility = Visibility.Hidden;
534 330
                     });
535 331
                 }
536 332
                 APP.FFmpeg.StopRecordAudio(1);
537
-                #endregion
333
+
334
+                #endregion 检测麦克风
335
+
538 336
                 Dispatcher.Invoke(() =>
539 337
                 {
540
-                    BtnMicrophoneDetection.Content = "重新录制";
338
+                    BtnMicrophoneDetection.Content = "重新测试";
541 339
                     BtnMicrophoneDetection.IsEnabled = true;
542 340
                 });
543 341
             }))).Start();
544 342
         }
545
-        /// <summary>
546
-        /// 播放录音
547
-        /// </summary>
548
-        /// <param name="sender"></param>
549
-        /// <param name="e"></param>
550
-        private void BtnMicrophoneDetectionPlay_Click(object sender, RoutedEventArgs e)
551
-        {
552
-            BtnMicrophoneDetectionPlay.Content = "播放中";
553
-            BtnMicrophoneDetectionPlay.IsEnabled = false;
554
-            ImgMicAcousticWave.Visibility = Visibility.Visible;
555
-            MediaAudioMicPlay.Play();
556
-        }
343
+
557 344
         /// <summary>
558 345
         /// 播放结束
559 346
         /// </summary>
@@ -563,143 +350,55 @@ namespace XHWK.WKTool
563 350
         {
564 351
             MediaAudioMicPlay.Stop();
565 352
             MediaAudioMicPlay.Position = TimeSpan.Zero;
566
-            BtnMicrophoneDetectionPlay.Content = "播放";
567
-            BtnMicrophoneDetectionPlay.IsEnabled = true;
353
+
568 354
             ImgMicAcousticWave.Visibility = Visibility.Hidden;
355
+            BtnMicrophoneDetection.Content = "重新测试";
356
+            BtnMicrophoneDetection.IsEnabled = true;
569 357
         }
570 358
 
359
+        #endregion 麦克风
360
+
361
+        #region 页面切换
362
+
571 363
         /// <summary>
572
-        /// 修改录制麦克风
364
+        /// 检测页
573 365
         /// </summary>
574
-        /// <param name="sender"></param>
575
-        /// <param name="e"></param>
576
-        private void CbxRecordingMicrophone_Click(object sender, RoutedEventArgs e)
366
+        private void result_show()
577 367
         {
578
-            if ((bool)CbxRecordingMicrophone.IsChecked)
368
+            HidePage();
369
+            GridDetection.Visibility = Visibility.Visible;
370
+            if (cameraGood)
579 371
             {
580
-                FileToolsCommon.SetConfigValue("IsRecordingMicrophone", "1");
372
+                TxbCamera.Text = "可用";
581 373
             }
582 374
             else
583 375
             {
584
-                FileToolsCommon.SetConfigValue("IsRecordingMicrophone", "0");
376
+                TxbCamera.Text = "不可用";
585 377
             }
586
-        }
587
-        #endregion
588 378
 
589
-        #region 页面切换
590
-        /// <summary>
591
-        /// 摄像头
592
-        /// </summary>
593
-        /// <param name="sender"></param>
594
-        /// <param name="e"></param>
595
-        private void BtnCamera_Click(object sender, RoutedEventArgs e)
596
-        {
597
-            HidePage();
598
-            GridCamera.Visibility = Visibility.Visible;
599
-
600
-            DataTable data = new DataTable();
601
-            CameraHelper.UpdateCameraDevices();
602
-            if (CameraHelper.CameraDevices.Count > 0)
379
+            if (loudspeakerGood)
603 380
             {
604
-                data.Columns.Add("Value");
605
-                data.Columns.Add("Key");
606
-                for (int i = 0; i < CameraHelper.CameraDevices.Count; i++)
607
-                {
608
-                    if (CameraHelper.CameraDevices[i].Name == "screen-capture-recorder")
609
-                    {
610
-                        continue;
611
-                    }
612
-                    //创建一行
613
-                    DataRow row = data.NewRow();
614
-                    //将此行添加到table中
615
-                    data.Rows.Add(row);
616
-                    data.Rows[i]["Value"] = CameraHelper.CameraDevices[i].Name;
617
-                    data.Rows[i]["Key"] = i.ToString();
618
-                }
619
-                CmbCameraList.ItemsSource = data.DefaultView;
620
-                int CameraIndex = 0;
621
-                for (int i = 0; i < CameraHelper.CameraDevices.Count; i++)
622
-                {
623
-                    if (CameraHelper.CameraDevices[i].Name == "screen-capture-recorder")
624
-                    {
625
-                        continue;
626
-                    }
627
-                    if (CameraHelper.CameraDevices[i].MonikerString == APP.CameraName)
628
-                    {
629
-                        CameraIndex = i;
630
-                    }
631
-                }
632
-                CmbCameraList.SelectedIndex = CameraIndex;
381
+                TxbSpeaker.Text = "可用";
382
+            }
383
+            else
384
+            {
385
+                TxbSpeaker.Text = "不可用";
633 386
             }
634 387
 
635
-        }
636
-        /// <summary>
637
-        /// 扬声器
638
-        /// </summary>
639
-        /// <param name="sender"></param>
640
-        /// <param name="e"></param>
641
-        private void BtnSpeaker_Click(object sender, RoutedEventArgs e)
642
-        {
643
-            HidePage();
644
-            GridSpeaker.Visibility = Visibility.Visible;
645
-
646
-            MediaAudio.Source = new Uri(FileToolsCommon.GetFileAbsolutePath("/Resources/AudioFrequency.mp3"));
647
-            //dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); //超过计时间隔时发生
648
-            //dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 500); //DT间隔
649
-
650
-        }
651
-        /// <summary>
652
-        /// 麦克风
653
-        /// </summary>
654
-        /// <param name="sender"></param>
655
-        /// <param name="e"></param>
656
-        private void BtnMicrophone_Click(object sender, RoutedEventArgs e)
657
-        {
658
-            HidePage();
659
-            GridMicrophone.Visibility = Visibility.Visible;
660
-            BtnMicrophoneDetectionPlay.Visibility = Visibility.Hidden;
661
-            ImgMicAcousticWave.Visibility = Visibility.Hidden;
662
-            string AudioPath = FileToolsCommon.GetFileAbsolutePath("/temp/audio/");
663
-            FileToolsCommon.DeleteDirectory(AudioPath);
664
-
665
-            DataTable data = new DataTable();
666
-            List<string> MicrophoneList = APP.FFmpeg.GetMicrophoneNameList();
667
-            if (MicrophoneList.Count > 0)
388
+            if (microphoneGood)
668 389
             {
669
-                data.Columns.Add("Value");
670
-                data.Columns.Add("Key");
671
-                for (int i = 0; i < MicrophoneList.Count; i++)
672
-                {
673
-                    //创建一行
674
-                    DataRow row = data.NewRow();
675
-                    //将此行添加到table中
676
-                    data.Rows.Add(row);
677
-                    data.Rows[i]["Value"] = MicrophoneList[i];
678
-                    data.Rows[i]["Key"] = i.ToString();
679
-                }
680
-                CmbMicrophoneList.ItemsSource = data.DefaultView;
681
-                int CameraIndex = 0;
682
-                if (MicrophoneList.Exists(x => x == APP.MicrophoneName))
683
-                {
684
-                    CameraIndex = MicrophoneList.FindIndex(x => x == APP.MicrophoneName);
685
-                }
686
-                CmbMicrophoneList.SelectedIndex = CameraIndex;
390
+                TxbMicrophone.Text = "可用";
391
+            }
392
+            else
393
+            {
394
+                TxbMicrophone.Text = "不可用";
687 395
             }
688 396
         }
689
-        /// <summary>
690
-        /// 检测页
691
-        /// </summary>
692
-        /// <param name="sender"></param>
693
-        /// <param name="e"></param>
694
-        private void BtnDetectionPage_Click(object sender, RoutedEventArgs e)
695
-        {
696
-            HidePage();
697
-            GridDetection.Visibility = Visibility.Visible;
698
-        }
397
+
699 398
         /// <summary>
700 399
         /// 隐藏页
701 400
         /// </summary>
702
-        void HidePage()
401
+        private void HidePage()
703 402
         {
704 403
             GridDetection.Visibility = Visibility.Collapsed;
705 404
             GridCamera.Visibility = Visibility.Collapsed;
@@ -714,7 +413,56 @@ namespace XHWK.WKTool
714 413
             }
715 414
         }
716 415
 
717
-        #endregion
416
+        #endregion 页面切换
417
+
418
+        #region 事件
419
+
420
+        private void btn_camera_good_Click(object sender, RoutedEventArgs e)
421
+        {
422
+            cameraGood = true;
423
+            Speaker_Check();
424
+        }
425
+
426
+        private void btn_camera_bad_Click(object sender, RoutedEventArgs e)
427
+        {
428
+            cameraGood = false;
429
+            Speaker_Check();
430
+        }
431
+
432
+        private void btn_speaker_good_Click(object sender, RoutedEventArgs e)
433
+        {
434
+            loudspeakerGood = true;
435
+            Microphone_Check();
436
+        }
437
+
438
+        private void btn_speaker_bad_Click(object sender, RoutedEventArgs e)
439
+        {
440
+            loudspeakerGood = false;
441
+            Microphone_Check();
442
+        }
443
+
444
+        private void btn_microphone_good_Click(object sender, RoutedEventArgs e)
445
+        {
446
+            microphoneGood = true;
447
+            result_show();
448
+        }
449
+
450
+        private void btn_microphone_bad_Click(object sender, RoutedEventArgs e)
451
+        {
452
+            microphoneGood = false;
453
+            result_show();
454
+        }
455
+
456
+        /// <summary>
457
+        /// 重新
458
+        /// </summary>
459
+        /// <param name="sender"></param>
460
+        /// <param name="e"></param>
461
+        private void BtnDetection_Click(object sender, RoutedEventArgs e)
462
+        {
463
+            cameraCheck();
464
+        }
718 465
 
466
+        #endregion 事件
719 467
     }
720
-}
468
+}

BIN
XHWK.WKTool/Images/VideoList_Play.png View File


+ 352
- 120
XHWK.WKTool/LoginWindow.xaml View File

@@ -1,54 +1,66 @@
1
-<Window x:Class="XHWK.WKTool.LoginWindow"
2
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
-        xmlns:local="clr-namespace:XHWK.WKTool"
7
-        mc:Ignorable="d"
8
-        Title="LoginWindow" Height="497" Width="312"   AllowsTransparency="True"
1
+<Window
2
+    x:Class="XHWK.WKTool.LoginWindow"
3
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
+    xmlns:local="clr-namespace:XHWK.WKTool"
7
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8
+    Title="LoginWindow"
9
+    Width="312"
10
+    Height="497"
11
+    AllowsTransparency="True"
12
+    BorderBrush="#eeeeee"
13
+    BorderThickness="1"
9 14
     ShowInTaskbar="False"
10 15
     WindowStartupLocation="CenterOwner"
11
-    WindowStyle="None"  BorderThickness="7">
12
-    <Window.Effect>
13
-        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
-    </Window.Effect>
16
+    WindowStyle="None"
17
+    mc:Ignorable="d">
18
+
15 19
     <Window.Resources>
16 20
         <Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
17
-            <Setter Property="OverridesDefaultStyle" Value="True"/>
18
-            <Setter Property="SnapsToDevicePixels" Value="True"/>
21
+            <Setter Property="OverridesDefaultStyle" Value="True" />
22
+            <Setter Property="SnapsToDevicePixels" Value="True" />
19 23
             <Setter Property="Template">
20 24
                 <Setter.Value>
21 25
                     <ControlTemplate TargetType="{x:Type CheckBox}">
22
-                        <BulletDecorator FlowDirection="LeftToRight" VerticalAlignment="Center">
26
+                        <BulletDecorator VerticalAlignment="Center" FlowDirection="LeftToRight">
23 27
                             <BulletDecorator.Bullet>
24
-                                <Border x:Name="bd"  
25
-                                    BorderThickness="1"  
26
-                                    BorderBrush="#B2B2B2"  
27
-                                    MinHeight="13"  
28
-                                    MinWidth="13"  
29
-                                    VerticalAlignment="Center" Background="White">
30
-                                    <Path x:Name="cp" Width="12" Height="12"  
31
-                                      Stroke="#4892E7"  
32
-                                      StrokeThickness="2"/>
28
+                                <Border
29
+                                    x:Name="bd"
30
+                                    MinWidth="13"
31
+                                    MinHeight="13"
32
+                                    VerticalAlignment="Center"
33
+                                    Background="White"
34
+                                    BorderBrush="#B2B2B2"
35
+                                    BorderThickness="1">
36
+                                    <Path
37
+                                        x:Name="cp"
38
+                                        Width="12"
39
+                                        Height="12"
40
+                                        Stroke="#3F6FFF"
41
+                                        StrokeThickness="2" />
33 42
                                 </Border>
34 43
 
35 44
                             </BulletDecorator.Bullet>
36
-                            <TextBlock x:Name="textBlock" Margin="2,0" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontFamily="Microsoft YaHei UI" FontSize="13.333"></TextBlock>
45
+                            <TextBlock
46
+                                x:Name="textBlock"
47
+                                Margin="2,0"
48
+                                FontFamily="Microsoft YaHei UI"
49
+                                FontSize="13.333"
50
+                                Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
37 51
                         </BulletDecorator>
38
-                        <!-- 
39
-                        控件触发器 
40
-                    -->
52
+                        <!--
53
+                            控件触发器
54
+                        -->
41 55
                         <ControlTemplate.Triggers>
42 56
                             <Trigger Property="IsChecked" Value="True">
43
-                                <!-- 画上一个勾 -->
44
-                                <Setter TargetName="cp" Property="Data"  
45
-                                    Value="M 2,6 L 5,9 11,2"/>
46
-                                <Setter Property="Foreground" TargetName="textBlock" Value="#FFE60E0E"/>
57
+                                <!--  画上一个勾  -->
58
+                                <Setter TargetName="cp" Property="Data" Value="M 2,6 L 5,9 11,2" />
59
+                                <Setter TargetName="textBlock" Property="Foreground" Value="#FFE60E0E" />
47 60
 
48 61
                             </Trigger>
49 62
                             <Trigger Property="IsMouseOver" Value="True">
50
-                                <Setter TargetName="bd" Property="BorderBrush" Value="#1583DD">
51
-                                </Setter>
63
+                                <Setter TargetName="bd" Property="BorderBrush" Value="#1583DD" />
52 64
                             </Trigger>
53 65
                         </ControlTemplate.Triggers>
54 66
                     </ControlTemplate>
@@ -56,16 +68,25 @@
56 68
             </Setter>
57 69
         </Style>
58 70
         <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
59
-            <Setter Property="BorderThickness" Value="1"/>
60
-            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
61
-            <Setter Property="HorizontalContentAlignment" Value="Center"/>
62
-            <Setter Property="VerticalContentAlignment" Value="Center"/>
63
-            <Setter Property="Padding" Value="1"/>
71
+            <Setter Property="BorderThickness" Value="1" />
72
+            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
73
+            <Setter Property="HorizontalContentAlignment" Value="Center" />
74
+            <Setter Property="VerticalContentAlignment" Value="Center" />
75
+            <Setter Property="Padding" Value="1" />
64 76
             <Setter Property="Template">
65 77
                 <Setter.Value>
66 78
                     <ControlTemplate TargetType="{x:Type Button}">
67
-                        <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
68
-                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
79
+                        <Border
80
+                            x:Name="Chrome"
81
+                            Background="{TemplateBinding Background}"
82
+                            BorderBrush="{TemplateBinding BorderBrush}"
83
+                            SnapsToDevicePixels="true">
84
+                            <ContentPresenter
85
+                                Margin="{TemplateBinding Padding}"
86
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
87
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
88
+                                RecognizesAccessKey="True"
89
+                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
69 90
                         </Border>
70 91
                     </ControlTemplate>
71 92
                 </Setter.Value>
@@ -73,107 +94,224 @@
73 94
         </Style>
74 95
     </Window.Resources>
75 96
     <Grid>
76
-        <Border Background="White" CornerRadius="15" MouseLeftButtonDown="Border_MouseLeftButtonDown" >
97
+        <Border
98
+            Background="White"
99
+            CornerRadius="15"
100
+            MouseLeftButtonDown="Border_MouseLeftButtonDown">
77 101
             <Grid>
78
-                <Image Source="/SkinImages/ImgCarousel/CM_RightDown.png" HorizontalAlignment="Right" VerticalAlignment="Top" Width="80" />
79
-                <!--创建内页 375-->
80
-                <Grid x:Name="GridLoginPage" Margin="20,0" Visibility="Visible">
102
+                <Image
103
+                    Width="80"
104
+                    HorizontalAlignment="Right"
105
+                    VerticalAlignment="Top"
106
+                    Source="/SkinImages/ImgCarousel/CM_RightDown.png" />
107
+                <!--  创建内页 375  -->
108
+                <Grid
109
+                    x:Name="GridLoginPage"
110
+                    Margin="20,0"
111
+                    Visibility="Visible">
81 112
                     <Grid.RowDefinitions>
82
-                        <RowDefinition Height="100*"/>
83
-                        <RowDefinition Height="70*"/>
84
-                        <RowDefinition Height="70*"/>
85
-                        <RowDefinition Height="15*"/>
86
-                        <RowDefinition Height="120*"/>
113
+                        <RowDefinition Height="100*" />
114
+                        <RowDefinition Height="70*" />
115
+                        <RowDefinition Height="70*" />
116
+                        <RowDefinition Height="15*" />
117
+                        <RowDefinition Height="120*" />
87 118
                     </Grid.RowDefinitions>
88 119
                     <Grid Grid.Row="0">
89 120
                         <StackPanel Margin="0,30,0,0">
90
-                            <Label Content="登录" FontSize="28" Foreground="#FF4B62EA" VerticalAlignment="Top" HorizontalAlignment="Left"  />
91
-                            <Label Content="星火微课系统" FontSize="14" Foreground="#FF000000" VerticalAlignment="Top" HorizontalAlignment="Left" />
121
+                            <Label
122
+                                HorizontalAlignment="Left"
123
+                                VerticalAlignment="Top"
124
+                                Content="登录"
125
+                                FontSize="28"
126
+                                Foreground="#FF4B62EA" />
127
+                            <Label
128
+                                HorizontalAlignment="Left"
129
+                                VerticalAlignment="Top"
130
+                                Content="星火微课系统"
131
+                                FontSize="14"
132
+                                Foreground="#FF000000" />
92 133
                         </StackPanel>
93 134
                     </Grid>
94
-                    <!--账号-->
135
+                    <!--  账号  -->
95 136
                     <Grid Grid.Row="1">
96 137
                         <StackPanel VerticalAlignment="Center">
97
-                            <Label Content="账号:" FontSize="12" Foreground="#FF666666"/>
98
-                            <TextBox x:Name="txbAccountNumber" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="txbAccountNumber_PreviewTextInput"  Text="" FontSize="14" Foreground="#FF999999" BorderBrush="{x:Null}" BorderThickness="0" Margin="5,5"/>
99
-                            <Label Background="#FF317EEC" Height="1.5"/>
138
+                            <Label
139
+                                Content="账号:"
140
+                                FontSize="12"
141
+                                Foreground="#FF666666" />
142
+                            <TextBox
143
+                                x:Name="txbAccountNumber"
144
+                                Margin="5,5"
145
+                                BorderBrush="{x:Null}"
146
+                                BorderThickness="0"
147
+                                FontSize="14"
148
+                                Foreground="#FF999999"
149
+                                InputMethod.IsInputMethodEnabled="False"
150
+                                PreviewTextInput="txbAccountNumber_PreviewTextInput"
151
+                                Text="" />
152
+                            <Label Height="1.5" Background="#3F6FFF" />
100 153
                         </StackPanel>
101 154
                     </Grid>
102
-                    <!--密码-->
155
+                    <!--  密码  -->
103 156
                     <Grid Grid.Row="2">
104 157
                         <StackPanel VerticalAlignment="Center">
105
-                            <Label Content="密码:" FontSize="12" Foreground="#FF666666"/>
106
-                            <PasswordBox x:Name="pobPassword" FontSize="14" Foreground="#FF999999" PasswordChar="*" BorderBrush="{x:Null}" BorderThickness="0"  Margin="5,5"/>
107
-                            <Label Background="#FF317EEC" Height="1.5"/>
158
+                            <Label
159
+                                Content="密码:"
160
+                                FontSize="12"
161
+                                Foreground="#FF666666" />
162
+                            <PasswordBox
163
+                                x:Name="pobPassword"
164
+                                Margin="5,5"
165
+                                BorderBrush="{x:Null}"
166
+                                BorderThickness="0"
167
+                                FontSize="14"
168
+                                Foreground="#FF999999"
169
+                                PasswordChar="*" />
170
+                            <Label Height="1.5" Background="#3F6FFF" />
108 171
                         </StackPanel>
109 172
                         <!--<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="30,0,30,1" Grid.ColumnSpan="2">
110 173
                                 <Label Content="*" FontSize="18" Padding="0,27,0,0" Foreground="#FF0000"/>
111 174
                                 <TextBlock Text="存放路径" FontSize="18" Padding="2,23,10,0"/>
112
-                                -->
113
-                        <!--输入框-->
175
+                        -->
176
+                        <!--  输入框  -->
114 177
                         <!--
115 178
                                 <Border Background="#CDD6E0" Width="200" Height="43" CornerRadius="3">
116 179
                                     <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="198" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
117 180
                                 </Border>
118
-                                -->
119
-                        <!--浏览按钮-->
181
+                        -->
182
+                        <!--  浏览按钮  -->
120 183
                         <!--
121 184
                                 <Button Cursor="Hand" x:Name="btnBrowse" FontSize="18" Width="80" Height="43" BorderBrush="#cccccc" BorderThickness="1" Click="BtnBrowse_Click" Content="浏览" Style="{StaticResource Button_Menu}"
122 185
                                 Background="#F7F7F7" Margin="11,0,0,0"/>
123 186
                             </StackPanel>-->
124 187
                     </Grid>
125
-                    <!--记住密码 切换网络-->
188
+                    <!--  记住密码 切换网络  -->
126 189
                     <Grid Grid.Row="3">
127
-                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
128
-                            <Viewbox VerticalAlignment="Center" Margin="0,0,5,0">
129
-                                <CheckBox Cursor="Hand"  x:Name="ckSaveName" Click="CkSaveName_Click"   Style="{DynamicResource CheckBoxStyle1}"/>
190
+                        <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
191
+                            <Viewbox Margin="0,0,5,0" VerticalAlignment="Center">
192
+                                <CheckBox
193
+                                    x:Name="ckSaveName"
194
+                                    Click="CkSaveName_Click"
195
+                                    Cursor="Hand"
196
+                                    Style="{DynamicResource CheckBoxStyle1}" />
130 197
                             </Viewbox>
131
-                            <TextBlock Text="记住账号" FontSize="10" VerticalAlignment="Center" Foreground="#FFB2B2B2"/>
198
+                            <TextBlock
199
+                                VerticalAlignment="Center"
200
+                                FontSize="10"
201
+                                Foreground="#FFB2B2B2"
202
+                                Text="记住账号" />
132 203
                         </StackPanel>
133 204
 
134
-                        <Label x:Name="LblCreate" Content="创建微课中..." FontSize="12" Foreground="#FF999999" HorizontalAlignment="Right" Visibility="Hidden" Margin="0"/>
205
+                        <Label
206
+                            x:Name="LblCreate"
207
+                            Margin="0"
208
+                            HorizontalAlignment="Right"
209
+                            Content="创建微课中..."
210
+                            FontSize="12"
211
+                            Foreground="#FF999999"
212
+                            Visibility="Hidden" />
135 213
                     </Grid>
136
-                    <!--按钮-->
214
+                    <!--  按钮  -->
137 215
                     <Grid Grid.Row="4">
138 216
                         <Grid.RowDefinitions>
139
-                            <RowDefinition Height="35*"/>
140
-                            <RowDefinition Height="35*"/>
141
-                            <RowDefinition Height="5*"/>
142
-                            <RowDefinition Height="35*"/>
143
-                            <RowDefinition Height="15*"/>
144
-                            <RowDefinition Height="25*"/>
145
-                            <RowDefinition Height="5*"/>
217
+                            <RowDefinition Height="35*" />
218
+                            <RowDefinition Height="35*" />
219
+                            <RowDefinition Height="5*" />
220
+                            <RowDefinition Height="35*" />
221
+                            <RowDefinition Height="15*" />
222
+                            <RowDefinition Height="25*" />
223
+                            <RowDefinition Height="5*" />
146 224
                         </Grid.RowDefinitions>
147
-                        <Button Grid.Row="1" Cursor="Hand" x:Name="btnStart" IsDefault="True" Content="登录" FontSize="18" FontWeight="Bold" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"  Click="BtnStart_Click" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
225
+                        <Button
226
+                            x:Name="btnStart"
227
+                            Grid.Row="1"
228
+                            Grid.ColumnSpan="2"
229
+                            HorizontalAlignment="Stretch"
230
+                            VerticalAlignment="Stretch"
231
+                            HorizontalContentAlignment="Center"
232
+                            VerticalContentAlignment="Center"
233
+                            Click="BtnStart_Click"
234
+                            Content="登录"
235
+                            Cursor="Hand"
236
+                            FontSize="18"
237
+                            Foreground="#FFFFFF"
238
+                            IsDefault="True"
239
+                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
148 240
                             <Button.Template>
149 241
                                 <ControlTemplate TargetType="{x:Type Button}">
150
-                                    <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="20">
151
-                                        <Border.Background>#FF1D64DA</Border.Background>
152
-                                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" Margin="0,5" />
242
+                                    <Border
243
+                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
244
+                                        BorderThickness="1"
245
+                                        CornerRadius="20">
246
+                                        <Border.Background>#3F6FFF</Border.Background>
247
+                                        <ContentPresenter
248
+                                            Margin="0,5"
249
+                                            HorizontalAlignment="Center"
250
+                                            VerticalAlignment="Center"
251
+                                            Content="{TemplateBinding ContentControl.Content}" />
153 252
                                     </Border>
154 253
                                 </ControlTemplate>
155 254
                             </Button.Template>
156 255
                         </Button>
157
-                        <Button Grid.Row="3" Cursor="Hand" x:Name="BtnStop" IsDefault="True" Content="关闭" FontSize="18" FontWeight="Bold" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0" Click="BtnDown_Click" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" Padding="2" VerticalContentAlignment="Center">
256
+                        <Button
257
+                            x:Name="BtnStop"
258
+                            Grid.Row="3"
259
+                            Grid.ColumnSpan="2"
260
+                            Margin="0"
261
+                            Padding="2"
262
+                            HorizontalAlignment="Stretch"
263
+                            VerticalAlignment="Stretch"
264
+                            HorizontalContentAlignment="Center"
265
+                            VerticalContentAlignment="Center"
266
+                            Click="BtnDown_Click"
267
+                            Content="关闭"
268
+                            Cursor="Hand"
269
+                            FontSize="18"
270
+                            Foreground="#FFFFFF"
271
+                            IsDefault="True"
272
+                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
158 273
                             <Button.Template>
159 274
                                 <ControlTemplate TargetType="{x:Type Button}">
160
-                                    <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="20">
275
+                                    <Border
276
+                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
277
+                                        BorderThickness="1"
278
+                                        CornerRadius="20">
161 279
                                         <Border.Background>#FFC3C3C3</Border.Background>
162
-                                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" Margin="0,5" />
280
+                                        <ContentPresenter
281
+                                            Margin="0,5"
282
+                                            HorizontalAlignment="Center"
283
+                                            VerticalAlignment="Center"
284
+                                            Content="{TemplateBinding ContentControl.Content}" />
163 285
                                     </Border>
164 286
                                 </ControlTemplate>
165 287
                             </Button.Template>
166 288
                         </Button>
167 289
 
168
-                        <Button Grid.Row="5" FontSize="{Binding WordSize12}" Cursor="Hand" x:Name="BtnServiceAddress" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnServiceAddress_Click" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Stretch" >
290
+                        <Button
291
+                            x:Name="BtnServiceAddress"
292
+                            Grid.Row="5"
293
+                            Margin="0"
294
+                            HorizontalAlignment="Right"
295
+                            VerticalAlignment="Stretch"
296
+                            Click="BtnServiceAddress_Click"
297
+                            Cursor="Hand"
298
+                            FontSize="{Binding WordSize12}"
299
+                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
169 300
                             <Button.Template>
170 301
                                 <ControlTemplate TargetType="{x:Type Button}">
171 302
                                     <Grid>
172
-                                        <Label Grid.Column="1" x:Name="Word" Content="服务地址设置" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFC3C3C3"/>
303
+                                        <Label
304
+                                            x:Name="Word"
305
+                                            Grid.Column="1"
306
+                                            HorizontalAlignment="Center"
307
+                                            VerticalAlignment="Center"
308
+                                            Content="服务地址设置"
309
+                                            FontSize="{TemplateBinding FontSize}"
310
+                                            Foreground="#FFC3C3C3" />
173 311
                                     </Grid>
174 312
                                     <ControlTemplate.Triggers>
175 313
                                         <Trigger Property="IsMouseOver" Value="True">
176
-                                            <Setter TargetName="Word" Property="Foreground" Value="#FF3F6FFF"/>
314
+                                            <Setter TargetName="Word" Property="Foreground" Value="#FF3F6FFF" />
177 315
                                         </Trigger>
178 316
                                     </ControlTemplate.Triggers>
179 317
                                 </ControlTemplate>
@@ -181,67 +319,161 @@
181 319
                         </Button>
182 320
                     </Grid>
183 321
                 </Grid>
184
-                <Grid x:Name="GridServiceAddress" Margin="20,0" Visibility="Collapsed">
322
+                <Grid
323
+                    x:Name="GridServiceAddress"
324
+                    Margin="20,0"
325
+                    Visibility="Collapsed">
185 326
                     <Grid.RowDefinitions>
186
-                        <RowDefinition Height="100*"/>
187
-                        <RowDefinition Height="80*"/>
188
-                        <RowDefinition Height="70*"/>
189
-                        <RowDefinition Height="15*"/>
190
-                        <RowDefinition Height="120*"/>
327
+                        <RowDefinition Height="100*" />
328
+                        <RowDefinition Height="80*" />
329
+                        <RowDefinition Height="70*" />
330
+                        <RowDefinition Height="15*" />
331
+                        <RowDefinition Height="120*" />
191 332
                     </Grid.RowDefinitions>
192 333
                     <Grid Grid.Row="0">
193 334
                         <StackPanel Margin="0,30,0,0">
194
-                            <Label Content="服务地址" FontSize="28" Foreground="#FF4B62EA" VerticalAlignment="Top" HorizontalAlignment="Left"  />
195
-                            <Label Content="设置" FontSize="14" Foreground="#FF000000" VerticalAlignment="Top" HorizontalAlignment="Left" />
335
+                            <Label
336
+                                HorizontalAlignment="Left"
337
+                                VerticalAlignment="Top"
338
+                                Content="服务地址"
339
+                                FontSize="28"
340
+                                Foreground="#FF4B62EA" />
341
+                            <Label
342
+                                HorizontalAlignment="Left"
343
+                                VerticalAlignment="Top"
344
+                                Content="设置"
345
+                                FontSize="14"
346
+                                Foreground="#FF000000" />
196 347
                         </StackPanel>
197 348
                     </Grid>
198 349
 
199
-                    <!--服务地址-->
350
+                    <!--  服务地址  -->
200 351
                     <Grid Grid.Row="1">
201 352
                         <StackPanel VerticalAlignment="Center">
202
-                            <Label Content="服务地址:" FontSize="12" Foreground="#FF666666"/>
203
-                            <TextBox x:Name="TbxServiceAddress" InputMethod.IsInputMethodEnabled="False" Text="" FontSize="14" Foreground="#FF999999" BorderBrush="{x:Null}" BorderThickness="0" Margin="5,5"/>
204
-                            <Label Background="#FF317EEC" Height="1.5"/>
353
+                            <Label
354
+                                Content="服务地址:"
355
+                                FontSize="12"
356
+                                Foreground="#FF666666" />
357
+                            <TextBox
358
+                                x:Name="TbxServiceAddress"
359
+                                Margin="5,5"
360
+                                BorderBrush="{x:Null}"
361
+                                BorderThickness="0"
362
+                                FontSize="14"
363
+                                Foreground="#FF999999"
364
+                                InputMethod.IsInputMethodEnabled="False"
365
+                                Text="" />
366
+                            <Label Height="1.5" Background="#3F6FFF" />
205 367
                         </StackPanel>
206 368
                     </Grid>
207 369
 
208
-                    <!--切换网络-->
370
+                    <!--  切换网络  -->
209 371
                     <Grid Grid.Row="2">
210 372
                         <StackPanel VerticalAlignment="Center">
211
-                            <Label Content="切换网络:" FontSize="12" Foreground="#FF666666"/>
212
-                            <StackPanel Orientation="Horizontal" Grid.Row="6" HorizontalAlignment="Left" Margin="0,10,0,0">
213
-                                <RadioButton x:Name="RbnIsOutsideSchool" Content="校外" FontSize="14" HorizontalAlignment="Left" Foreground="#FF333333"  Margin="20,0,0,0" IsChecked="True" Checked="RbnIsOutsideSchool_Checked" VerticalContentAlignment="Center"/>
214
-                                <RadioButton x:Name="RbnSchool" Content="校内" FontSize="14" HorizontalAlignment="Left" Foreground="#FF333333" Margin="20,0,0,0" Checked="RbnSchool_Checked" VerticalContentAlignment="Center"/>
373
+                            <Label
374
+                                Content="切换网络:"
375
+                                FontSize="12"
376
+                                Foreground="#FF666666" />
377
+                            <StackPanel
378
+                                Grid.Row="6"
379
+                                Margin="0,10,0,0"
380
+                                HorizontalAlignment="Left"
381
+                                Orientation="Horizontal">
382
+                                <RadioButton
383
+                                    x:Name="RbnIsOutsideSchool"
384
+                                    Margin="20,0,0,0"
385
+                                    HorizontalAlignment="Left"
386
+                                    VerticalContentAlignment="Center"
387
+                                    Checked="RbnIsOutsideSchool_Checked"
388
+                                    Content="校外"
389
+                                    FontSize="14"
390
+                                    Foreground="#FF333333"
391
+                                    IsChecked="True" />
392
+                                <RadioButton
393
+                                    x:Name="RbnSchool"
394
+                                    Margin="20,0,0,0"
395
+                                    HorizontalAlignment="Left"
396
+                                    VerticalContentAlignment="Center"
397
+                                    Checked="RbnSchool_Checked"
398
+                                    Content="校内"
399
+                                    FontSize="14"
400
+                                    Foreground="#FF333333" />
215 401
                             </StackPanel>
216 402
                         </StackPanel>
217 403
                     </Grid>
218
-                    <!--按钮-->
404
+                    <!--  按钮  -->
219 405
                     <Grid Grid.Row="4">
220 406
                         <Grid.RowDefinitions>
221
-                            <RowDefinition Height="35*"/>
222
-                            <RowDefinition Height="35*"/>
223
-                            <RowDefinition Height="5*"/>
224
-                            <RowDefinition Height="35*"/>
225
-                            <RowDefinition Height="15*"/>
226
-                            <RowDefinition Height="25*"/>
227
-                            <RowDefinition Height="5*"/>
407
+                            <RowDefinition Height="35*" />
408
+                            <RowDefinition Height="35*" />
409
+                            <RowDefinition Height="5*" />
410
+                            <RowDefinition Height="35*" />
411
+                            <RowDefinition Height="15*" />
412
+                            <RowDefinition Height="25*" />
413
+                            <RowDefinition Height="5*" />
228 414
                         </Grid.RowDefinitions>
229
-                        <Button Grid.Row="1" Cursor="Hand" x:Name="BtnSetServiceAddress" IsDefault="True" Content="设置" FontSize="18" FontWeight="Bold" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Click="BtnSetServiceAddress_Click">
415
+                        <Button
416
+                            x:Name="BtnSetServiceAddress"
417
+                            Grid.Row="1"
418
+                            Grid.ColumnSpan="2"
419
+                            HorizontalAlignment="Stretch"
420
+                            VerticalAlignment="Stretch"
421
+                            HorizontalContentAlignment="Center"
422
+                            VerticalContentAlignment="Center"
423
+                            Click="BtnSetServiceAddress_Click"
424
+                            Content="设置"
425
+                            Cursor="Hand"
426
+                            FontSize="18"
427
+                            FontWeight="Bold"
428
+                            Foreground="#FFFFFF"
429
+                            IsDefault="True"
430
+                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
230 431
                             <Button.Template>
231 432
                                 <ControlTemplate TargetType="{x:Type Button}">
232
-                                    <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="20">
233
-                                        <Border.Background>#FF1D64DA</Border.Background>
234
-                                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" Margin="0,5" />
433
+                                    <Border
434
+                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
435
+                                        BorderThickness="1"
436
+                                        CornerRadius="20">
437
+                                        <Border.Background>#3F6FFF</Border.Background>
438
+                                        <ContentPresenter
439
+                                            Margin="0,5"
440
+                                            HorizontalAlignment="Center"
441
+                                            VerticalAlignment="Center"
442
+                                            Content="{TemplateBinding ContentControl.Content}" />
235 443
                                     </Border>
236 444
                                 </ControlTemplate>
237 445
                             </Button.Template>
238 446
                         </Button>
239
-                        <Button Grid.Row="3" Cursor="Hand" x:Name="BtnCancel" IsDefault="True" Content="取消" FontSize="18" FontWeight="Bold" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" Padding="2" VerticalContentAlignment="Center" Click="BtnCancel_Click">
447
+                        <Button
448
+                            x:Name="BtnCancel"
449
+                            Grid.Row="3"
450
+                            Grid.ColumnSpan="2"
451
+                            Margin="0"
452
+                            Padding="2"
453
+                            HorizontalAlignment="Stretch"
454
+                            VerticalAlignment="Stretch"
455
+                            HorizontalContentAlignment="Center"
456
+                            VerticalContentAlignment="Center"
457
+                            Click="BtnCancel_Click"
458
+                            Content="取消"
459
+                            Cursor="Hand"
460
+                            FontSize="18"
461
+                            FontWeight="Bold"
462
+                            Foreground="#FFFFFF"
463
+                            IsDefault="True"
464
+                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
240 465
                             <Button.Template>
241 466
                                 <ControlTemplate TargetType="{x:Type Button}">
242
-                                    <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="20">
467
+                                    <Border
468
+                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
469
+                                        BorderThickness="1"
470
+                                        CornerRadius="20">
243 471
                                         <Border.Background>#FFC3C3C3</Border.Background>
244
-                                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" Margin="0,5" />
472
+                                        <ContentPresenter
473
+                                            Margin="0,5"
474
+                                            HorizontalAlignment="Center"
475
+                                            VerticalAlignment="Center"
476
+                                            Content="{TemplateBinding ContentControl.Content}" />
245 477
                                     </Border>
246 478
                                 </ControlTemplate>
247 479
                             </Button.Template>

BIN
XHWK.WKTool/Resources/AlbumArtSmall.jpg View File


BIN
XHWK.WKTool/Resources/AudioFrequency.mp3 View File


BIN
XHWK.WKTool/Resources/Folder.jpg View File


BIN
XHWK.WKTool/Resources/audiotest.mp3 View File


+ 35
- 231
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml View File

@@ -5,7 +5,7 @@
5 5
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6 6
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7 7
     Title="ScreenRecordingToolbarWindow"
8
-    Width="423"
8
+    Width="420"
9 9
     Height="58"
10 10
     Margin="0"
11 11
     AllowsTransparency="True"
@@ -24,15 +24,15 @@
24 24
             MouseLeave="gridToobarTwo_MouseLeave"
25 25
             Visibility="Visible">
26 26
             <Grid.ColumnDefinitions>
27
-                <ColumnDefinition Width="56*" />
28
-                <ColumnDefinition Width="361*" />
27
+                <ColumnDefinition Width="60" />
28
+                <ColumnDefinition Width="360" />
29 29
             </Grid.ColumnDefinitions>
30 30
             <Border
31 31
                 Grid.ColumnSpan="2"
32 32
                 Background="White"
33 33
                 BorderBrush="#FF638AFF"
34
-                BorderThickness="3"
35
-                CornerRadius="29" />
34
+                BorderThickness="3,3,0,3"
35
+                CornerRadius="29 0 0 29" />
36 36
             <!--  开始暂停  -->
37 37
             <Grid Grid.Column="0">
38 38
                 <Button
@@ -47,7 +47,7 @@
47 47
                             <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Start.png" />
48 48
                             <ControlTemplate.Triggers>
49 49
                                 <Trigger Property="IsMouseOver" Value="True">
50
-                                    <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Start_MI.png" />
50
+                                    <Setter TargetName="BtnImages" Property="Opacity" Value="0.6" />
51 51
                                 </Trigger>
52 52
                                 <Trigger Property="IsPressed" Value="True">
53 53
                                     <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Start.png" />
@@ -71,7 +71,7 @@
71 71
                             <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Pause.png" />
72 72
                             <ControlTemplate.Triggers>
73 73
                                 <Trigger Property="IsMouseOver" Value="True">
74
-                                    <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Pause_MI.png" />
74
+                                    <Setter TargetName="BtnImages" Property="Opacity" Value="0.6" />
75 75
                                 </Trigger>
76 76
                                 <Trigger Property="IsPressed" Value="True">
77 77
                                     <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Pause.png" />
@@ -92,17 +92,17 @@
92 92
                     <RowDefinition Height="10*" />
93 93
                 </Grid.RowDefinitions>
94 94
                 <Grid.ColumnDefinitions>
95
-                    <ColumnDefinition Width="10*" />
96
-                    <ColumnDefinition Width="38*" />
97
-                    <ColumnDefinition Width="28*" />
98
-                    <ColumnDefinition Width="92*" />
99
-                    <ColumnDefinition Width="28*" />
100
-                    <ColumnDefinition Width="38*" />
101
-                    <ColumnDefinition Width="4*" />
102
-                    <ColumnDefinition Width="38*" />
103
-                    <ColumnDefinition Width="28*" />
104
-                    <ColumnDefinition Width="38*" />
105
-                    <ColumnDefinition Width="17*" />
95
+                    <ColumnDefinition Width="10" />
96
+                    <ColumnDefinition Width="38" />
97
+                    <ColumnDefinition Width="20" />
98
+                    <ColumnDefinition Width="*" />
99
+                    <ColumnDefinition Width="20" />
100
+                    <ColumnDefinition Width="38" />
101
+                    <ColumnDefinition Width="6" />
102
+                    <ColumnDefinition Width="38" />
103
+                    <ColumnDefinition Width="20" />
104
+                    <ColumnDefinition Width="38" />
105
+                    <ColumnDefinition Width="10" />
106 106
                 </Grid.ColumnDefinitions>
107 107
                 <Grid Grid.Row="1" Grid.Column="1">
108 108
                     <!--  停止  -->
@@ -114,16 +114,16 @@
114 114
                         ToolTip="停止">
115 115
                         <Button.Template>
116 116
                             <ControlTemplate TargetType="{x:Type Button}">
117
-                                <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Stop.png" />
117
+                                <Image
118
+                                    x:Name="BtnImages"
119
+                                    Width="24"
120
+                                    Source="/SkinImages/SR/SR_Stop.png" />
118 121
                                 <ControlTemplate.Triggers>
119 122
                                     <Trigger Property="IsMouseOver" Value="True">
120
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop_MI.png" />
121
-                                    </Trigger>
122
-                                    <Trigger Property="IsPressed" Value="True">
123
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop.png" />
123
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
124 124
                                     </Trigger>
125 125
                                     <Trigger Property="IsEnabled" Value="False">
126
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Stop_N.png" />
126
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
127 127
                                     </Trigger>
128 128
                                 </ControlTemplate.Triggers>
129 129
                             </ControlTemplate>
@@ -153,7 +153,7 @@
153 153
                         Padding="0"
154 154
                         HorizontalContentAlignment="Center"
155 155
                         VerticalContentAlignment="Center"
156
-                        Content="00:00"
156
+                        Content="00:00:00"
157 157
                         FontFamily="/星火微课;component/Resources/#Quartz"
158 158
                         FontSize="36"
159 159
                         Foreground="#FF3F6FFF"
@@ -179,19 +179,16 @@
179 179
                         Click="BtnBrush_Click"
180 180
                         Cursor="Hand"
181 181
                         Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
182
-                        ToolTip="批注">
182
+                        ToolTip="蓝笔">
183 183
                         <Button.Template>
184 184
                             <ControlTemplate TargetType="{x:Type Button}">
185 185
                                 <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenBlue.png" />
186 186
                                 <ControlTemplate.Triggers>
187 187
                                     <Trigger Property="IsMouseOver" Value="True">
188
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_MI.png" />
189
-                                    </Trigger>
190
-                                    <Trigger Property="IsPressed" Value="True">
191
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_CL.png" />
188
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
192 189
                                     </Trigger>
193 190
                                     <Trigger Property="IsEnabled" Value="False">
194
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenBlue_N.png" />
191
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
195 192
                                     </Trigger>
196 193
                                 </ControlTemplate.Triggers>
197 194
                             </ControlTemplate>
@@ -207,7 +204,7 @@
207 204
                         Visibility="Collapsed">
208 205
                         <Button.Template>
209 206
                             <ControlTemplate TargetType="{x:Type Button}">
210
-                                <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenBlue_CL.png" />
207
+                                <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenBlue.png" />
211 208
                             </ControlTemplate>
212 209
                         </Button.Template>
213 210
                     </Button>
@@ -225,13 +222,10 @@
225 222
                                 <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenRed.png" />
226 223
                                 <ControlTemplate.Triggers>
227 224
                                     <Trigger Property="IsMouseOver" Value="True">
228
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_MI.png" />
229
-                                    </Trigger>
230
-                                    <Trigger Property="IsPressed" Value="True">
231
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_CL.png" />
225
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
232 226
                                     </Trigger>
233 227
                                     <Trigger Property="IsEnabled" Value="False">
234
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_PenRed_N.png" />
228
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
235 229
                                     </Trigger>
236 230
                                 </ControlTemplate.Triggers>
237 231
                             </ControlTemplate>
@@ -247,7 +241,7 @@
247 241
                         Visibility="Collapsed">
248 242
                         <Button.Template>
249 243
                             <ControlTemplate TargetType="{x:Type Button}">
250
-                                <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenRed_CL.png" />
244
+                                <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_PenRed.png" />
251 245
                             </ControlTemplate>
252 246
                         </Button.Template>
253 247
                     </Button>
@@ -278,10 +272,10 @@
278 272
                                 <Image x:Name="BtnImages" Source="/SkinImages/SR/SR_Out.png" />
279 273
                                 <ControlTemplate.Triggers>
280 274
                                     <Trigger Property="IsMouseOver" Value="True">
281
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Out_MI.png" />
275
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
282 276
                                     </Trigger>
283 277
                                     <Trigger Property="IsEnabled" Value="False">
284
-                                        <Setter TargetName="BtnImages" Property="Source" Value="/SkinImages/SR/SR_Out_N.png" />
278
+                                        <Setter TargetName="BtnImages" Property="Opacity" Value="0.4" />
285 279
                                     </Trigger>
286 280
                                 </ControlTemplate.Triggers>
287 281
                             </ControlTemplate>
@@ -290,195 +284,5 @@
290 284
                 </Grid>
291 285
             </Grid>
292 286
         </Grid>
293
-        <Viewbox Visibility="Collapsed">
294
-            <StackPanel>
295
-                <Viewbox Visibility="Collapsed">
296
-                    <Grid x:Name="gridToobar" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
297
-                        <Image x:Name="imgCanvas" Visibility="Collapsed" />
298
-                        <InkCanvas
299
-                            x:Name="blackboard_canvas"
300
-                            Grid.RowSpan="2"
301
-                            Background="Transparent"
302
-                            Visibility="Collapsed" />
303
-                        <!--  画笔工具栏  -->
304
-                        <Grid x:Name="gridToolbar" Visibility="Collapsed">
305
-                            <Image HorizontalAlignment="Right" Source="./Images/Toobar22.png" />
306
-                            <StackPanel
307
-                                Margin="0,5,10,0"
308
-                                HorizontalAlignment="Right"
309
-                                Orientation="Vertical">
310
-                                <Button
311
-                                    x:Name="btnToolbarDown"
312
-                                    Margin="0,5,0,0"
313
-                                    Click="BtnToolbarDown_Click"
314
-                                    Cursor="Hand"
315
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
316
-                                    <Image Source="./Images/Toobar5.png" />
317
-                                </Button>
318
-                                <Button
319
-                                    x:Name="btnEraser"
320
-                                    Margin="0,5,0,0"
321
-                                    Click="BtnEraser_Click"
322
-                                    Cursor="Hand"
323
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
324
-                                    <Image Source="./Images/Toobar12.png" />
325
-                                </Button>
326
-                                <Button
327
-                                    x:Name="btnPen"
328
-                                    Margin="0,5,0,0"
329
-                                    Click="BtnPen_Click"
330
-                                    Cursor="Hand"
331
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
332
-                                    <Image Source="./Images/Toobar9.png" />
333
-                                </Button>
334
-                                <Button
335
-                                    Margin="0,5,0,0"
336
-                                    Cursor="Hand"
337
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
338
-                                    <Image Source="./Images/Toobar16.png" />
339
-                                </Button>
340
-                                <Button
341
-                                    x:Name="btnRectangle"
342
-                                    Margin="0,5,0,0"
343
-                                    Click="BtnRectangle_Click"
344
-                                    Cursor="Hand"
345
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
346
-                                    <Image Source="./Images/Toobar3.png" />
347
-                                </Button>
348
-                                <Button
349
-                                    x:Name="btnRound"
350
-                                    Margin="0,5,0,0"
351
-                                    Click="BtnRound_Click"
352
-                                    Cursor="Hand"
353
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
354
-                                    <Image Source="./Images/Toobar23.png" />
355
-                                </Button>
356
-                                <Button
357
-                                    x:Name="btnThickness"
358
-                                    Margin="0,5,0,0"
359
-                                    Click="BtnThickness_Click"
360
-                                    Cursor="Hand"
361
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
362
-                                    <Image Source="./Images/Toobar1.png" />
363
-                                </Button>
364
-                                <Button
365
-                                    x:Name="btnColour"
366
-                                    Margin="0,5,0,0"
367
-                                    Click="BtnColour_Click"
368
-                                    Cursor="Hand"
369
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
370
-                                    <Image Source="./Images/Toobar18.png" />
371
-                                </Button>
372
-                            </StackPanel>
373
-                        </Grid>
374
-                        <!--  字体颜色  -->
375
-                        <Grid x:Name="gridColour" Visibility="Collapsed">
376
-                            <Image
377
-                                Margin="0,200,62,0"
378
-                                HorizontalAlignment="Right"
379
-                                Source="./Images/Toobar20.png" />
380
-                            <StackPanel
381
-                                Margin="0,215,68,0"
382
-                                HorizontalAlignment="Right"
383
-                                Orientation="Vertical">
384
-                                <Button
385
-                                    x:Name="btnWhite"
386
-                                    Width="15"
387
-                                    Height="15"
388
-                                    Margin="0,0,0,0"
389
-                                    Background="#FFFFFF"
390
-                                    Click="BtnWhite_Click"
391
-                                    Cursor="Hand"
392
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
393
-                                <Button
394
-                                    x:Name="btnRed"
395
-                                    Width="15"
396
-                                    Height="15"
397
-                                    Margin="0,8,0,0"
398
-                                    Background="#FF0000"
399
-                                    Click="BtnRed_Click"
400
-                                    Cursor="Hand"
401
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
402
-                                <Button
403
-                                    x:Name="btnGray"
404
-                                    Width="15"
405
-                                    Height="15"
406
-                                    Margin="0,8,0,0"
407
-                                    Background="#A7A9AC"
408
-                                    Click="BtnGray_Click"
409
-                                    Cursor="Hand"
410
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
411
-                                <Button
412
-                                    x:Name="btnCyanBlue"
413
-                                    Width="15"
414
-                                    Height="15"
415
-                                    Margin="0,8,0,0"
416
-                                    Background="#63D600"
417
-                                    Click="BtnCyanBlue_Click"
418
-                                    Cursor="Hand"
419
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
420
-                                <Button
421
-                                    x:Name="btnYellow"
422
-                                    Width="15"
423
-                                    Height="15"
424
-                                    Margin="0,8,0,0"
425
-                                    Background="#FFBC00"
426
-                                    Click="BtnYellow_Click"
427
-                                    Cursor="Hand"
428
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
429
-                                <Button
430
-                                    x:Name="btnBlue"
431
-                                    Width="15"
432
-                                    Height="15"
433
-                                    Margin="0,8,0,0"
434
-                                    Background="#00B4FC"
435
-                                    Click="BtnBlue_Click"
436
-                                    Cursor="Hand"
437
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
438
-                            </StackPanel>
439
-                        </Grid>
440
-                        <!--  字体粗细  -->
441
-                        <Grid x:Name="gridThickness" Visibility="Collapsed">
442
-                            <Image
443
-                                Margin="0,200,62,0"
444
-                                HorizontalAlignment="Right"
445
-                                Source="./Images/Toobar21.png" />
446
-                            <StackPanel
447
-                                Margin="0,260,62,0"
448
-                                HorizontalAlignment="Right"
449
-                                Orientation="Vertical">
450
-                                <Button
451
-                                    x:Name="btnFine"
452
-                                    Width="20"
453
-                                    Height="3"
454
-                                    Margin="0,0,0,0"
455
-                                    Background="#FFFFFF"
456
-                                    Click="BtnFine_Click"
457
-                                    Cursor="Hand"
458
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
459
-                                <Button
460
-                                    x:Name="btnIn"
461
-                                    Width="20"
462
-                                    Height="5"
463
-                                    Margin="0,10,0,0"
464
-                                    Background="#FFFFFF"
465
-                                    Click="BtnIn_Click"
466
-                                    Cursor="Hand"
467
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
468
-                                <Button
469
-                                    x:Name="btnCrude"
470
-                                    Width="20"
471
-                                    Height="10"
472
-                                    Margin="0,10,0,0"
473
-                                    Background="#FFFFFF"
474
-                                    Click="BtnCrude_Click"
475
-                                    Cursor="Hand"
476
-                                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
477
-                            </StackPanel>
478
-                        </Grid>
479
-                    </Grid>
480
-                </Viewbox>
481
-            </StackPanel>
482
-        </Viewbox>
483 287
     </Grid>
484
-</Window>
288
+</Window>

+ 7
- 177
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

@@ -131,7 +131,7 @@ namespace XHWK.WKTool
131 131
             drawingAttributes = new DrawingAttributes();
132 132
             //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
133 133
             //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
134
-            blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
134
+
135 135
             drawingAttributes.FitToCurve = true;
136 136
             //隐藏画笔工具栏
137 137
             BtnRecordingScreen.Visibility = Visibility.Visible;
@@ -143,8 +143,7 @@ namespace XHWK.WKTool
143 143
             BtnPenRed.Visibility = Visibility.Visible;
144 144
             BtnPenBlue_CL.Visibility = Visibility.Collapsed;
145 145
             BtnPenRed_CL.Visibility = Visibility.Collapsed;
146
-            TxbTime.Content = "00:00";
147
-
146
+            TxbTime.Content = "00:00:00";
148 147
         }
149 148
 
150 149
         private void K_hook_KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e)
@@ -165,7 +164,6 @@ namespace XHWK.WKTool
165 164
 
166 165
         #region 事件
167 166
 
168
-
169 167
         private DateTime SRTime = Convert.ToDateTime("2020-01-01 00:00:00");
170 168
 
171 169
         /// <summary>
@@ -180,14 +178,7 @@ namespace XHWK.WKTool
180 178
                 SRTime = SRTime.AddMilliseconds(1000);
181 179
             }
182 180
 
183
-            if (SRTime.Hour > 0)
184
-            {
185
-                TxbTime.Content = SRTime.ToString("HH:mm:ss");
186
-            }
187
-            else
188
-            {
189
-                TxbTime.Content = SRTime.ToString("mm:ss");
190
-            }
181
+            TxbTime.Content = SRTime.ToString("HH:mm:ss");
191 182
         }
192 183
 
193 184
         /// <summary>
@@ -218,11 +209,9 @@ namespace XHWK.WKTool
218 209
                 VideoSavePathName = APP.WKData.WkPath + APP.WKData.WkName + "_录屏_" + num + "." + fileType;
219 210
             }
220 211
 
221
-
222 212
             TempVideoPathName = APP.WKData.WkPath + APP.WKData.WkName + "_录屏_" + num + ".avi";
223 213
             TempAudioPathName1 = APP.WKData.WkPath + APP.WKData.WkName + "_录屏_" + num + "_1.mp3";
224 214
             TempAudioPathName2 = APP.WKData.WkPath + APP.WKData.WkName + "_录屏_" + num + "_2.mp3";
225
-
226 215
         }
227 216
 
228 217
         /// <summary>
@@ -231,13 +220,13 @@ namespace XHWK.WKTool
231 220
         private bool IsPressButton = false;
232 221
 
233 222
         //录制麦克风的声音
234
-        ZAudioRecordHelper helper1 = null;
223
+        private ZAudioRecordHelper helper1 = null;
235 224
 
236 225
         //录制扬声器的声音
237
-        ZAudioRecordHelper helper2 = null;
226
+        private ZAudioRecordHelper helper2 = null;
238 227
 
239 228
         //桌面录制
240
-        ZVideoRecordHelper helper3 = null;
229
+        private ZVideoRecordHelper helper3 = null;
241 230
 
242 231
         public IntPtr winHandle;// 当前窗体指针
243 232
 
@@ -292,7 +281,6 @@ namespace XHWK.WKTool
292 281
                     WkType = Enum_WKVidetype.RecordingScreen
293 282
                 };
294 283
                 SetUpVideoPathName();
295
-       
296 284
 
297 285
                 if (APP.W_CountdownWindow == null)
298 286
                 {
@@ -305,8 +293,6 @@ namespace XHWK.WKTool
305 293
                 }
306 294
                 APP.W_CountdownWindow.Show();
307 295
 
308
-
309
-
310 296
                 BtnRecordingScreen.Visibility = Visibility.Collapsed;
311 297
                 BtnRecordingScreenPause.Visibility = Visibility.Visible;
312 298
                 BtnStopRecordingScreen.IsEnabled = true; //停止录制按钮可点击
@@ -354,8 +340,6 @@ namespace XHWK.WKTool
354 340
                         helper1.StartRecordAudio();
355 341
                         helper2.StartRecordAudio();
356 342
                         helper3.StartRecordVideo();
357
-
358
-                       
359 343
                     });
360 344
 
361 345
                     Thread.Sleep(1000);
@@ -364,7 +348,6 @@ namespace XHWK.WKTool
364 348
                     {
365 349
                         k_hook.Start();//安装键盘钩子
366 350
                     });
367
-                   
368 351
                 })
369 352
                 { IsBackground = true }.Start();
370 353
 
@@ -390,7 +373,6 @@ namespace XHWK.WKTool
390 373
                 BtnRecordingScreen.Visibility = Visibility.Collapsed;
391 374
                 BtnRecordingScreenPause.Visibility = Visibility.Visible;
392 375
             }
393
-
394 376
         }
395 377
 
396 378
         /// <summary>
@@ -501,7 +483,6 @@ namespace XHWK.WKTool
501 483
 
502 484
             SRTime = Convert.ToDateTime("2020-01-01 00:00:00");
503 485
             TxbTime.Content = "00:00";
504
-
505 486
         }
506 487
 
507 488
         public void MaxToobar()
@@ -518,19 +499,6 @@ namespace XHWK.WKTool
518 499
 
519 500
         #region 画笔相关
520 501
 
521
-        /// <summary>
522
-        /// 画笔工具栏关闭事件
523
-        /// </summary>
524
-        /// <param name="sender"></param>
525
-        /// <param name="e"></param>
526
-        private void BtnToolbarDown_Click(object sender, RoutedEventArgs e)
527
-        {
528
-            gridToolbar.Visibility = Visibility.Hidden;
529
-            gridColour.Visibility = Visibility.Hidden;
530
-            gridThickness.Visibility = Visibility.Hidden;
531
-            APP.W_PracticeWindow.Hide();
532
-        }
533
-
534 502
         /// <summary>
535 503
         /// 笔调用批注
536 504
         /// </summary>
@@ -749,142 +717,6 @@ namespace XHWK.WKTool
749 717
             return Convert.ToInt64(ts.TotalMilliseconds).ToString();
750 718
         }
751 719
 
752
-        /// <summary>
753
-        /// 画笔粗细事件
754
-        /// </summary>
755
-        /// <param name="sender"></param>
756
-        /// <param name="e"></param>
757
-        private void BtnThickness_Click(object sender, RoutedEventArgs e)
758
-        {
759
-            gridThickness.Visibility = Visibility.Visible;
760
-            gridColour.Visibility = Visibility.Collapsed;
761
-        }
762
-
763
-        /// <summary>
764
-        /// 画笔颜色事件
765
-        /// </summary>
766
-        /// <param name="sender"></param>
767
-        /// <param name="e"></param>
768
-        private void BtnColour_Click(object sender, RoutedEventArgs e)
769
-        {
770
-            gridColour.Visibility = Visibility.Visible;
771
-            gridThickness.Visibility = Visibility.Collapsed;
772
-        }
773
-
774
-        /// <summary>
775
-        /// 白色
776
-        /// </summary>
777
-        /// <param name="sender"></param>
778
-        /// <param name="e"></param>
779
-        private void BtnWhite_Click(object sender, RoutedEventArgs e)
780
-        {
781
-            //drawingAttributes.Color = Colors.White;
782
-            APP.W_PracticeWindow.White();
783
-            gridColour.Visibility = Visibility.Collapsed;
784
-            gridThickness.Visibility = Visibility.Collapsed;
785
-        }
786
-
787
-        /// <summary>
788
-        /// 红色
789
-        /// </summary>
790
-        /// <param name="sender"></param>
791
-        /// <param name="e"></param>
792
-        private void BtnRed_Click(object sender, RoutedEventArgs e)
793
-        {
794
-            //drawingAttributes.Color = Colors.Red;
795
-            APP.W_PracticeWindow.Red();
796
-            gridColour.Visibility = Visibility.Collapsed;
797
-            gridThickness.Visibility = Visibility.Collapsed;
798
-        }
799
-
800
-        /// <summary>
801
-        /// 黄色
802
-        /// </summary>
803
-        /// <param name="sender"></param>
804
-        /// <param name="e"></param>
805
-        private void BtnYellow_Click(object sender, RoutedEventArgs e)
806
-        {
807
-            //drawingAttributes.Color = Colors.Gold;
808
-            APP.W_PracticeWindow.Yellow();
809
-            gridColour.Visibility = Visibility.Collapsed;
810
-            gridThickness.Visibility = Visibility.Collapsed;
811
-        }
812
-
813
-        /// <summary>
814
-        /// 青色
815
-        /// </summary>
816
-        /// <param name="sender"></param>
817
-        /// <param name="e"></param>
818
-        private void BtnCyanBlue_Click(object sender, RoutedEventArgs e)
819
-        {
820
-            //drawingAttributes.Color = Colors.LimeGreen;
821
-            APP.W_PracticeWindow.CyanBlue();
822
-            gridColour.Visibility = Visibility.Collapsed;
823
-            gridThickness.Visibility = Visibility.Collapsed;
824
-        }
825
-
826
-        /// <summary>
827
-        /// 灰色
828
-        /// </summary>
829
-        /// <param name="sender"></param>
830
-        /// <param name="e"></param>
831
-        private void BtnGray_Click(object sender, RoutedEventArgs e)
832
-        {
833
-            //drawingAttributes.Color = Colors.Gray;
834
-            APP.W_PracticeWindow.Gray();
835
-            gridColour.Visibility = Visibility.Collapsed;
836
-            gridThickness.Visibility = Visibility.Collapsed;
837
-        }
838
-
839
-        /// <summary>
840
-        /// 蓝色
841
-        /// </summary>
842
-        /// <param name="sender"></param>
843
-        /// <param name="e"></param>
844
-        private void BtnBlue_Click(object sender, RoutedEventArgs e)
845
-        {
846
-            //drawingAttributes.Color = Colors.DeepSkyBlue;
847
-            APP.W_PracticeWindow.Blue();
848
-            gridColour.Visibility = Visibility.Collapsed;
849
-            gridThickness.Visibility = Visibility.Collapsed;
850
-        }
851
-
852
-        /// <summary>
853
-        /// 画笔 细
854
-        /// </summary>
855
-        /// <param name="sender"></param>
856
-        /// <param name="e"></param>
857
-        private void BtnFine_Click(object sender, RoutedEventArgs e)
858
-        {
859
-            APP.W_PracticeWindow.Fine();
860
-            gridColour.Visibility = Visibility.Collapsed;
861
-            gridThickness.Visibility = Visibility.Collapsed;
862
-        }
863
-
864
-        /// <summary>
865
-        /// 画笔 中
866
-        /// </summary>
867
-        /// <param name="sender"></param>
868
-        /// <param name="e"></param>
869
-        private void BtnIn_Click(object sender, RoutedEventArgs e)
870
-        {
871
-            APP.W_PracticeWindow.In();
872
-            gridColour.Visibility = Visibility.Collapsed;
873
-            gridThickness.Visibility = Visibility.Collapsed;
874
-        }
875
-
876
-        /// <summary>
877
-        /// 画笔粗
878
-        /// </summary>
879
-        /// <param name="sender"></param>
880
-        /// <param name="e"></param>
881
-        private void BtnCrude_Click(object sender, RoutedEventArgs e)
882
-        {
883
-            APP.W_PracticeWindow.Crude();
884
-            gridColour.Visibility = Visibility.Collapsed;
885
-            gridThickness.Visibility = Visibility.Collapsed;
886
-        }
887
-
888 720
         /// <summary>
889 721
         /// 橡皮
890 722
         /// </summary>
@@ -939,8 +771,6 @@ namespace XHWK.WKTool
939 771
         /// </summary>
940 772
         public event StopRecordingScreen Click_stopRecordingScreen;
941 773
 
942
-
943
-
944 774
         /// <summary>
945 775
         /// 移动工具栏
946 776
         /// </summary>
@@ -1061,7 +891,7 @@ namespace XHWK.WKTool
1061 891
                 {
1062 892
                     return;
1063 893
                 }
1064
-                BtnStopRecordingScreen_Click(null,null);
894
+                BtnStopRecordingScreen_Click(null, null);
1065 895
             }
1066 896
             APP.W_XHMicroLessonSystemWindow.InitializeKeyDownEvent();
1067 897
             APP.W_XHMicroLessonSystemWindow.InitPen();

BIN
XHWK.WKTool/SkinImages/SR/SR_Out.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Out_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Out_N.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Pause.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Pause_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenBlue.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenBlue_CL.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenBlue_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenBlue_N.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenRed.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenRed_CL.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenRed_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_PenRed_N.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Start.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Start_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Stop.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Stop_MI.png View File


BIN
XHWK.WKTool/SkinImages/SR/SR_Stop_N.png View File


+ 1
- 1
XHWK.WKTool/UControl/Uc_VideoItem.xaml View File

@@ -184,7 +184,7 @@
184 184
                                 Height="30"
185 185
                                 HorizontalAlignment="Stretch"
186 186
                                 VerticalAlignment="Stretch"
187
-                                Background="#FFC3C3C3"
187
+                                Background="#f85e5e"
188 188
                                 Click="BtnDelVideo_Click"
189 189
                                 Content="删除"
190 190
                                 Cursor="Hand"

+ 2
- 3
XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs View File

@@ -350,10 +350,9 @@ namespace XHWK.WKTool.UControl
350 350
             if ("上传成功".Equals(text))
351 351
             {
352 352
                 W_UploadWindow.Close();
353
-                //BtnUpload.Visibility = Visibility.Hidden;
354
-                BorUploadBtn.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#DDDDDD"));
355
-                BtnUpload.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999"));
353
+                //BorUploadBtn.Visibility = Visibility.Hidden;
356 354
                 BtnUpload.IsEnabled = false;
355
+                BtnUpload.Background.Opacity = 0.6;
357 356
             }
358 357
         }
359 358
         /// <summary>

+ 3
- 1
XHWK.WKTool/Welcome.xaml.cs View File

@@ -12,6 +12,8 @@ namespace XHWK.WKTool
12 12
         {
13 13
             InitializeComponent();
14 14
 
15
+            //new DeviceWindow().Show();
16
+            //Close();
15 17
 
16 18
             if (!File.Exists(APP.DataPath + "signature.txt"))//上次登录时间为空 或者签名为空 或者上次登录时间不是今天   都需要输入密匙验证 ,否则只验证本地的签名
17 19
             {
@@ -25,4 +27,4 @@ namespace XHWK.WKTool
25 27
             }
26 28
         }
27 29
     }
28
-}
30
+}

+ 17
- 281
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

@@ -98,136 +98,7 @@
98 98
                 </Setter.Value>
99 99
             </Setter>
100 100
         </Style>
101
-        <DataTemplate x:Key="TongjiItem">
102
-            <UniformGrid
103
-                Height="50"
104
-                Margin="0,0,0,0"
105
-                Background="{Binding Colour}"
106
-                Columns="5"
107
-                Rows="1">
108
-                <!--  题号  -->
109
-                <TextBlock
110
-                    HorizontalAlignment="Center"
111
-                    VerticalAlignment="Center"
112
-                    FontSize="16"
113
-                    Text="{Binding SerialNumber}" />
114
-                <Grid>
115
-                    <StackPanel
116
-                        HorizontalAlignment="Center"
117
-                        VerticalAlignment="Center"
118
-                        Orientation="Horizontal">
119
-                        <TextBox
120
-                            Width="150"
121
-                            Height="30"
122
-                            Padding="0,5,0,0"
123
-                            HorizontalAlignment="Center"
124
-                            VerticalAlignment="Center"
125
-                            FontSize="16"
126
-                            IsEnabled="{Binding IsEnabled, Mode=TwoWay}"
127
-                            Text="{Binding VideoName, Mode=TwoWay}" />
128
-                        <Button
129
-                            x:Name="btnModify"
130
-                            Background="Transparent"
131
-                            BorderThickness="0"
132
-                            Click="BtnModify_Click"
133
-                            Cursor="Hand">
134
-                            <Grid>
135
-                                <Image
136
-                                    Height="20"
137
-                                    Margin="6,6,6,6"
138
-                                    Source="./Images/fileDirectory3.png" />
139
-                                <Image
140
-                                    Height="20"
141
-                                    Margin="6,6,6,6"
142
-                                    Source="./Images/fileDirectory4.png" />
143
-                            </Grid>
144
-                        </Button>
145
-                    </StackPanel>
146
-                </Grid>
147
-
148
-                <!--  分值  -->
149
-                <!--
150
-                <TextBlock
151
-                    HorizontalAlignment="Center"
152
-                    VerticalAlignment="Center"
153
-                    FontSize="15"
154
-                    Text="{Binding VideoDuration}" />-->
155
-
156
-                <!--  平均时长  -->
157
-                <TextBlock
158
-                    HorizontalAlignment="Center"
159
-                    VerticalAlignment="Center"
160
-                    FontSize="16"
161
-                    Text="{Binding VideoSize}" />
162
-                <!--  最短时长  -->
163
-                <TextBlock
164
-                    HorizontalAlignment="Center"
165
-                    VerticalAlignment="Center"
166
-                    FontSize="16"
167
-                    Text="{Binding VideoTime}" />
168 101
 
169
-                <Grid>
170
-                    <StackPanel
171
-                        HorizontalAlignment="Center"
172
-                        VerticalAlignment="Center"
173
-                        Orientation="Horizontal">
174
-                        <Button
175
-                            x:Name="btnPlay"
176
-                            Background="Transparent"
177
-                            BorderThickness="0"
178
-                            Click="BtnPlay_Click"
179
-                            Cursor="Hand">
180
-                            <Grid>
181
-                                <Image
182
-                                    Height="20"
183
-                                    Margin="10"
184
-                                    Source="./Images/fileDirectory1.png" />
185
-                                <Image
186
-                                    Height="20"
187
-                                    Margin="10"
188
-                                    Source="./Images/fileDirectory2.png" />
189
-                            </Grid>
190
-                        </Button>
191
-                        <Button
192
-                            x:Name="btnUpload"
193
-                            Background="Transparent"
194
-                            BorderThickness="0"
195
-                            Click="BtnUploads_Click"
196
-                            Cursor="Hand">
197
-                            <Grid>
198
-                                <Image
199
-                                    Height="20"
200
-                                    Margin="6,6,6,6"
201
-                                    Source="./Images/fileDirectory7.png"
202
-                                    Visibility="{Binding Visi}" />
203
-                                <Image
204
-                                    Height="20"
205
-                                    Margin="6,6,6,6"
206
-                                    Source="./Images/fileDirectory8.png"
207
-                                    Visibility="{Binding Coll}" />
208
-                            </Grid>
209
-                        </Button>
210
-                        <Button
211
-                            x:Name="btnDelete"
212
-                            Background="Transparent"
213
-                            BorderThickness="0"
214
-                            Click="BtnDelete_Click"
215
-                            Cursor="Hand">
216
-                            <Grid>
217
-                                <Image
218
-                                    Height="20"
219
-                                    Margin="6,6,6,6"
220
-                                    Source="./Images/fileDirectory5.png" />
221
-                                <Image
222
-                                    Height="20"
223
-                                    Margin="6,6,6,6"
224
-                                    Source="./Images/fileDirectory6.png" />
225
-                            </Grid>
226
-                        </Button>
227
-                    </StackPanel>
228
-                </Grid>
229
-            </UniformGrid>
230
-        </DataTemplate>
231 102
         <!--  摄像头样式  -->
232 103
         <Style x:Key="stlToggleButton" TargetType="ToggleButton">
233 104
             <Setter Property="Foreground" Value="White" />
@@ -1355,7 +1226,7 @@
1355 1226
                         <Grid Height="650">
1356 1227
                             <Grid Background="#FFFFFF">
1357 1228
                                 <Grid.RowDefinitions>
1358
-                                    <RowDefinition Height="200" />
1229
+                                    <RowDefinition Height="146" />
1359 1230
                                     <RowDefinition Height="160*" />
1360 1231
                                     <RowDefinition Height="100*" />
1361 1232
                                     <RowDefinition Height="200*" />
@@ -1372,7 +1243,7 @@
1372 1243
                                     </Grid.RowDefinitions>
1373 1244
                                     <Grid Grid.Row="1" Grid.Column="0">
1374 1245
                                         <Grid.ColumnDefinitions>
1375
-                                            <ColumnDefinition Width="215*" />
1246
+                                            <ColumnDefinition Width="100" />
1376 1247
                                             <ColumnDefinition Width="646*" />
1377 1248
                                         </Grid.ColumnDefinitions>
1378 1249
                                         <TextBlock
@@ -1385,15 +1256,15 @@
1385 1256
                                     </Grid>
1386 1257
                                     <Grid Grid.Row="2">
1387 1258
                                         <Grid.ColumnDefinitions>
1388
-                                            <ColumnDefinition Width="120*" />
1259
+                                            <ColumnDefinition Width="100" />
1389 1260
                                             <ColumnDefinition Width="207*" />
1390 1261
                                             <ColumnDefinition Width="207*" />
1391 1262
                                             <ColumnDefinition Width="207*" />
1392 1263
                                             <ColumnDefinition Width="120*" />
1393 1264
                                         </Grid.ColumnDefinitions>
1394 1265
                                         <Grid.RowDefinitions>
1395
-                                            <RowDefinition Height="100*" />
1396
-                                            <RowDefinition Height="36*" />
1266
+                                            <RowDefinition Height="80" />
1267
+                                            <RowDefinition Height="36" />
1397 1268
                                         </Grid.RowDefinitions>
1398 1269
                                         <Grid
1399 1270
                                             Grid.Row="0"
@@ -1458,8 +1329,7 @@
1458 1329
                                                 Source="/SkinImages/Skin/Skin_Select.png"
1459 1330
                                                 Visibility="Hidden" />
1460 1331
                                         </Grid>
1461
-                                        <Grid Grid.Row="0" Grid.Column="3" />
1462
-                                        <Grid Grid.Row="0" Grid.Column="4" />
1332
+
1463 1333
                                         <Grid Grid.Row="1" Grid.Column="1">
1464 1334
                                             <TextBlock
1465 1335
                                                 HorizontalAlignment="Center"
@@ -1476,8 +1346,7 @@
1476 1346
                                                 Foreground="#333333"
1477 1347
                                                 Text="科技蓝" />
1478 1348
                                         </Grid>
1479
-                                        <Grid Grid.Row="1" Grid.Column="3" />
1480
-                                        <Grid Grid.Row="1" Grid.Column="4" />
1349
+
1481 1350
                                     </Grid>
1482 1351
 
1483 1352
                                     <Label
@@ -1490,7 +1359,7 @@
1490 1359
                                 <Grid Grid.Row="1" Margin="100,0">
1491 1360
                                     <Grid>
1492 1361
                                         <Grid.ColumnDefinitions>
1493
-                                            <ColumnDefinition Width="215*" />
1362
+                                            <ColumnDefinition Width="100" />
1494 1363
                                             <ColumnDefinition Width="215*" />
1495 1364
                                             <ColumnDefinition Width="215*" />
1496 1365
                                             <ColumnDefinition Width="216*" />
@@ -1534,7 +1403,8 @@
1534 1403
                                                     Cursor="Hand"
1535 1404
                                                     FontSize="{Binding WordSize16}"
1536 1405
                                                     Foreground="#333333"
1537
-                                                    Style="{StaticResource radBase}" />
1406
+                                                    Style="{StaticResource radBase}"
1407
+                                                    Visibility="Collapsed" />
1538 1408
                                                 <RadioButton
1539 1409
                                                     x:Name="rbnAVI"
1540 1410
                                                     Margin="15,0,0,0"
@@ -1671,7 +1541,7 @@
1671 1541
                                 <Grid Grid.Row="2" Margin="100,0">
1672 1542
                                     <Grid>
1673 1543
                                         <Grid.ColumnDefinitions>
1674
-                                            <ColumnDefinition Width="215*" />
1544
+                                            <ColumnDefinition Width="100" />
1675 1545
                                             <ColumnDefinition Width="430*" />
1676 1546
                                             <ColumnDefinition Width="215*" />
1677 1547
                                         </Grid.ColumnDefinitions>
@@ -1706,7 +1576,7 @@
1706 1576
                                                         BorderBrush="{x:Null}"
1707 1577
                                                         BorderThickness="0"
1708 1578
                                                         Content="D:\"
1709
-                                                        FontSize="{Binding WordSize12}"
1579
+                                                        FontSize="{Binding WordSize14}"
1710 1580
                                                         Foreground="#333333" />
1711 1581
                                                 </Border>
1712 1582
                                             </Grid>
@@ -1755,7 +1625,7 @@
1755 1625
                                 <!--  版权 快捷键 版本号 h200  -->
1756 1626
                                 <Grid Grid.Row="3" Margin="100,0">
1757 1627
                                     <Grid.ColumnDefinitions>
1758
-                                        <ColumnDefinition Width="215*" />
1628
+                                        <ColumnDefinition Width="100" />
1759 1629
                                         <ColumnDefinition Width="215*" />
1760 1630
                                         <ColumnDefinition Width="215*" />
1761 1631
                                         <ColumnDefinition Width="215*" />
@@ -1814,7 +1684,7 @@
1814 1684
                                             VerticalAlignment="Center"
1815 1685
                                             FontSize="{Binding WordSize16}"
1816 1686
                                             Foreground="#FF666666"
1817
-                                            Text="正式版" />
1687
+                                            Text="正式版" />
1818 1688
                                     </Grid>
1819 1689
                                     <Grid Grid.Row="3" Grid.Column="1">
1820 1690
                                         <TextBlock
@@ -1831,11 +1701,11 @@
1831 1701
                                     <Grid.ColumnDefinitions>
1832 1702
                                         <ColumnDefinition Width="215*" />
1833 1703
                                         <ColumnDefinition Width="530*" />
1834
-                                        <ColumnDefinition Width="115*" />
1704
+                                        <ColumnDefinition Width="180*" />
1835 1705
                                     </Grid.ColumnDefinitions>
1836 1706
                                     <Grid.RowDefinitions>
1837 1707
                                         <RowDefinition Height="50*" />
1838
-                                        <RowDefinition Height="40*" />
1708
+
1839 1709
                                     </Grid.RowDefinitions>
1840 1710
                                     <Grid Grid.Column="2">
1841 1711
                                         <!--  保存  -->
@@ -1844,7 +1714,7 @@
1844 1714
                                             Width="76"
1845 1715
                                             Height="30"
1846 1716
                                             HorizontalAlignment="Stretch"
1847
-                                            VerticalAlignment="Stretch"
1717
+                                            VerticalAlignment="Center"
1848 1718
                                             Background="#3f6fff"
1849 1719
                                             Click="BtnSave_Click"
1850 1720
                                             Content="保存"
@@ -1877,141 +1747,7 @@
1877 1747
                             </Grid>
1878 1748
                         </Grid>
1879 1749
                     </ScrollViewer>
1880
-                    <!--  上传  废弃  -->
1881
-                    <Grid x:Name="gridUpload" Visibility="Collapsed">
1882
-                        <Border Background="#EFF1F8">
1883
-                            <Grid Margin="0,0,0,0" Background="#FFFFFF">
1884
-                                <!--  分4行  -->
1885
-                                <Grid.RowDefinitions>
1886
-                                    <RowDefinition Height="*" />
1887
-                                    <RowDefinition Height="30" />
1888
-                                </Grid.RowDefinitions>
1889
-                                <!--  第二行 内容  -->
1890
-                                <Grid Grid.Row="0" Margin="0,0,0,0">
1891
-                                    <Grid.RowDefinitions>
1892
-                                        <RowDefinition Height="45" />
1893
-                                        <RowDefinition Height="*" />
1894
-                                    </Grid.RowDefinitions>
1895
-                                    <UniformGrid
1896
-                                        x:Name="uniStatisticsByTitle"
1897
-                                        Grid.Row="0"
1898
-                                        Margin="0,0,0,0"
1899
-                                        Background="#E6F0FF"
1900
-                                        Columns="5"
1901
-                                        Rows="1">
1902
-                                        <TextBlock
1903
-                                            HorizontalAlignment="Center"
1904
-                                            VerticalAlignment="Center"
1905
-                                            FontSize="16"
1906
-                                            Text="序号" />
1907
-                                        <TextBlock
1908
-                                            HorizontalAlignment="Center"
1909
-                                            VerticalAlignment="Center"
1910
-                                            FontSize="16"
1911
-                                            Text="视频名称" />
1912 1750
 
1913
-                                        <TextBlock
1914
-                                            HorizontalAlignment="Center"
1915
-                                            VerticalAlignment="Center"
1916
-                                            FontSize="16"
1917
-                                            Text="视频大小" />
1918
-                                        <TextBlock
1919
-                                            HorizontalAlignment="Center"
1920
-                                            VerticalAlignment="Center"
1921
-                                            FontSize="16"
1922
-                                            Text="日期" />
1923
-                                        <TextBlock
1924
-                                            HorizontalAlignment="Center"
1925
-                                            VerticalAlignment="Center"
1926
-                                            FontSize="16"
1927
-                                            Text="操作" />
1928
-                                    </UniformGrid>
1929
-                                    <ListBox
1930
-                                        x:Name="listView1"
1931
-                                        Grid.Row="1"
1932
-                                        Margin="0,0,0,0"
1933
-                                        BorderThickness="0"
1934
-                                        FontSize="20"
1935
-                                        ItemContainerStyle="{StaticResource ListBoxItemContainerStyle}"
1936
-                                        ItemTemplate="{StaticResource TongjiItem}"
1937
-                                        ItemsSource="{Binding menuList}"
1938
-                                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
1939
-                                        ScrollViewer.VerticalScrollBarVisibility="Disabled" />
1940
-                                </Grid>
1941
-                                <StackPanel
1942
-                                    x:Name="stpUp"
1943
-                                    Grid.Row="3"
1944
-                                    Grid.Column="1"
1945
-                                    Width="180"
1946
-                                    Height="30"
1947
-                                    Margin="0,0,0,0"
1948
-                                    HorizontalAlignment="Center"
1949
-                                    VerticalAlignment="Bottom"
1950
-                                    Background="Transparent"
1951
-                                    Orientation="Horizontal">
1952
-                                    <Button
1953
-                                        x:Name="btnLastPage"
1954
-                                        Width="60"
1955
-                                        Height="20"
1956
-                                        Click="BtnLastPage_Click"
1957
-                                        Cursor="Hand"
1958
-                                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
1959
-                                        <StackPanel>
1960
-                                            <Image
1961
-                                                Width="16"
1962
-                                                Height="12"
1963
-                                                Source=".\Images\class_p1.png" />
1964
-                                        </StackPanel>
1965
-                                    </Button>
1966
-                                    <Grid Width="60" Background="Transparent">
1967
-                                        <Grid.RowDefinitions>
1968
-                                            <RowDefinition Height="311*" />
1969
-                                            <RowDefinition Height="483*" />
1970
-                                        </Grid.RowDefinitions>
1971
-                                        <StackPanel
1972
-                                            Grid.Row="1"
1973
-                                            Margin="0,-12,0,0"
1974
-                                            HorizontalAlignment="Center"
1975
-                                            VerticalAlignment="Center"
1976
-                                            Background="Transparent">
1977
-                                            <StackPanel
1978
-                                                HorizontalAlignment="Center"
1979
-                                                Background="Transparent"
1980
-                                                Orientation="Horizontal">
1981
-                                                <TextBlock
1982
-                                                    x:Name="txbCurrpageTwo"
1983
-                                                    FontSize="15"
1984
-                                                    TextAlignment="Center" />
1985
-                                                <TextBlock
1986
-                                                    FontSize="15"
1987
-                                                    Text="/"
1988
-                                                    TextAlignment="Center" />
1989
-                                                <TextBlock
1990
-                                                    x:Name="txbPageNumTwo"
1991
-                                                    FontSize="15"
1992
-                                                    TextAlignment="Center" />
1993
-                                            </StackPanel>
1994
-                                        </StackPanel>
1995
-                                    </Grid>
1996
-                                    <Button
1997
-                                        x:Name="btnNextPage"
1998
-                                        Width="60"
1999
-                                        Height="20"
2000
-                                        Background="Transparent"
2001
-                                        Click="BtnNextPage_Click"
2002
-                                        Cursor="Hand"
2003
-                                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
2004
-                                        <StackPanel>
2005
-                                            <Image
2006
-                                                Width="16"
2007
-                                                Height="12"
2008
-                                                Source=".\Images\class_p2.png" />
2009
-                                        </StackPanel>
2010
-                                    </Button>
2011
-                                </StackPanel>
2012
-                            </Grid>
2013
-                        </Border>
2014
-                    </Grid>
2015 1751
                     <!--  我的  -->
2016 1752
                     <Grid
2017 1753
                         x:Name="GridMyVideo"

+ 5
- 488
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

@@ -303,8 +303,6 @@ namespace XHWK.WKTool
303 303
         {
304 304
             //设置
305 305
             gridSetUp.Visibility = Visibility.Collapsed;
306
-            //上传-无用
307
-            gridUpload.Visibility = Visibility.Collapsed;
308 306
             ////页码
309 307
             //GridPage.Visibility = Visibility.Collapsed;
310 308
             //我的
@@ -2187,7 +2185,7 @@ namespace XHWK.WKTool
2187 2185
                 GridMain.Visibility = Visibility.Visible;
2188 2186
                 GridM.IsEnabled = true;
2189 2187
                 GridRecordingTitle.Visibility = Visibility.Visible;
2190
-               
2188
+
2191 2189
             }
2192 2190
             else
2193 2191
             {
@@ -2195,7 +2193,7 @@ namespace XHWK.WKTool
2195 2193
                 GridMyVideo.Visibility = Visibility.Visible;
2196 2194
                 LoadUploadInitData();
2197 2195
             }
2198
-     
2196
+
2199 2197
         }
2200 2198
 
2201 2199
         /// <summary>
@@ -2209,98 +2207,11 @@ namespace XHWK.WKTool
2209 2207
             IsModify = false;
2210 2208
             //加载视频列表
2211 2209
             LoadingVideoList();
2212
-            int i = 1;
2213
-            bool isColour = true;
2214
-            pageData.menuList.Clear();
2215
-            //显示视频
2216
-            foreach (Model_Video videoinfo in model_VideoList)
2217
-            {
2218
-                //是否已上传
2219
-                //videoinfo.IsUpload;
2220
-                //录制时间
2221
-                //videoinfo.RSTime;
2222
-                //文件大小
2223
-                //videoinfo.VideoSize;
2224
-                //文件缩略图路径
2225
-                //videoinfo.ThumbnailPath;
2226
-                //文件唯一标示 上传事件筛选需要上传的视频
2227
-                //videoinfo.FileGuid;
2228
-                //文件存储路径
2229
-                //videoinfo.VidePath;
2230
-
2231
-                string colour = "#FFFFFF";
2232
-                if (isColour == true)
2233
-                {
2234
-                    colour = "#FFFFFF";
2235
-                    isColour = false;
2236
-                }
2237
-                else
2238
-                {
2239
-                    colour = "#E6F1FF";
2240
-                    isColour = true;
2241
-                }
2242
-                string vis = "Visible";
2243
-                string cos = "Collapsed";
2244
-                if (!videoinfo.IsUpload)
2245
-                {
2246
-                    vis = "Collapsed";
2247
-                    cos = "Visible";
2248
-                }
2249
-                //if(i==1)//ceshi
2250
-                //{
2251
-                //    vis = "Visible";
2252
-                //    cos = "Collapsed";
2253
-                //}
2254
-                if (i <= 16)
2255
-                {
2256
-                    pageData.menuList.Add(new FileDirectoryModel()
2257
-                    {
2258
-                        SerialNumber = i,
2259
-                        VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2260
-                        Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2261
-                        FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
2262
-                        VideoDuration = 0,
2263
-                        VideoSize = videoinfo.VideoSize,
2264
-                        VideoTime = videoinfo.RSTime,
2265
-                        IsEnabled = false,
2266
-                        Path = videoinfo.VideoPath,
2267
-                        Colour = colour,
2268
-                        Visi = vis,
2269
-                        Coll = cos,
2270
-                        FileGuid = videoinfo.FileGuid,
2271
-                        VideoType = videoinfo.VideoType.ToString(),
2272
-                        VideoSizes = videoinfo.VideoSizebyte
2273
-                    }); ;
2274
-                }
2275
-                i++;
2276
-            }
2210
+
2211
+
2277 2212
             Currpage = 0;
2278 2213
             PageNum = 0;
2279
-            if (pageData.menuList.Count > 0)
2280
-            {
2281
-                Currpage = 1;
2282
-                txbCurrpageTwo.Text = Currpage.ToString();
2283
-                stpUp.Visibility = Visibility.Visible;
2284
-            }
2285
-            else
2286
-            {
2287
-                stpUp.Visibility = Visibility.Hidden;
2288
-            }
2289
-            PageNum = model_VideoList.Count;
2290
-            if (PageNum > 0)
2291
-            {
2292
-                int t = 1;
2293
-                while (PageNum > 16 * t)
2294
-                {
2295
-                    t++;
2296
-                }
2297
-                PageNum = t;
2298
-            }
2299
-            else
2300
-            {
2301
-                PageNum = 0;
2302
-            }
2303
-            txbPageNumTwo.Text = PageNum.ToString();
2214
+
2304 2215
             APP.myloading.Hide();
2305 2216
             DataContext = pageData;
2306 2217
         }
@@ -2367,154 +2278,8 @@ namespace XHWK.WKTool
2367 2278
             }
2368 2279
         }
2369 2280
 
2370
-        ////定义事件
2371
-        //public event ChangeTextHandler ChangeTextEvents;
2372
-        /// <summary>
2373
-        /// 上传
2374
-        /// </summary>
2375
-        /// <param name="sender"></param>
2376
-        /// <param name="e"></param>
2377
-        private void BtnUploads_Click(object sender, RoutedEventArgs e)
2378
-        {
2379
-            Console.WriteLine("Subscript:" + Subscript);
2380
-            if (APP.IsLoginType == false)
2381
-            {
2382
-                Login();
2383
-                return;
2384
-            }
2385 2281
 
2386
-         
2387
-            pageData.menuList[Subscript].IsEnabled = false;
2388
-            List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnUpload");
2389
-            for (int i = 0; i < buttons.Count; i++)
2390
-            {
2391
-                if (buttons[i] == sender)
2392
-                {
2393
-                    DAL_Upload dAL_Upload = new DAL_Upload();
2394 2282
 
2395
-                    if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
2396
-                    {
2397
-                        //MessageWindow.Show("视频上传服务器成功!");
2398
-                        if (APP.W_UploadWindow == null)
2399
-                        {
2400
-                            APP.W_UploadWindow = new UploadWindow
2401
-                            {
2402
-                                Owner = this
2403
-                            };
2404
-                            APP.W_UploadWindow.ChangeTextEvents += new ChangeTextHandlers(frm_ChangeTextEvents);
2405
-                        }
2406
-
2407
-                        //long size = Convert.ToInt64(FileToolsCommon.GetFileSizeByMB(pageData.menuList[i].FilePath));
2408
-                        APP.W_UploadWindow.Initialize(pageData.menuList[i].VideoName, pageData.menuList[i].VideoSizes, pageData.menuList[i].VideoType, pageData.menuList[i].FileGuid, i);
2409
-                        APP.W_UploadWindow.ShowDialog();
2410
-                    }
2411
-                    else
2412
-                    {
2413
-                        MessageWindow.Show(ErrMessage);
2414
-                    }
2415
-                }
2416
-            }
2417
-        }
2418
-
2419
-        /// <summary>
2420
-        /// 上传返回事件
2421
-        /// </summary>
2422
-        /// <param name="text"></param>
2423
-        private void frm_ChangeTextEvents(string text, int i)
2424
-        {
2425
-            if ("上传成功".Equals(text))
2426
-            {
2427
-                pageData.menuList[i].Visi = "Visible";
2428
-                pageData.menuList[i].Coll = "Collapsed";
2429
-
2430
-                DataContext = pageData;
2431
-            }
2432
-        }
2433
-
2434
-        /// <summary>
2435
-        /// 删除
2436
-        /// </summary>
2437
-        /// <param name="sender"></param>
2438
-        /// <param name="e"></param>
2439
-        private void BtnDelete_Click(object sender, RoutedEventArgs e)
2440
-        {
2441
-            MessageBoxResult dr = MessageWindow.Show("确定删除该视频?", "提示", MessageBoxButton.OKCancel);
2442
-            if (dr == MessageBoxResult.OK)
2443
-            {
2444
-                pageData.menuList[Subscript].IsEnabled = false;
2445
-                List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnDelete");
2446
-                for (int i = 0; i < buttons.Count; i++)
2447
-                {
2448
-                    if (buttons[i] == sender)
2449
-                    {
2450
-                        //if (APP.W_PromptWindow == null)
2451
-                        //{
2452
-                        //    APP.W_PromptWindow = new PromptWindow();
2453
-                        //    APP.W_PromptWindow.Owner = this;
2454
-                        //}
2455
-                        //APP.W_PromptWindow.Initialize(pageData.menuList[i].VideoName);
2456
-                        //APP.W_PromptWindow.ShowDialog();
2457
-
2458
-                        foreach (Model_WKData wKData in APP.WKDataList)
2459
-                        {
2460
-                            if (wKData.VideoList == null)
2461
-                            {
2462
-                                continue;
2463
-                            }
2464
-
2465
-                            if (wKData.VideoList.Exists(x => x.FileGuid == pageData.menuList[i].FileGuid))
2466
-                            {
2467
-                                try
2468
-                                {
2469
-                                    FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).VideoPath);
2470
-                                    FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).ThumbnailPath);
2471
-                                    wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid));
2472
-                                    InitializeUpload();
2473
-                                    return;
2474
-                                }
2475
-                                catch (Exception ex)
2476
-                                {
2477
-                                    MessageWindow.Show("无法删除视频!" + ex.Message);
2478
-                                    return;
2479
-                                }
2480
-                            }
2481
-                        }
2482
-                    }
2483
-                }
2484
-            }
2485
-        }
2486
-
2487
-        /// <summary>
2488
-        /// 播放
2489
-        /// </summary>
2490
-        /// <param name="sender"></param>
2491
-        /// <param name="e"></param>
2492
-        private void BtnPlay_Click(object sender, RoutedEventArgs e)
2493
-        {
2494
-            pageData.menuList[Subscript].IsEnabled = false;
2495
-            List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnPlay");
2496
-            for (int i = 0; i < buttons.Count; i++)
2497
-            {
2498
-                if (buttons[i] == sender)
2499
-                {
2500
-                    try
2501
-                    {
2502
-                        ProcessStartInfo psi = new ProcessStartInfo(pageData.menuList[i].Path);
2503
-                        Process pro = new Process
2504
-                        {
2505
-                            StartInfo = psi
2506
-                        };
2507
-                        pro.Start();
2508
-                    }
2509
-                    catch (Exception ex)
2510
-                    {
2511
-                        LogHelper.WriteErrLog("FileDirectoryWindow【BtnPlay_Click】" + ex.Message, ex);
2512
-                        System.Windows.MessageBox.Show(ex.Message);
2513
-                        return;
2514
-                    }
2515
-                }
2516
-            }
2517
-        }
2518 2283
 
2519 2284
         /// <summary>
2520 2285
         /// 搜索集合匹配的索引
@@ -2566,247 +2331,6 @@ namespace XHWK.WKTool
2566 2331
             return list;
2567 2332
         }
2568 2333
 
2569
-        /// <summary>
2570
-        /// 修改
2571
-        /// </summary>
2572
-        /// <param name="sender"></param>
2573
-        /// <param name="e"></param>
2574
-        private void BtnModify_Click(object sender, RoutedEventArgs e)
2575
-        {
2576
-            if (IsModify)
2577
-            {
2578
-                try
2579
-                {
2580
-                    string newName = pageData.menuList[Subscript].VideoName + "." + pageData.menuList[Subscript].VideoType;
2581
-                    bool isName = ModifyPathName(pageData.menuList[Subscript].FileGuid, newName, out string Errmessage);
2582
-                    if (!isName)
2583
-                    {
2584
-                        MessageWindow.Show(Errmessage);
2585
-                    }
2586
-                }
2587
-                catch (Exception ex)
2588
-                {
2589
-                    LogHelper.WriteErrLog("XHMicroLessonSystemWindow(BtnModify_Click)" + ex.Message, ex);
2590
-                }
2591
-                IsModify = false;
2592
-                pageData.menuList[Subscript].IsEnabled = false;
2593
-                listView1.DataContext = pageData;
2594
-            }
2595
-            else
2596
-            {
2597
-                List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnModify");
2598
-                for (int i = 0; i < buttons.Count; i++)
2599
-                {
2600
-                    if (buttons[i] == sender)
2601
-                    {
2602
-                        pageData.menuList[i].IsEnabled = true;
2603
-                        Subscript = i;
2604
-                        IsModify = true;
2605
-                    }
2606
-                }
2607
-            }
2608
-        }
2609
-
2610
-        //private int MouseNumber = 0;
2611
-        /// <summary>
2612
-        /// 上传 上页
2613
-        /// </summary>
2614
-        /// <param name="sender"></param>
2615
-        /// <param name="e"></param>
2616
-        private void BtnLastPage_Click(object sender, RoutedEventArgs e)
2617
-        {
2618
-            if (Currpage > 1)
2619
-            {
2620
-                Currpage -= 1;
2621
-                txbCurrpageTwo.Text = Currpage.ToString();
2622
-                int i = 1;
2623
-                bool isColour = true;
2624
-                pageData.menuList.Clear();
2625
-                //显示视频
2626
-                foreach (Model_Video videoinfo in model_VideoList)
2627
-                {
2628
-                    //是否已上传
2629
-                    //videoinfo.IsUpload;
2630
-                    //录制时间
2631
-                    //videoinfo.RSTime;
2632
-                    //文件大小
2633
-                    //videoinfo.VideoSize;
2634
-                    //文件缩略图路径
2635
-                    //videoinfo.ThumbnailPath;
2636
-                    //文件唯一标示 上传事件筛选需要上传的视频
2637
-                    //videoinfo.FileGuid;
2638
-                    //文件存储路径
2639
-                    //videoinfo.VidePath;
2640
-
2641
-                    string colour = "#FFFFFF";
2642
-                    if (isColour == true)
2643
-                    {
2644
-                        colour = "#FFFFFF";
2645
-                        isColour = false;
2646
-                    }
2647
-                    else
2648
-                    {
2649
-                        colour = "#E6F1FF";
2650
-                        isColour = true;
2651
-                    }
2652
-                    string vis = "Visible";
2653
-                    string cos = "Collapsed";
2654
-                    if (!videoinfo.IsUpload)
2655
-                    {
2656
-                        vis = "Collapsed";
2657
-                        cos = "Visible";
2658
-                    }
2659
-                    if (i <= Currpage * 16 && i >= (Currpage - 1) * 16)
2660
-                    {
2661
-                        pageData.menuList.Add(new FileDirectoryModel()
2662
-                        {
2663
-                            SerialNumber = i,
2664
-                            VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2665
-                            Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2666
-                            FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
2667
-                            VideoDuration = 0,
2668
-                            VideoSize = videoinfo.VideoSize,
2669
-                            VideoTime = videoinfo.RSTime,
2670
-                            IsEnabled = false,
2671
-                            Path = videoinfo.VideoPath,
2672
-                            Colour = colour,
2673
-                            Visi = vis,
2674
-                            Coll = cos,
2675
-                            FileGuid = videoinfo.FileGuid,
2676
-                            VideoType = videoinfo.VideoType.ToString()
2677
-                        }); ;
2678
-                    }
2679
-                    i++;
2680
-                }
2681
-                APP.myloading.Hide();
2682
-            }
2683
-        }
2684
-
2685
-        /// <summary>
2686
-        /// 上传 下页
2687
-        /// </summary>
2688
-        /// <param name="sender"></param>
2689
-        /// <param name="e"></param>
2690
-        private void BtnNextPage_Click(object sender, RoutedEventArgs e)
2691
-        {
2692
-            if (Currpage < PageNum)
2693
-            {
2694
-                Currpage += 1;
2695
-                txbCurrpageTwo.Text = Currpage.ToString();
2696
-                int i = 1;
2697
-                bool isColour = true;
2698
-                pageData.menuList.Clear();
2699
-                //显示视频
2700
-                foreach (Model_Video videoinfo in model_VideoList)
2701
-                {
2702
-                    //是否已上传
2703
-                    //videoinfo.IsUpload;
2704
-                    //录制时间
2705
-                    //videoinfo.RSTime;
2706
-                    //文件大小
2707
-                    //videoinfo.VideoSize;
2708
-                    //文件缩略图路径
2709
-                    //videoinfo.ThumbnailPath;
2710
-                    //文件唯一标示 上传事件筛选需要上传的视频
2711
-                    //videoinfo.FileGuid;
2712
-                    //文件存储路径
2713
-                    //videoinfo.VidePath;
2714
-
2715
-                    string colour = "#FFFFFF";
2716
-                    if (isColour == true)
2717
-                    {
2718
-                        colour = "#FFFFFF";
2719
-                        isColour = false;
2720
-                    }
2721
-                    else
2722
-                    {
2723
-                        colour = "#E6F1FF";
2724
-                        isColour = true;
2725
-                    }
2726
-                    string vis = "Visible";
2727
-                    string cos = "Collapsed";
2728
-                    if (!videoinfo.IsUpload)
2729
-                    {
2730
-                        vis = "Collapsed";
2731
-                        cos = "Visible";
2732
-                    }
2733
-                    if (i <= Currpage * 16 && i > (Currpage - 1) * 16)
2734
-                    {
2735
-                        pageData.menuList.Add(new FileDirectoryModel()
2736
-                        {
2737
-                            SerialNumber = i,
2738
-                            VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2739
-                            Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
2740
-                            FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
2741
-                            VideoDuration = 0,
2742
-                            VideoSize = videoinfo.VideoSize,
2743
-                            VideoTime = videoinfo.RSTime,
2744
-                            IsEnabled = false,
2745
-                            Path = videoinfo.VideoPath,
2746
-                            Colour = colour,
2747
-                            Visi = vis,
2748
-                            Coll = cos,
2749
-                            FileGuid = videoinfo.FileGuid,
2750
-                            VideoType = videoinfo.VideoType.ToString()
2751
-                        }); ;
2752
-                    }
2753
-                    i++;
2754
-                }
2755
-                APP.myloading.Hide();
2756
-            }
2757
-        }
2758
-
2759
-        /// <summary>
2760
-        /// 修改文件名
2761
-        /// </summary>
2762
-        /// <param name="Guid">唯一编号</param>
2763
-        /// <param name="NewName">新文件名带后缀 不带路径</param>
2764
-        /// <param name="Errmessage">错误信息</param>
2765
-        /// <returns></returns>
2766
-        private bool ModifyPathName(string FileGuid, string NewName, out string Errmessage)
2767
-        {
2768
-            Errmessage = "";
2769
-            foreach (Model_WKData WKData in APP.WKDataList)
2770
-            {
2771
-                if (WKData.VideoList.Exists(x => x.FileGuid == FileGuid))
2772
-                {
2773
-                    Model_Video model_Video = WKData.VideoList.Find(x => x.FileGuid == FileGuid);
2774
-
2775
-                    string filePathName = model_Video.VideoPath;
2776
-                    string filePath = FileToolsCommon.GetDirectoryName(filePathName);
2777
-                    string newFilePathName = filePath + NewName;
2778
-                    //缩略图
2779
-                    string ThumbnailPath = filePath + "ThumbnailPath/";
2780
-                    FileToolsCommon.CreateDirectory(ThumbnailPath);
2781
-                    //缩略图存储位置
2782
-                    string ThumbnailPathName = ThumbnailPath + NewName.Replace(".", "") + ".JPG";
2783
-                    if (FileToolsCommon.IsExistFile(newFilePathName))
2784
-                    {
2785
-                        Errmessage = "文件已存在,请重新修改文件名!";
2786
-                        return false;
2787
-                    }
2788
-                    else
2789
-                    {
2790
-                        //修改文件名
2791
-                        FileToolsCommon.Copy(filePathName, newFilePathName);
2792
-                        model_Video.VideoPath = newFilePathName;
2793
-                        //修改缩略图名
2794
-                        FileToolsCommon.DeleteFile(ThumbnailPathName);
2795
-                        FileToolsCommon.Copy(model_Video.ThumbnailPath, ThumbnailPathName);
2796
-                        model_Video.ThumbnailPath = ThumbnailPathName;
2797
-                        APP.SaveWkData();
2798
-                        return true;
2799
-                    }
2800
-                }
2801
-                else
2802
-                {
2803
-                    continue;
2804
-                }
2805
-            }
2806
-            Errmessage = "视频文件有改动,当前文件不存在,请关闭后重新打开“我的”";
2807
-            return false;
2808
-        }
2809
-
2810 2334
         #endregion 上传 列表
2811 2335
 
2812 2336
         #region 新上传 显示缩略图
@@ -3711,19 +3235,12 @@ namespace XHWK.WKTool
3711 3235
                 TxbLoginType.Text = APP.UserInfo.Username;
3712 3236
                 ImgHeadImgN.Visibility = Visibility.Collapsed;
3713 3237
                 ImgHeadImg.Visibility = Visibility.Visible;
3714
-
3715
-                //APP.UserInfo.Userphone
3716
-                //ImgUpload.Visibility = Visibility.Visible;
3717
-                //ImgUploadTwo.Visibility = Visibility.Collapsed;
3718 3238
             }
3719 3239
             else
3720 3240
             {
3721 3241
                 TxbLoginType.Text = "未登录";
3722 3242
                 ImgHeadImgN.Visibility = Visibility.Visible;
3723 3243
                 ImgHeadImg.Visibility = Visibility.Collapsed;
3724
-
3725
-                //ImgUpload.Visibility = Visibility.Collapsed;
3726
-                //ImgUploadTwo.Visibility = Visibility.Visible;
3727 3244
             }
3728 3245
         }
3729 3246
 

+ 5
- 16
XHWK.WKTool/XHWK.WKTool.csproj View File

@@ -730,31 +730,15 @@
730 730
     <Resource Include="BlackImages\Device_Voice_B.png" />
731 731
     <Resource Include="BlackImages\Device_Voice_G.png" />
732 732
   </ItemGroup>
733
-  <ItemGroup>
734
-    <EmbeddedResource Include="Resources\AudioFrequency.mp3">
735
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
736
-    </EmbeddedResource>
737
-  </ItemGroup>
738 733
   <ItemGroup>
739 734
     <Resource Include="SkinImages\Other\Dev_AcousticWave1.gif" />
740 735
     <Resource Include="SkinImages\Other\Dev_AcousticWave2.gif" />
741 736
     <Resource Include="SkinImages\SR\SR_Out.png" />
742
-    <Resource Include="SkinImages\SR\SR_Out_MI.png" />
743
-    <Resource Include="SkinImages\SR\SR_Out_N.png" />
744 737
     <Resource Include="SkinImages\SR\SR_Pause.png" />
745
-    <Resource Include="SkinImages\SR\SR_Pause_MI.png" />
746 738
     <Resource Include="SkinImages\SR\SR_PenBlue.png" />
747
-    <Resource Include="SkinImages\SR\SR_PenBlue_CL.png" />
748
-    <Resource Include="SkinImages\SR\SR_PenBlue_MI.png" />
749
-    <Resource Include="SkinImages\SR\SR_PenBlue_N.png" />
750 739
     <Resource Include="SkinImages\SR\SR_PenRed.png" />
751
-    <Resource Include="SkinImages\SR\SR_PenRed_CL.png" />
752
-    <Resource Include="SkinImages\SR\SR_PenRed_MI.png" />
753
-    <Resource Include="SkinImages\SR\SR_PenRed_N.png" />
754 740
     <Resource Include="SkinImages\SR\SR_Start.png" />
755
-    <Resource Include="SkinImages\SR\SR_Start_MI.png" />
756 741
     <Resource Include="SkinImages\SR\SR_Stop.png" />
757
-    <Resource Include="SkinImages\SR\SR_Stop_MI.png" />
758 742
     <Resource Include="SkinImages\SR\SR_Stop_N.png" />
759 743
     <Resource Include="SkinImages\Skin\Skin_Select.png" />
760 744
     <Resource Include="SkinImages\Skin\Skin_TechnologyBlue.png" />
@@ -862,6 +846,11 @@
862 846
   <ItemGroup>
863 847
     <Resource Include="Images\shuoming.png" />
864 848
   </ItemGroup>
849
+  <ItemGroup>
850
+    <Content Include="Resources\audiotest.mp3">
851
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
852
+    </Content>
853
+  </ItemGroup>
865 854
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
866 855
   <PropertyGroup>
867 856
     <PreBuildEvent>xcopy /Y /i /e $(ProjectDir)\Extension $(TargetDir)\

+ 1
- 37
XHWK.WKTool/system/FFMpeg.cs View File

@@ -1351,43 +1351,7 @@ namespace Common.system
1351 1351
             return devices;
1352 1352
         }
1353 1353
 
1354
-        /// <summary>
1355
-        /// 获取麦克风---废弃
1356
-        /// </summary>
1357
-        private string GetMicrophone()
1358
-        {
1359
-            List<string> devs = new List<string>();
1360
-
1361
-            MMDeviceEnumerator enumberator = new MMDeviceEnumerator();
1362
-            MMDeviceCollection deviceCollection = enumberator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.All);
1363
-            for (int waveInDevice = 0; waveInDevice < WaveIn.DeviceCount; waveInDevice++)
1364
-            {
1365
-                WaveInCapabilities deviceInfo = WaveIn.GetCapabilities(waveInDevice);
1366
-                foreach (MMDevice device in deviceCollection)
1367
-                {
1368
-                    try
1369
-                    {
1370
-                        if (device.FriendlyName.StartsWith(deviceInfo.ProductName))
1371
-                        {
1372
-                            devs.Add(device.FriendlyName);
1373
-                            break;
1374
-                        }
1375
-                    }
1376
-                    catch (Exception)
1377
-                    {
1378
-                    }
1379
-                }
1380
-            }
1381
-            if (devs.Count > 0)
1382
-            {
1383
-                return devs[0];
1384
-            }
1385
-            else
1386
-            {
1387
-                return "";
1388
-            }
1389
-        }
1390
-
1354
+ 
1391 1355
         #endregion 获取麦克风
1392 1356
 
1393 1357
         #region 录音

+ 1
- 1
打包脚本/Inno Setup星火微课.iss View File

@@ -3,7 +3,7 @@
3 3
 
4 4
 #define MyAppName "星火微课"  
5 5
 #define MyAppDir "xhwk"
6
-#define MyAppVersion "2.6.8"
6
+#define MyAppVersion "2.6.9"
7 7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8 8
 #define MyAppURL "http://www.xhkjedu.com/"
9 9
 #define MySourcePath "D:\Project\C#\xhwkclient\XHWK.WKTool\bin\x86\Debug\"

Loading…
Cancel
Save