Browse Source

微课优化

master
张剑 1 year ago
parent
commit
971e2af20a

+ 1
- 4
XHWK.WKTool/DeviceWindow.xaml View File

10
     Title="设备检测"
10
     Title="设备检测"
11
     Width="569"
11
     Width="569"
12
     Height="367"
12
     Height="367"
13
-    AllowsTransparency="False"
14
-    BorderBrush="#FFE9E9E9"
15
-    BorderThickness="1"
16
     ShowInTaskbar="True"
13
     ShowInTaskbar="True"
17
     Style="{StaticResource ZWinStyle}"
14
     Style="{StaticResource ZWinStyle}"
18
     WindowStartupLocation="CenterScreen"
15
     WindowStartupLocation="CenterScreen"
690
             </Grid>
687
             </Grid>
691
         </Grid>
688
         </Grid>
692
     </Grid>
689
     </Grid>
693
-</Window>
690
+</Window>

+ 92
- 117
XHWK.WKTool/MainWindow.xaml View File

2
     x:Class="XHWK.WKTool.MainWindow"
2
     x:Class="XHWK.WKTool.MainWindow"
3
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
-    xmlns:controls="clr-namespace:AForge.Controls;assembly=AForge.Controls"
6
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8
     Title="星火微课系统"
7
     Title="星火微课系统"
33
                             ToolTip="{TemplateBinding Content}">
32
                             ToolTip="{TemplateBinding Content}">
34
                             <Image
33
                             <Image
35
                                 x:Name="_img"
34
                                 x:Name="_img"
36
-                                Margin="2,0,0,0"
35
+                                Height="12"
36
+                                Margin="4,0,0,0"
37
+                                VerticalAlignment="Center"
37
                                 DockPanel.Dock="Left"
38
                                 DockPanel.Dock="Left"
38
                                 Source="./Images/rdo_no.png"
39
                                 Source="./Images/rdo_no.png"
39
-                                Stretch="None" />
40
+                                Stretch="Fill" />
40
                             <TextBlock
41
                             <TextBlock
41
-                                Margin="3,0,0,0"
42
+                                Margin="2,0,0,0"
42
                                 VerticalAlignment="Center"
43
                                 VerticalAlignment="Center"
43
                                 DockPanel.Dock="Left"
44
                                 DockPanel.Dock="Left"
44
                                 Foreground="{TemplateBinding Foreground}"
45
                                 Foreground="{TemplateBinding Foreground}"
79
             </Setter>
80
             </Setter>
80
         </Style>
81
         </Style>
81
         <!--  ListBox容器样式  -->
82
         <!--  ListBox容器样式  -->
82
-        <Style x:Key="ListBoxItemContainerStyle" TargetType="{x:Type ListBoxItem}">
83
-            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
84
-            <Setter Property="HorizontalAlignment" Value="Stretch" />
85
-            <Setter Property="Template">
86
-                <Setter.Value>
87
-                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
88
-                        <Border
89
-                            x:Name="itemBox"
90
-                            Background="Transparent"
91
-                            BorderBrush="Transparent"
92
-                            BorderThickness="0">
93
-                            <ContentPresenter />
94
-                        </Border>
95
-                        <ControlTemplate.Triggers />
96
-                    </ControlTemplate>
97
-                </Setter.Value>
98
-            </Setter>
99
-        </Style>
100
 
83
 
101
         <!--  摄像头样式  -->
84
         <!--  摄像头样式  -->
102
-        <Style x:Key="stlToggleButton" TargetType="ToggleButton">
85
+        <Style x:Key="StlToggleButton" TargetType="ToggleButton">
103
             <Setter Property="Foreground" Value="White" />
86
             <Setter Property="Foreground" Value="White" />
104
             <Setter Property="Template">
87
             <Setter Property="Template">
105
                 <Setter.Value>
88
                 <Setter.Value>
139
                 </Setter.Value>
122
                 </Setter.Value>
140
             </Setter>
123
             </Setter>
141
         </Style>
124
         </Style>
142
-        <Style x:Key="stlComboBox" TargetType="ComboBox">
125
+        <Style x:Key="StlComboBox" TargetType="ComboBox">
143
             <Setter Property="SnapsToDevicePixels" Value="True" />
126
             <Setter Property="SnapsToDevicePixels" Value="True" />
144
             <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
127
             <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
145
             <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
128
             <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
174
                                 <ToggleButton
157
                                 <ToggleButton
175
                                     ClickMode="Press"
158
                                     ClickMode="Press"
176
                                     IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
159
                                     IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
177
-                                    Style="{StaticResource stlToggleButton}" />
160
+                                    Style="{StaticResource StlToggleButton}" />
178
                             </Border>
161
                             </Border>
179
                             <Popup
162
                             <Popup
180
                                 x:Name="Popup"
163
                                 x:Name="Popup"
164
+                                Grid.Column="0"
181
                                 AllowsTransparency="True"
165
                                 AllowsTransparency="True"
182
                                 Focusable="False"
166
                                 Focusable="False"
183
                                 IsOpen="{TemplateBinding IsDropDownOpen}"
167
                                 IsOpen="{TemplateBinding IsDropDownOpen}"
236
                 Grid.Row="0"
220
                 Grid.Row="0"
237
                 Background="White"
221
                 Background="White"
238
                 MouseLeftButtonDown="Window_MouseLeftButtonDown">
222
                 MouseLeftButtonDown="Window_MouseLeftButtonDown">
239
-                <Grid Grid.Background="{DynamicResource BackTitle}">
223
+                <Grid Background="{DynamicResource BackTitle}">
240
                     <!--<Grid.Background>
224
                     <!--<Grid.Background>
241
                             <ImageBrush ImageSource="" />
225
                             <ImageBrush ImageSource="" />
242
                         </Grid.Background>-->
226
                         </Grid.Background>-->
290
                                     Width="20"
274
                                     Width="20"
291
                                     Style="{DynamicResource TitlePenState}" />
275
                                     Style="{DynamicResource TitlePenState}" />
292
                                 <TextBlock
276
                                 <TextBlock
293
-                                    x:Name="txbNotConnected"
277
+                                    x:Name="TxbNotConnected"
294
                                     Margin="5,0,0,0"
278
                                     Margin="5,0,0,0"
295
                                     Padding="0"
279
                                     Padding="0"
296
                                     VerticalAlignment="Center"
280
                                     VerticalAlignment="Center"
314
                                 VerticalAlignment="Center"
298
                                 VerticalAlignment="Center"
315
                                 Orientation="Horizontal">
299
                                 Orientation="Horizontal">
316
                                 <Image
300
                                 <Image
317
-                                    x:Name="ImgLZImg"
301
+                                    x:Name="ImgLzImg"
318
                                     Width="20"
302
                                     Width="20"
319
                                     Style="{DynamicResource TitleLZTimeImg}" />
303
                                     Style="{DynamicResource TitleLZTimeImg}" />
320
                                 <TextBlock
304
                                 <TextBlock
341
                                 Background="#FFE5E5E5" />
325
                                 Background="#FFE5E5E5" />
342
                         </Grid>
326
                         </Grid>
343
                         <!--  录屏按钮  -->
327
                         <!--  录屏按钮  -->
344
-                        <Grid Name="start_pause_grid" Grid.Column="2">
328
+                        <Grid Name="StartPauseGrid" Grid.Column="2">
345
                             <StackPanel Orientation="Horizontal" />
329
                             <StackPanel Orientation="Horizontal" />
346
                             <Button
330
                             <Button
347
                                 x:Name="BtnRecord"
331
                                 x:Name="BtnRecord"
348
                                 Margin="5,0"
332
                                 Margin="5,0"
349
                                 HorizontalAlignment="Stretch"
333
                                 HorizontalAlignment="Stretch"
350
                                 VerticalAlignment="Center"
334
                                 VerticalAlignment="Center"
351
-                                Button.Template="{DynamicResource SkinBtnRecord}"
352
                                 Click="BtnRecord_Click"
335
                                 Click="BtnRecord_Click"
353
                                 Cursor="Hand"
336
                                 Cursor="Hand"
354
-                                FontSize="14" />
337
+                                FontSize="14"
338
+                                Template="{DynamicResource SkinBtnRecord}" />
355
                             <Button
339
                             <Button
356
                                 x:Name="BtnRecordSuspend"
340
                                 x:Name="BtnRecordSuspend"
357
                                 Margin="5,0"
341
                                 Margin="5,0"
358
                                 HorizontalAlignment="Stretch"
342
                                 HorizontalAlignment="Stretch"
359
                                 VerticalAlignment="Center"
343
                                 VerticalAlignment="Center"
360
-                                Button.Template="{DynamicResource SkinBtnRecordSuspend}"
361
                                 Click="BtnRecord_Click"
344
                                 Click="BtnRecord_Click"
362
                                 Cursor="Hand"
345
                                 Cursor="Hand"
363
                                 FontSize="14"
346
                                 FontSize="14"
347
+                                Template="{DynamicResource SkinBtnRecordSuspend}"
364
                                 Visibility="Collapsed" />
348
                                 Visibility="Collapsed" />
365
                         </Grid>
349
                         </Grid>
366
-                        <Grid Name="stop_grid" Grid.Column="3">
350
+                        <Grid Name="StopGrid" Grid.Column="3">
367
                             <Button
351
                             <Button
368
                                 x:Name="BtnStop"
352
                                 x:Name="BtnStop"
369
                                 Margin="5,0"
353
                                 Margin="5,0"
370
                                 HorizontalAlignment="Stretch"
354
                                 HorizontalAlignment="Stretch"
371
                                 VerticalAlignment="Center"
355
                                 VerticalAlignment="Center"
372
-                                Button.Template="{DynamicResource SkinBtnRecordStop}"
373
                                 Click="BtnStop_Click"
356
                                 Click="BtnStop_Click"
374
                                 Cursor="Hand"
357
                                 Cursor="Hand"
375
-                                FontSize="14" />
358
+                                FontSize="14"
359
+                                Template="{DynamicResource SkinBtnRecordStop}" />
376
                         </Grid>
360
                         </Grid>
377
                     </Grid>
361
                     </Grid>
378
 
362
 
379
                     <!--  关闭  -->
363
                     <!--  关闭  -->
380
-                    <Grid Name="close_grid" Grid.Column="2">
364
+                    <Grid Name="CloseGrid" Grid.Column="2">
381
                         <Label
365
                         <Label
382
                             Width="2"
366
                             Width="2"
383
                             Margin="0,15"
367
                             Margin="0,15"
388
                             Margin="20,0,10,0"
372
                             Margin="20,0,10,0"
389
                             HorizontalAlignment="Stretch"
373
                             HorizontalAlignment="Stretch"
390
                             VerticalAlignment="Center"
374
                             VerticalAlignment="Center"
391
-                            Button.Template="{DynamicResource SkinBtnClose}"
392
                             Click="BtnClose_Click"
375
                             Click="BtnClose_Click"
393
                             Cursor="Hand"
376
                             Cursor="Hand"
394
-                            FontSize="14" />
377
+                            FontSize="14"
378
+                            Template="{DynamicResource SkinBtnClose}" />
395
                     </Grid>
379
                     </Grid>
396
                     <!--  测试  -->
380
                     <!--  测试  -->
397
                     <Grid Grid.Column="2" Visibility="Collapsed">
381
                     <Grid Grid.Column="2" Visibility="Collapsed">
453
                     x:Name="GridToolbars"
437
                     x:Name="GridToolbars"
454
                     Grid.Column="0"
438
                     Grid.Column="0"
455
                     Background="White">
439
                     Background="White">
456
-                    <Grid Grid.Background="{DynamicResource BackTool}">
440
+                    <Grid Background="{DynamicResource BackTool}">
457
                         <Grid.RowDefinitions>
441
                         <Grid.RowDefinitions>
458
                             <RowDefinition Height="160*" />
442
                             <RowDefinition Height="160*" />
459
                             <RowDefinition Height="85*" />
443
                             <RowDefinition Height="85*" />
514
                                 VerticalAlignment="Stretch"
498
                                 VerticalAlignment="Stretch"
515
                                 HorizontalContentAlignment="Stretch"
499
                                 HorizontalContentAlignment="Stretch"
516
                                 VerticalContentAlignment="Stretch"
500
                                 VerticalContentAlignment="Stretch"
517
-                                Button.Template="{DynamicResource SkinBtnScreenRecording}"
518
                                 Click="BtnScreenRecording_Click"
501
                                 Click="BtnScreenRecording_Click"
519
                                 Cursor="Hand"
502
                                 Cursor="Hand"
520
-                                FontSize="16" />
503
+                                FontSize="16"
504
+                                Template="{DynamicResource SkinBtnScreenRecording}" />
521
                         </Grid>
505
                         </Grid>
522
                         <!--  截图  -->
506
                         <!--  截图  -->
523
                         <Grid Grid.Row="2">
507
                         <Grid Grid.Row="2">
526
                                 Padding="0"
510
                                 Padding="0"
527
                                 HorizontalAlignment="Stretch"
511
                                 HorizontalAlignment="Stretch"
528
                                 VerticalAlignment="Stretch"
512
                                 VerticalAlignment="Stretch"
529
-                                Button.Template="{DynamicResource SkinBtnScreenshot}"
530
                                 Click="BtnScreenshot_Click"
513
                                 Click="BtnScreenshot_Click"
531
                                 Cursor="Hand"
514
                                 Cursor="Hand"
532
-                                FontSize="16" />
515
+                                FontSize="16"
516
+                                Template="{DynamicResource SkinBtnScreenshot}" />
533
                         </Grid>
517
                         </Grid>
534
                         <!--  导入  -->
518
                         <!--  导入  -->
535
                         <Grid Grid.Row="3">
519
                         <Grid Grid.Row="3">
537
                                 x:Name="BtnImport"
521
                                 x:Name="BtnImport"
538
                                 HorizontalAlignment="Stretch"
522
                                 HorizontalAlignment="Stretch"
539
                                 VerticalAlignment="Stretch"
523
                                 VerticalAlignment="Stretch"
540
-                                Button.Template="{DynamicResource SkinBtnImport}"
541
                                 Click="BtnImport_Click"
524
                                 Click="BtnImport_Click"
542
                                 Cursor="Hand"
525
                                 Cursor="Hand"
543
-                                FontSize="16" />
526
+                                FontSize="16"
527
+                                Template="{DynamicResource SkinBtnImport}" />
544
                         </Grid>
528
                         </Grid>
545
                         <!--  加页  -->
529
                         <!--  加页  -->
546
                         <Grid Grid.Row="4">
530
                         <Grid Grid.Row="4">
548
                                 x:Name="BtnAdd"
532
                                 x:Name="BtnAdd"
549
                                 HorizontalAlignment="Stretch"
533
                                 HorizontalAlignment="Stretch"
550
                                 VerticalAlignment="Stretch"
534
                                 VerticalAlignment="Stretch"
551
-                                Button.Template="{DynamicResource SkinBtnAdd}"
552
                                 Click="BtnAdd_Click"
535
                                 Click="BtnAdd_Click"
553
                                 Cursor="Hand"
536
                                 Cursor="Hand"
554
-                                FontSize="16" />
537
+                                FontSize="16"
538
+                                Template="{DynamicResource SkinBtnAdd}" />
555
                         </Grid>
539
                         </Grid>
556
                         <!--  打印  -->
540
                         <!--  打印  -->
557
                         <Grid Grid.Row="5">
541
                         <Grid Grid.Row="5">
559
                                 x:Name="BtnPrint"
543
                                 x:Name="BtnPrint"
560
                                 HorizontalAlignment="Stretch"
544
                                 HorizontalAlignment="Stretch"
561
                                 VerticalAlignment="Stretch"
545
                                 VerticalAlignment="Stretch"
562
-                                Button.Template="{DynamicResource SkinBtnPrint}"
563
                                 Click="BtnPrint_Click"
546
                                 Click="BtnPrint_Click"
564
                                 Cursor="Hand"
547
                                 Cursor="Hand"
565
-                                FontSize="16" />
548
+                                FontSize="16"
549
+                                Template="{DynamicResource SkinBtnPrint}" />
566
                         </Grid>
550
                         </Grid>
567
                         <!--  我的  -->
551
                         <!--  我的  -->
568
                         <Grid Grid.Row="6">
552
                         <Grid Grid.Row="6">
570
                                 x:Name="BtnUpload"
554
                                 x:Name="BtnUpload"
571
                                 HorizontalAlignment="Stretch"
555
                                 HorizontalAlignment="Stretch"
572
                                 VerticalAlignment="Stretch"
556
                                 VerticalAlignment="Stretch"
573
-                                Button.Template="{DynamicResource SkinBtnMy}"
574
                                 Click="BtnUpload_Click"
557
                                 Click="BtnUpload_Click"
575
                                 Cursor="Hand"
558
                                 Cursor="Hand"
576
-                                FontSize="16" />
559
+                                FontSize="16"
560
+                                Template="{DynamicResource SkinBtnMy}" />
577
                         </Grid>
561
                         </Grid>
578
                         <!--  检测  -->
562
                         <!--  检测  -->
579
                         <Grid Grid.Row="7">
563
                         <Grid Grid.Row="7">
581
                                 x:Name="BtnDevice"
565
                                 x:Name="BtnDevice"
582
                                 HorizontalAlignment="Stretch"
566
                                 HorizontalAlignment="Stretch"
583
                                 VerticalAlignment="Stretch"
567
                                 VerticalAlignment="Stretch"
584
-                                Button.Template="{DynamicResource SkinBtnDevice}"
585
                                 Click="BtnDevice_Click"
568
                                 Click="BtnDevice_Click"
586
                                 Cursor="Hand"
569
                                 Cursor="Hand"
587
-                                FontSize="16" />
570
+                                FontSize="16"
571
+                                Template="{DynamicResource SkinBtnDevice}" />
588
                         </Grid>
572
                         </Grid>
589
                         <!--  设置  -->
573
                         <!--  设置  -->
590
                         <Grid Grid.Row="8">
574
                         <Grid Grid.Row="8">
592
                                 x:Name="BtnSetUp"
576
                                 x:Name="BtnSetUp"
593
                                 HorizontalAlignment="Stretch"
577
                                 HorizontalAlignment="Stretch"
594
                                 VerticalAlignment="Stretch"
578
                                 VerticalAlignment="Stretch"
595
-                                Button.Template="{DynamicResource SkinBtnSetUp}"
596
                                 Click="BtnSetUp_Click"
579
                                 Click="BtnSetUp_Click"
597
                                 Cursor="Hand"
580
                                 Cursor="Hand"
598
-                                FontSize="16" />
581
+                                FontSize="16"
582
+                                Template="{DynamicResource SkinBtnSetUp}" />
599
                         </Grid>
583
                         </Grid>
600
                         <!--  测试  -->
584
                         <!--  测试  -->
601
                         <Grid
585
                         <Grid
681
                                             Visibility="Visible">
665
                                             Visibility="Visible">
682
                                             <Grid>
666
                                             <Grid>
683
                                                 <Border CornerRadius="5">
667
                                                 <Border CornerRadius="5">
684
-                                                    <Grid x:Name="IMG" Margin="0,0,0,0">
668
+                                                    <Grid x:Name="Img" Margin="0,0,0,0">
685
                                                         <Grid.Resources>
669
                                                         <Grid.Resources>
686
                                                             <TransformGroup x:Key="Imageview">
670
                                                             <TransformGroup x:Key="Imageview">
687
                                                                 <ScaleTransform />
671
                                                                 <ScaleTransform />
704
                                                             StrokeThickness="4"
688
                                                             StrokeThickness="4"
705
                                                             Visibility="Hidden" />
689
                                                             Visibility="Hidden" />
706
                                                         <Image
690
                                                         <Image
707
-                                                            x:Name="imgCanvas"
691
+                                                            x:Name="ImgCanvas"
708
                                                             Height="0"
692
                                                             Height="0"
709
                                                             HorizontalAlignment="Left"
693
                                                             HorizontalAlignment="Left"
710
                                                             VerticalAlignment="Top"
694
                                                             VerticalAlignment="Top"
786
                                                 </Border>
770
                                                 </Border>
787
                                             </Grid>
771
                                             </Grid>
788
                                             <Image
772
                                             <Image
789
-                                                x:Name="imgDocumentation"
773
+                                                x:Name="ImgDocumentation"
790
                                                 Grid.RowSpan="2"
774
                                                 Grid.RowSpan="2"
791
                                                 Stretch="Fill"
775
                                                 Stretch="Fill"
792
                                                 Visibility="Visible" />
776
                                                 Visibility="Visible" />
793
                                             <Image
777
                                             <Image
794
-                                                x:Name="imgPPT"
778
+                                                x:Name="ImgPpt"
795
                                                 VerticalAlignment="Top"
779
                                                 VerticalAlignment="Top"
796
                                                 Visibility="Visible" />
780
                                                 Visibility="Visible" />
797
                                             <!--  导入图片  -->
781
                                             <!--  导入图片  -->
798
                                             <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#3f6fff" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed" />-->
782
                                             <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#3f6fff" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed" />-->
799
                                             <InkCanvas
783
                                             <InkCanvas
800
-                                                x:Name="blackboard_canvas"
784
+                                                x:Name="BlackboardCanvas"
801
                                                 Grid.Row="0"
785
                                                 Grid.Row="0"
802
-                                                Grid.RowSpan="2"
803
                                                 Background="Transparent"
786
                                                 Background="Transparent"
804
                                                 Visibility="Collapsed" />
787
                                                 Visibility="Collapsed" />
805
                                             <!--  摄像头  -->
788
                                             <!--  摄像头  -->
885
                                 Visibility="Collapsed">
868
                                 Visibility="Collapsed">
886
                                 <StackPanel
869
                                 <StackPanel
887
                                     Grid.Row="0"
870
                                     Grid.Row="0"
888
-                                    Grid.Column="1"
889
                                     Height="30"
871
                                     Height="30"
890
                                     Margin="0,0,0,0"
872
                                     Margin="0,0,0,0"
891
                                     HorizontalAlignment="Center"
873
                                     HorizontalAlignment="Center"
899
                                         Content="页码:" />
881
                                         Content="页码:" />
900
 
882
 
901
                                     <Button
883
                                     <Button
902
-                                        x:Name="last_button"
884
+                                        x:Name="LastButton"
903
                                         Width="28"
885
                                         Width="28"
904
                                         Height="20"
886
                                         Height="20"
905
                                         Click="last_button_Click"
887
                                         Click="last_button_Click"
920
                                             Background="Transparent"
902
                                             Background="Transparent"
921
                                             Orientation="Horizontal">
903
                                             Orientation="Horizontal">
922
                                             <TextBlock
904
                                             <TextBlock
923
-                                                x:Name="txbCurrpage"
905
+                                                x:Name="TxbCurrpage"
924
                                                 Margin="0"
906
                                                 Margin="0"
925
                                                 HorizontalAlignment="Center"
907
                                                 HorizontalAlignment="Center"
926
                                                 VerticalAlignment="Center"
908
                                                 VerticalAlignment="Center"
934
                                                 Text="/"
916
                                                 Text="/"
935
                                                 TextAlignment="Center" />
917
                                                 TextAlignment="Center" />
936
                                             <TextBlock
918
                                             <TextBlock
937
-                                                x:Name="txbTotalpage"
919
+                                                x:Name="TxbTotalpage"
938
                                                 HorizontalAlignment="Center"
920
                                                 HorizontalAlignment="Center"
939
                                                 VerticalAlignment="Center"
921
                                                 VerticalAlignment="Center"
940
                                                 FontSize="14"
922
                                                 FontSize="14"
943
                                         </StackPanel>
925
                                         </StackPanel>
944
                                     </Grid>
926
                                     </Grid>
945
                                     <Button
927
                                     <Button
946
-                                        x:Name="next_btn"
928
+                                        x:Name="NextBtn"
947
                                         Width="28"
929
                                         Width="28"
948
                                         Height="20"
930
                                         Height="20"
949
                                         Background="Transparent"
931
                                         Background="Transparent"
971
                                     FontSize="12"
953
                                     FontSize="12"
972
                                     Text="颜色: " />
954
                                     Text="颜色: " />
973
                                 <Button
955
                                 <Button
974
-                                    x:Name="btnWhite"
956
+                                    x:Name="BtnWhite"
975
                                     Width="20"
957
                                     Width="20"
976
                                     Height="20"
958
                                     Height="20"
977
                                     Margin="0,2,0,0"
959
                                     Margin="0,2,0,0"
982
                                 <Border
964
                                 <Border
983
                                     Width="20"
965
                                     Width="20"
984
                                     Height="20"
966
                                     Height="20"
985
-                                    Margin="5,2,0,0"
986
-                                    Background="#666666">
967
+                                    Margin="5,2,0,0">
987
                                     <Button
968
                                     <Button
988
-                                        x:Name="btnRed"
969
+                                        x:Name="BtnRed"
989
                                         Width="20"
970
                                         Width="20"
990
                                         Height="20"
971
                                         Height="20"
991
                                         Margin="1,1,1,1"
972
                                         Margin="1,1,1,1"
995
                                         Cursor="Hand"
976
                                         Cursor="Hand"
996
                                         Style="{StaticResource NoMouseOverButtonStyle}">
977
                                         Style="{StaticResource NoMouseOverButtonStyle}">
997
                                         <Image
978
                                         <Image
998
-                                            x:Name="imgRed"
979
+                                            x:Name="ImgRed"
999
                                             Width="12"
980
                                             Width="12"
1000
                                             Source=".\Images\microLessonSystem_999.png"
981
                                             Source=".\Images\microLessonSystem_999.png"
1001
                                             Visibility="Visible" />
982
                                             Visibility="Visible" />
1004
                                 <Border
985
                                 <Border
1005
                                     Width="20"
986
                                     Width="20"
1006
                                     Height="20"
987
                                     Height="20"
1007
-                                    Margin="5,2,0,0"
1008
-                                    Background="#666666">
988
+                                    Margin="5,2,0,0">
1009
                                     <Button
989
                                     <Button
1010
-                                        x:Name="btnGray"
990
+                                        x:Name="BtnGray"
1011
                                         Width="20"
991
                                         Width="20"
1012
                                         Height="20"
992
                                         Height="20"
1013
                                         Margin="1,1,1,1"
993
                                         Margin="1,1,1,1"
1016
                                         Cursor="Hand"
996
                                         Cursor="Hand"
1017
                                         Style="{StaticResource NoMouseOverButtonStyle}">
997
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1018
                                         <Image
998
                                         <Image
1019
-                                            x:Name="imgGray"
999
+                                            x:Name="ImgGray"
1020
                                             Width="12"
1000
                                             Width="12"
1021
                                             Source=".\Images\microLessonSystem_999.png"
1001
                                             Source=".\Images\microLessonSystem_999.png"
1022
                                             Visibility="Collapsed" />
1002
                                             Visibility="Collapsed" />
1025
                                 <Border
1005
                                 <Border
1026
                                     Width="20"
1006
                                     Width="20"
1027
                                     Height="20"
1007
                                     Height="20"
1028
-                                    Margin="5,2,0,0"
1029
-                                    Background="#666666">
1008
+                                    Margin="5,2,0,0">
1030
                                     <Button
1009
                                     <Button
1031
-                                        x:Name="btnCyanBlue"
1010
+                                        x:Name="BtnCyanBlue"
1032
                                         Width="20"
1011
                                         Width="20"
1033
                                         Height="20"
1012
                                         Height="20"
1034
                                         Margin="1,1,1,1"
1013
                                         Margin="1,1,1,1"
1037
                                         Cursor="Hand"
1016
                                         Cursor="Hand"
1038
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1017
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1039
                                         <Image
1018
                                         <Image
1040
-                                            x:Name="imgCyanBlue"
1019
+                                            x:Name="ImgCyanBlue"
1041
                                             Width="12"
1020
                                             Width="12"
1042
                                             Source=".\Images\microLessonSystem_999.png"
1021
                                             Source=".\Images\microLessonSystem_999.png"
1043
                                             Visibility="Collapsed" />
1022
                                             Visibility="Collapsed" />
1046
                                 <Border
1025
                                 <Border
1047
                                     Width="20"
1026
                                     Width="20"
1048
                                     Height="20"
1027
                                     Height="20"
1049
-                                    Margin="5,2,0,0"
1050
-                                    Background="#666666">
1028
+                                    Margin="5,2,0,0">
1051
 
1029
 
1052
                                     <Button
1030
                                     <Button
1053
-                                        x:Name="btnYellow"
1031
+                                        x:Name="BtnYellow"
1054
                                         Width="20"
1032
                                         Width="20"
1055
                                         Height="20"
1033
                                         Height="20"
1056
                                         Margin="1,1,1,1"
1034
                                         Margin="1,1,1,1"
1060
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1038
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1061
 
1039
 
1062
                                         <Image
1040
                                         <Image
1063
-                                            x:Name="imgYellow"
1041
+                                            x:Name="ImgYellow"
1064
                                             Width="12"
1042
                                             Width="12"
1065
                                             Source=".\Images\microLessonSystem_999.png"
1043
                                             Source=".\Images\microLessonSystem_999.png"
1066
                                             Visibility="Collapsed" />
1044
                                             Visibility="Collapsed" />
1069
                                 <Border
1047
                                 <Border
1070
                                     Width="20"
1048
                                     Width="20"
1071
                                     Height="20"
1049
                                     Height="20"
1072
-                                    Margin="5,2,0,0"
1073
-                                    Background="#666666">
1050
+                                    Margin="5,2,0,0">
1074
 
1051
 
1075
                                     <Button
1052
                                     <Button
1076
-                                        x:Name="btnBlue"
1053
+                                        x:Name="BtnBlue"
1077
                                         Width="20"
1054
                                         Width="20"
1078
                                         Height="20"
1055
                                         Height="20"
1079
                                         Margin="1,1,1,1"
1056
                                         Margin="1,1,1,1"
1082
                                         Cursor="Hand"
1059
                                         Cursor="Hand"
1083
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1060
                                         Style="{StaticResource NoMouseOverButtonStyle}">
1084
                                         <Image
1061
                                         <Image
1085
-                                            x:Name="imgBlue"
1062
+                                            x:Name="ImgBlue"
1086
                                             Width="12"
1063
                                             Width="12"
1087
                                             Source=".\Images\microLessonSystem_999.png"
1064
                                             Source=".\Images\microLessonSystem_999.png"
1088
                                             Visibility="Collapsed" />
1065
                                             Visibility="Collapsed" />
1095
                                     FontSize="12"
1072
                                     FontSize="12"
1096
                                     Text="粗细: " />
1073
                                     Text="粗细: " />
1097
                                 <RadioButton
1074
                                 <RadioButton
1098
-                                    x:Name="rbnFine"
1075
+                                    x:Name="RbnFine"
1099
                                     Margin="0"
1076
                                     Margin="0"
1100
                                     VerticalAlignment="Center"
1077
                                     VerticalAlignment="Center"
1101
                                     Click="RbnFine_Click"
1078
                                     Click="RbnFine_Click"
1105
                                     IsChecked="True"
1082
                                     IsChecked="True"
1106
                                     Style="{StaticResource RadBase}" />
1083
                                     Style="{StaticResource RadBase}" />
1107
                                 <RadioButton
1084
                                 <RadioButton
1108
-                                    x:Name="rbnIn"
1085
+                                    x:Name="RbnIn"
1109
                                     Margin="5,0,0,0"
1086
                                     Margin="5,0,0,0"
1110
                                     VerticalAlignment="Center"
1087
                                     VerticalAlignment="Center"
1111
                                     Click="RbnIn_Click"
1088
                                     Click="RbnIn_Click"
1114
                                     FontSize="12"
1091
                                     FontSize="12"
1115
                                     Style="{StaticResource RadBase}" />
1092
                                     Style="{StaticResource RadBase}" />
1116
                                 <RadioButton
1093
                                 <RadioButton
1117
-                                    x:Name="rbnCrude"
1094
+                                    x:Name="RbnCrude"
1118
                                     Margin="5,0,0,0"
1095
                                     Margin="5,0,0,0"
1119
                                     VerticalAlignment="Center"
1096
                                     VerticalAlignment="Center"
1120
                                     Click="RbnCrude_Click"
1097
                                     Click="RbnCrude_Click"
1158
                     </Grid>
1135
                     </Grid>
1159
                     <!--  设置 955  -->
1136
                     <!--  设置 955  -->
1160
                     <ScrollViewer
1137
                     <ScrollViewer
1161
-                        x:Name="gridSetUp"
1138
+                        x:Name="GridSetUp"
1162
                         VerticalScrollBarVisibility="Auto"
1139
                         VerticalScrollBarVisibility="Auto"
1163
                         Visibility="Collapsed">
1140
                         Visibility="Collapsed">
1164
                         <Grid Height="650">
1141
                         <Grid Height="650">
1307
                                         </Grid.RowDefinitions>
1284
                                         </Grid.RowDefinitions>
1308
                                         <Grid Grid.Row="1" Grid.Column="0">
1285
                                         <Grid Grid.Row="1" Grid.Column="0">
1309
                                             <TextBlock
1286
                                             <TextBlock
1310
-                                                Grid.Row="1"
1311
                                                 Grid.Column="0"
1287
                                                 Grid.Column="0"
1312
                                                 HorizontalAlignment="Right"
1288
                                                 HorizontalAlignment="Right"
1313
                                                 VerticalAlignment="Center"
1289
                                                 VerticalAlignment="Center"
1322
                                                 VerticalAlignment="Center"
1298
                                                 VerticalAlignment="Center"
1323
                                                 Orientation="Horizontal">
1299
                                                 Orientation="Horizontal">
1324
                                                 <RadioButton
1300
                                                 <RadioButton
1325
-                                                    x:Name="rbnMP4"
1301
+                                                    x:Name="RbnMp4"
1326
                                                     VerticalAlignment="Top"
1302
                                                     VerticalAlignment="Top"
1327
                                                     Content=" MP4"
1303
                                                     Content=" MP4"
1328
                                                     Cursor="Hand"
1304
                                                     Cursor="Hand"
1331
                                                     IsChecked="True"
1307
                                                     IsChecked="True"
1332
                                                     Style="{StaticResource RadBase}" />
1308
                                                     Style="{StaticResource RadBase}" />
1333
                                                 <RadioButton
1309
                                                 <RadioButton
1334
-                                                    x:Name="rbnFLV"
1310
+                                                    x:Name="RbnFlv"
1335
                                                     Margin="15,0,0,0"
1311
                                                     Margin="15,0,0,0"
1336
                                                     VerticalAlignment="Top"
1312
                                                     VerticalAlignment="Top"
1337
                                                     Content=" FLV"
1313
                                                     Content=" FLV"
1341
                                                     Style="{StaticResource RadBase}"
1317
                                                     Style="{StaticResource RadBase}"
1342
                                                     Visibility="Collapsed" />
1318
                                                     Visibility="Collapsed" />
1343
                                                 <RadioButton
1319
                                                 <RadioButton
1344
-                                                    x:Name="rbnAVI"
1320
+                                                    x:Name="RbnAvi"
1345
                                                     Margin="15,0,0,0"
1321
                                                     Margin="15,0,0,0"
1346
                                                     Content=" AVI"
1322
                                                     Content=" AVI"
1347
                                                     Cursor="Hand"
1323
                                                     Cursor="Hand"
1366
                                                 VerticalAlignment="Center"
1342
                                                 VerticalAlignment="Center"
1367
                                                 Orientation="Horizontal">
1343
                                                 Orientation="Horizontal">
1368
                                                 <RadioButton
1344
                                                 <RadioButton
1369
-                                                    x:Name="rbnLeft"
1345
+                                                    x:Name="RbnLeft"
1370
                                                     Margin="0"
1346
                                                     Margin="0"
1371
                                                     HorizontalAlignment="Left"
1347
                                                     HorizontalAlignment="Left"
1372
                                                     VerticalAlignment="Center"
1348
                                                     VerticalAlignment="Center"
1377
                                                     GroupName="RbtnCamera"
1353
                                                     GroupName="RbtnCamera"
1378
                                                     Style="{StaticResource RadBase}" />
1354
                                                     Style="{StaticResource RadBase}" />
1379
                                                 <RadioButton
1355
                                                 <RadioButton
1380
-                                                    x:Name="rbnRight"
1356
+                                                    x:Name="RbnRight"
1381
                                                     Margin="15,0,0,0"
1357
                                                     Margin="15,0,0,0"
1382
                                                     HorizontalAlignment="Right"
1358
                                                     HorizontalAlignment="Right"
1383
                                                     VerticalAlignment="Center"
1359
                                                     VerticalAlignment="Center"
1399
                                                 Orientation="Horizontal">
1375
                                                 Orientation="Horizontal">
1400
 
1376
 
1401
                                                 <RadioButton
1377
                                                 <RadioButton
1402
-                                                    x:Name="rbnLeftUnder"
1378
+                                                    x:Name="RbnLeftUnder"
1403
                                                     HorizontalAlignment="Left"
1379
                                                     HorizontalAlignment="Left"
1404
                                                     VerticalAlignment="Center"
1380
                                                     VerticalAlignment="Center"
1405
                                                     Content=" 左下"
1381
                                                     Content=" 左下"
1410
                                                     Style="{StaticResource RadBase}" />
1386
                                                     Style="{StaticResource RadBase}" />
1411
 
1387
 
1412
                                                 <RadioButton
1388
                                                 <RadioButton
1413
-                                                    x:Name="rbnRightUnder"
1389
+                                                    x:Name="RbnRightUnder"
1414
                                                     Margin="15,0"
1390
                                                     Margin="15,0"
1415
                                                     HorizontalAlignment="Left"
1391
                                                     HorizontalAlignment="Left"
1416
                                                     VerticalAlignment="Center"
1392
                                                     VerticalAlignment="Center"
1437
                                                 VerticalAlignment="Center"
1413
                                                 VerticalAlignment="Center"
1438
                                                 Orientation="Horizontal">
1414
                                                 Orientation="Horizontal">
1439
                                                 <RadioButton
1415
                                                 <RadioButton
1440
-                                                    x:Name="rbnHide"
1416
+                                                    x:Name="RbnHide"
1441
                                                     VerticalAlignment="Top"
1417
                                                     VerticalAlignment="Top"
1442
                                                     Content=" 隐藏"
1418
                                                     Content=" 隐藏"
1443
                                                     Cursor="Hand"
1419
                                                     Cursor="Hand"
1446
                                                     IsChecked="True"
1422
                                                     IsChecked="True"
1447
                                                     Style="{StaticResource RadBase}" />
1423
                                                     Style="{StaticResource RadBase}" />
1448
                                                 <RadioButton
1424
                                                 <RadioButton
1449
-                                                    x:Name="rbnvisi"
1425
+                                                    x:Name="Rbnvisi"
1450
                                                     Margin="15,0,0,0"
1426
                                                     Margin="15,0,0,0"
1451
                                                     VerticalAlignment="Top"
1427
                                                     VerticalAlignment="Top"
1452
                                                     Content=" 显示"
1428
                                                     Content=" 显示"
1496
                                                     BorderThickness="1"
1472
                                                     BorderThickness="1"
1497
                                                     CornerRadius="1">
1473
                                                     CornerRadius="1">
1498
                                                     <Label
1474
                                                     <Label
1499
-                                                        x:Name="txbStoragePath"
1475
+                                                        x:Name="TxbStoragePath"
1500
                                                         Margin="10,0"
1476
                                                         Margin="10,0"
1501
                                                         Background="#FFFFFF"
1477
                                                         Background="#FFFFFF"
1502
                                                         BorderBrush="{x:Null}"
1478
                                                         BorderBrush="{x:Null}"
1514
                                             </Grid.ColumnDefinitions>
1490
                                             </Grid.ColumnDefinitions>
1515
                                             <!--  浏览按钮  -->
1491
                                             <!--  浏览按钮  -->
1516
                                             <Button
1492
                                             <Button
1517
-                                                x:Name="btnBrowse"
1493
+                                                x:Name="BtnBrowse"
1518
                                                 Grid.Column="0"
1494
                                                 Grid.Column="0"
1519
                                                 Width="66"
1495
                                                 Width="66"
1520
                                                 Height="30"
1496
                                                 Height="30"
1528
                                                 Foreground="#FFFFFF" />
1504
                                                 Foreground="#FFFFFF" />
1529
                                             <!--  打开按钮  -->
1505
                                             <!--  打开按钮  -->
1530
                                             <Button
1506
                                             <Button
1531
-                                                x:Name="btnOpen"
1507
+                                                x:Name="BtnOpen"
1532
                                                 Grid.Column="1"
1508
                                                 Grid.Column="1"
1533
                                                 Width="66"
1509
                                                 Width="66"
1534
                                                 Height="30"
1510
                                                 Height="30"
1603
 
1579
 
1604
                                     <Grid Grid.Row="3" Grid.Column="0">
1580
                                     <Grid Grid.Row="3" Grid.Column="0">
1605
                                         <TextBlock
1581
                                         <TextBlock
1606
-                                            x:Name="txbVersion"
1582
+                                            x:Name="TxbVersion"
1607
                                             Margin="0,0,0,0"
1583
                                             Margin="0,0,0,0"
1608
                                             HorizontalAlignment="Right"
1584
                                             HorizontalAlignment="Right"
1609
                                             VerticalAlignment="Center"
1585
                                             VerticalAlignment="Center"
1613
                                     </Grid>
1589
                                     </Grid>
1614
                                     <Grid Grid.Row="3" Grid.Column="1">
1590
                                     <Grid Grid.Row="3" Grid.Column="1">
1615
                                         <TextBlock
1591
                                         <TextBlock
1616
-                                            x:Name="txbv"
1592
+                                            x:Name="Txbv"
1617
                                             Margin="20,0,0,0"
1593
                                             Margin="20,0,0,0"
1618
                                             VerticalAlignment="Center"
1594
                                             VerticalAlignment="Center"
1619
                                             FontSize="16"
1595
                                             FontSize="16"
1682
                             <RowDefinition Height="50*" />
1658
                             <RowDefinition Height="50*" />
1683
                         </Grid.RowDefinitions>
1659
                         </Grid.RowDefinitions>
1684
                         <Label
1660
                         <Label
1685
-                            x:Name="lblVideoMess"
1661
+                            x:Name="LblVideoMess"
1686
                             Grid.Row="0"
1662
                             Grid.Row="0"
1687
                             Margin="0,0,0,100"
1663
                             Margin="0,0,0,100"
1688
                             HorizontalAlignment="Center"
1664
                             HorizontalAlignment="Center"
1705
                             FontSize="16"
1681
                             FontSize="16"
1706
                             Foreground="#FF333333" />
1682
                             Foreground="#FF333333" />
1707
                         <Label
1683
                         <Label
1708
-                            x:Name="lblVideoPageNum"
1684
+                            x:Name="LblVideoPageNum"
1709
                             Grid.Row="1"
1685
                             Grid.Row="1"
1710
                             Margin="0,0,0,10"
1686
                             Margin="0,0,0,10"
1711
                             HorizontalAlignment="Center"
1687
                             HorizontalAlignment="Center"
1741
                         <Grid Grid.Row="0">
1717
                         <Grid Grid.Row="0">
1742
                             <Border BorderBrush="#FFDCDCDC" BorderThickness="1">
1718
                             <Border BorderBrush="#FFDCDCDC" BorderThickness="1">
1743
                                 <ScrollViewer VerticalScrollBarVisibility="Visible">
1719
                                 <ScrollViewer VerticalScrollBarVisibility="Visible">
1744
-                                    <Image x:Name="imgPri" />
1720
+                                    <Image x:Name="ImgPri" />
1745
                                 </ScrollViewer>
1721
                                 </ScrollViewer>
1746
                             </Border>
1722
                             </Border>
1747
                         </Grid>
1723
                         </Grid>
1753
         <!--  打印相关  -->
1729
         <!--  打印相关  -->
1754
         <Border
1730
         <Border
1755
             x:Name="GridPrintingTitle"
1731
             x:Name="GridPrintingTitle"
1756
-            Grid.Column="1"
1757
             Width="446"
1732
             Width="446"
1758
             Height="188"
1733
             Height="188"
1759
             BorderBrush="#eeeeee"
1734
             BorderBrush="#eeeeee"
1799
                         Text="打印机" />
1774
                         Text="打印机" />
1800
 
1775
 
1801
                     <ComboBox
1776
                     <ComboBox
1802
-                        x:Name="cmbClass"
1777
+                        x:Name="CmbClass"
1803
                         Grid.Column="1"
1778
                         Grid.Column="1"
1804
                         Height="36"
1779
                         Height="36"
1805
                         Margin="10,0,10,0"
1780
                         Margin="10,0,10,0"
1812
                         DisplayMemberPath="Value"
1787
                         DisplayMemberPath="Value"
1813
                         FontSize="16"
1788
                         FontSize="16"
1814
                         SelectedValuePath="Key"
1789
                         SelectedValuePath="Key"
1815
-                        Style="{StaticResource stlComboBox}"
1790
+                        Style="{StaticResource StlComboBox}"
1816
                         Text="请选择" />
1791
                         Text="请选择" />
1817
                 </Grid>
1792
                 </Grid>
1818
 
1793
 
1834
                         VerticalAlignment="Center"
1809
                         VerticalAlignment="Center"
1835
                         Source="./Images/shuoming.png" />
1810
                         Source="./Images/shuoming.png" />
1836
                     <Button
1811
                     <Button
1837
-                        x:Name="btnPrintExplain"
1812
+                        x:Name="BtnPrintExplain"
1838
                         Grid.Column="1"
1813
                         Grid.Column="1"
1839
                         Height="36"
1814
                         Height="36"
1840
                         Margin="6,0,0,0"
1815
                         Margin="6,0,0,0"
1863
                         IsDefault="True" />
1838
                         IsDefault="True" />
1864
 
1839
 
1865
                     <Button
1840
                     <Button
1866
-                        x:Name="btnPrint_Print"
1841
+                        x:Name="BtnPrintPrint"
1867
                         Grid.Column="4"
1842
                         Grid.Column="4"
1868
                         Width="76"
1843
                         Width="76"
1869
                         Height="30"
1844
                         Height="30"
1906
                     FontSize="22"
1881
                     FontSize="22"
1907
                     Foreground="#FFF9F7F7" />
1882
                     Foreground="#FFF9F7F7" />
1908
                 <ProgressBar
1883
                 <ProgressBar
1909
-                    x:Name="pgbProcess"
1884
+                    x:Name="PgbProcess"
1910
                     Grid.Row="0"
1885
                     Grid.Row="0"
1911
                     Height="20"
1886
                     Height="20"
1912
                     Margin="50,20,50,0"
1887
                     Margin="50,20,50,0"
1914
                     Foreground="#4597FF"
1889
                     Foreground="#4597FF"
1915
                     Visibility="Visible" />
1890
                     Visibility="Visible" />
1916
                 <Label
1891
                 <Label
1917
-                    x:Name="lbProcess"
1892
+                    x:Name="LbProcess"
1918
                     Grid.Row="0"
1893
                     Grid.Row="0"
1919
                     Width="60"
1894
                     Width="60"
1920
                     Height="30"
1895
                     Height="30"
1927
             </Grid>
1902
             </Grid>
1928
         </Grid>
1903
         </Grid>
1929
     </Grid>
1904
     </Grid>
1930
-</Window>
1905
+</Window>

+ 185
- 221
XHWK.WKTool/MainWindow.xaml.cs View File

75
         //定义委托
75
         //定义委托
76
         public delegate void ChangeTextHandlers(string text, int i);
76
         public delegate void ChangeTextHandlers(string text, int i);
77
 
77
 
78
-        //private DispatcherTimer t = null;
79
-
80
         #region 上传
78
         #region 上传
81
 
79
 
82
-        /// <summary>
83
-        /// 数据列表
84
-        /// </summary>
85
-        internal FileDirectoryData pageData = new FileDirectoryData();
86
-
87
         /// <summary>
80
         /// <summary>
88
         /// 视频模型
81
         /// 视频模型
89
         /// </summary>
82
         /// </summary>
118
 
111
 
119
             ResizeMode = ResizeMode.CanMinimize;
112
             ResizeMode = ResizeMode.CanMinimize;
120
             BtnPrint.IsEnabled = false;
113
             BtnPrint.IsEnabled = false;
121
-            myblackboard = new BlackboardNew(blackboard_canvas);
114
+            myblackboard = new BlackboardNew(BlackboardCanvas);
122
             APP.PageContextData.pagenum = 0;
115
             APP.PageContextData.pagenum = 0;
123
             APP.PageContextData.currpage = 0;
116
             APP.PageContextData.currpage = 0;
124
             DataContext = APP.PageContextData;
117
             DataContext = APP.PageContextData;
127
             APP.PageDrawList = new List<Model_DrawData>();
120
             APP.PageDrawList = new List<Model_DrawData>();
128
             Model_DrawData modelDrawData = new Model_DrawData { PageNum = APP.PageContextData.currpage };
121
             Model_DrawData modelDrawData = new Model_DrawData { PageNum = APP.PageContextData.currpage };
129
             APP.PageDrawList.Add(modelDrawData);
122
             APP.PageDrawList.Add(modelDrawData);
130
-            txbv.Text = "v" + FileToolsCommon.GetConfigValue("VersionName");
131
-            txbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoType");
132
-            txbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoSavePath");
123
+            Txbv.Text = "v" + FileToolsCommon.GetConfigValue("VersionName");
124
+            TxbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoType");
125
+            TxbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoSavePath");
133
             Initialize();
126
             Initialize();
134
 
127
 
135
             //罗博手写板
128
             //罗博手写板
152
                 RectLeftDown,
145
                 RectLeftDown,
153
                 RectRightDown,
146
                 RectRightDown,
154
                 RectImgBorder,
147
                 RectImgBorder,
155
-                imgCanvas,
148
+                ImgCanvas,
156
                 GridM
149
                 GridM
157
             );
150
             );
158
             InitPrint();
151
             InitPrint();
189
         /// </summary>
182
         /// </summary>
190
         public void Initialize()
183
         public void Initialize()
191
         {
184
         {
192
-            if (APP.isDebug)
193
-            {
194
-                txbVersion.Text = "测试版:";
195
-            }
196
-            else
197
-            {
198
-                txbVersion.Text = "正式版:";
199
-            }
185
+            TxbVersion.Text = APP.isDebug ? "测试版:" : "正式版:";
200
 
186
 
201
             #region 数据初始化
187
             #region 数据初始化
202
 
188
 
216
             _drawingAttributes = new DrawingAttributes();
202
             _drawingAttributes = new DrawingAttributes();
217
             //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
203
             //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
218
             //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
204
             //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
219
-            blackboard_canvas.DefaultDrawingAttributes = _drawingAttributes;
220
-            blackboard_canvas.UseCustomCursor = true;
205
+            BlackboardCanvas.DefaultDrawingAttributes = _drawingAttributes;
206
+            BlackboardCanvas.UseCustomCursor = true;
221
             _drawingAttributes.FitToCurve = true;
207
             _drawingAttributes.FitToCurve = true;
222
             _drawingAttributes.IgnorePressure = false;
208
             _drawingAttributes.IgnorePressure = false;
223
             _drawingAttributes.Width = _penSize;
209
             _drawingAttributes.Width = _penSize;
224
             _drawingAttributes.Height = _penSize;
210
             _drawingAttributes.Height = _penSize;
225
             _drawingAttributes.Color = _color;
211
             _drawingAttributes.Color = _color;
226
-            blackboard_canvas.Cursor = Cursors.Pen;
212
+            BlackboardCanvas.Cursor = Cursors.Pen;
227
         }
213
         }
228
 
214
 
229
         /// <summary>
215
         /// <summary>
270
                 if (RectImgBorder.Visibility != Visibility.Hidden)
256
                 if (RectImgBorder.Visibility != Visibility.Hidden)
271
                 {
257
                 {
272
                     HideAngleBorder();
258
                     HideAngleBorder();
273
-                    imgCanvas.Source = null;
259
+                    ImgCanvas.Source = null;
274
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PdfImagePath = null;
260
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PdfImagePath = null;
275
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath = null;
261
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath = null;
276
                 }
262
                 }
297
 
283
 
298
         private async Task CheckDevice()
284
         private async Task CheckDevice()
299
         {
285
         {
300
-            Task<bool> checkMicrophone = Task.Run
301
-            (
302
-                () =>
303
-                {
304
-                    return ZAudioRecordHelper.IsDeviceGood(ZAudioRecordHelper.RecordType.microphone);
305
-                }
306
-            );
307
-            Task<bool> checkLoudspeaker = Task.Run
308
-            (
309
-                () =>
310
-                {
311
-                    return ZAudioRecordHelper.IsDeviceGood(ZAudioRecordHelper.RecordType.loudspeaker);
312
-                }
313
-            );
286
+            Task<bool> checkMicrophone = Task.Run(() => ZAudioRecordHelper.IsDeviceGood(ZAudioRecordHelper.RecordType.microphone));
287
+            Task<bool> checkLoudspeaker = Task.Run(() => ZAudioRecordHelper.IsDeviceGood(ZAudioRecordHelper.RecordType.loudspeaker));
314
             await Task.WhenAll(checkMicrophone, checkLoudspeaker);
288
             await Task.WhenAll(checkMicrophone, checkLoudspeaker);
315
             _microphoneGood = checkMicrophone.Result;
289
             _microphoneGood = checkMicrophone.Result;
316
             _loudspeakerGood = checkMicrophone.Result;
290
             _loudspeakerGood = checkMicrophone.Result;
343
                     "提示",
317
                     "提示",
344
                     MessageBoxButton.OKCancel
318
                     MessageBoxButton.OKCancel
345
                 );
319
                 );
346
-                if (dr == MessageBoxResult.OK)
320
+                if (dr != MessageBoxResult.OK)
347
                 {
321
                 {
348
-                    LoginType();
349
-                    Login();
322
+                    return;
350
                 }
323
                 }
324
+                LoginType();
325
+                Login();
351
             }
326
             }
352
         }
327
         }
353
 
328
 
402
             ImgHeadImgN.Visibility = Visibility.Visible;
377
             ImgHeadImgN.Visibility = Visibility.Visible;
403
             ImgHeadImg.Visibility = Visibility.Collapsed;
378
             ImgHeadImg.Visibility = Visibility.Collapsed;
404
             APP.UserInfo = new Model_UserInfo();
379
             APP.UserInfo = new Model_UserInfo();
405
-            //ImgUpload.Visibility = Visibility.Collapsed;
406
-            //ImgUploadTwo.Visibility = Visibility.Visible;
407
         }
380
         }
408
 
381
 
409
         #endregion 登录
382
         #endregion 登录
419
         /// </param>
392
         /// </param>
420
         private void BtnBrowse_Click(object sender, RoutedEventArgs e)
393
         private void BtnBrowse_Click(object sender, RoutedEventArgs e)
421
         {
394
         {
422
-            //System.Diagnostics.Process.Start(APP.WKData.WkPath);
423
-            //string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
424
             _fbd = new System.Windows.Forms.FolderBrowserDialog();
395
             _fbd = new System.Windows.Forms.FolderBrowserDialog();
425
             _result2 = _fbd.ShowDialog();
396
             _result2 = _fbd.ShowDialog();
426
-            if (_result2 == System.Windows.Forms.DialogResult.OK)
397
+            if (_result2 != System.Windows.Forms.DialogResult.OK)
427
             {
398
             {
428
-                if (_fbd.SelectedPath != "")
429
-                {
430
-                    txbStoragePath.Content = _fbd.SelectedPath;
431
-                }
399
+                return;
400
+            }
401
+            if (_fbd.SelectedPath != "")
402
+            {
403
+                TxbStoragePath.Content = _fbd.SelectedPath;
432
             }
404
             }
433
         }
405
         }
434
 
406
 
456
             try
428
             try
457
             {
429
             {
458
                 BtnRecord.IsEnabled = true; //设置结束时可录制
430
                 BtnRecord.IsEnabled = true; //设置结束时可录制
459
-                if (rbnMP4.IsChecked == true)
431
+                if (RbnMp4.IsChecked == true)
460
                 {
432
                 {
461
                     //存储文件
433
                     //存储文件
462
                     FileToolsCommon.SetConfigValue("VideoType", "1");
434
                     FileToolsCommon.SetConfigValue("VideoType", "1");
463
                 }
435
                 }
464
-                else if (rbnFLV.IsChecked == true)
436
+                else if (RbnFlv.IsChecked == true)
465
                 {
437
                 {
466
                     FileToolsCommon.SetConfigValue("VideoType", "2");
438
                     FileToolsCommon.SetConfigValue("VideoType", "2");
467
                 }
439
                 }
472
                 UpdateHideSrToolConfig();
444
                 UpdateHideSrToolConfig();
473
 
445
 
474
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
446
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
475
-                if (rbnRight.IsChecked == true)
447
+                if (RbnRight.IsChecked == true)
476
                 {
448
                 {
477
                     FileToolsCommon.SetConfigValue("CameraPosition", "1");
449
                     FileToolsCommon.SetConfigValue("CameraPosition", "1");
478
                 }
450
                 }
479
-                else if (rbnLeft.IsChecked == true)
451
+                else if (RbnLeft.IsChecked == true)
480
                 {
452
                 {
481
                     FileToolsCommon.SetConfigValue("CameraPosition", "2");
453
                     FileToolsCommon.SetConfigValue("CameraPosition", "2");
482
                 }
454
                 }
483
-                else if (rbnRightUnder.IsChecked == true)
455
+                else if (RbnRightUnder.IsChecked == true)
484
                 {
456
                 {
485
                     FileToolsCommon.SetConfigValue("CameraPosition", "3");
457
                     FileToolsCommon.SetConfigValue("CameraPosition", "3");
486
                 }
458
                 }
487
-                else if (rbnLeftUnder.IsChecked == true)
459
+                else if (RbnLeftUnder.IsChecked == true)
488
                 {
460
                 {
489
                     FileToolsCommon.SetConfigValue("CameraPosition", "4");
461
                     FileToolsCommon.SetConfigValue("CameraPosition", "4");
490
                 }
462
                 }
491
                 //格式
463
                 //格式
492
-                if (rbnMP4.IsChecked == true)
464
+                if (RbnMp4.IsChecked == true)
493
                 {
465
                 {
494
                     FileToolsCommon.SetConfigValue("VideoType", "1");
466
                     FileToolsCommon.SetConfigValue("VideoType", "1");
495
                 }
467
                 }
496
-                else if (rbnFLV.IsChecked == true)
468
+                else if (RbnFlv.IsChecked == true)
497
                 {
469
                 {
498
                     FileToolsCommon.SetConfigValue("VideoType", "2");
470
                     FileToolsCommon.SetConfigValue("VideoType", "2");
499
                 }
471
                 }
500
-                else if (rbnAVI.IsChecked == true)
472
+                else if (RbnAvi.IsChecked == true)
501
                 {
473
                 {
502
                     FileToolsCommon.SetConfigValue("VideoType", "3");
474
                     FileToolsCommon.SetConfigValue("VideoType", "3");
503
                 }
475
                 }
505
                 GridMain.Visibility = Visibility.Visible;
477
                 GridMain.Visibility = Visibility.Visible;
506
                 GridM.IsEnabled = true;
478
                 GridM.IsEnabled = true;
507
                 GridRecordingTitle.Visibility = Visibility.Visible;
479
                 GridRecordingTitle.Visibility = Visibility.Visible;
508
-                gridSetUp.Visibility = Visibility.Collapsed;
480
+                GridSetUp.Visibility = Visibility.Collapsed;
509
                 ImgPlayerRight.Visibility = Visibility.Collapsed;
481
                 ImgPlayerRight.Visibility = Visibility.Collapsed;
510
                 ImgPlayerLeft.Visibility = Visibility.Collapsed;
482
                 ImgPlayerLeft.Visibility = Visibility.Collapsed;
511
                 ImgPlayerRightUnder.Visibility = Visibility.Collapsed;
483
                 ImgPlayerRightUnder.Visibility = Visibility.Collapsed;
512
                 ImgPlayerLeftUnder.Visibility = Visibility.Collapsed;
484
                 ImgPlayerLeftUnder.Visibility = Visibility.Collapsed;
513
-                if (!txbStoragePath.Content.ToString().Equals(APP.WKData.WkPath))
485
+                if (!TxbStoragePath.Content.ToString().Equals(APP.WKData.WkPath))
514
                 {
486
                 {
515
                     //存储文件
487
                     //存储文件
516
-                    FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
488
+                    FileToolsCommon.SetConfigValue("VideoSavePath", TxbStoragePath.Content.ToString());
517
                     MessageWindow.Show("路径已变更,下次创建微课时自动生效。");
489
                     MessageWindow.Show("路径已变更,下次创建微课时自动生效。");
518
                 }
490
                 }
519
             }
491
             }
532
         /// </param>
504
         /// </param>
533
         private void BtnSetUp_Click(object sender, RoutedEventArgs e)
505
         private void BtnSetUp_Click(object sender, RoutedEventArgs e)
534
         {
506
         {
535
-            if (gridSetUp.Visibility == Visibility.Collapsed)
507
+            if (GridSetUp.Visibility == Visibility.Collapsed)
536
             {
508
             {
537
                 PageHide();
509
                 PageHide();
538
-                gridSetUp.Visibility = Visibility.Visible;
539
-                txbStoragePath.Content = APP.WKData.WkPath;
510
+                GridSetUp.Visibility = Visibility.Visible;
511
+                TxbStoragePath.Content = APP.WKData.WkPath;
540
 
512
 
541
                 #region 读取用户配置
513
                 #region 读取用户配置
542
 
514
 
543
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
515
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
544
                 if ("1".Equals(APP.CameraPosition))
516
                 if ("1".Equals(APP.CameraPosition))
545
                 {
517
                 {
546
-                    rbnRight.IsChecked = true;
518
+                    RbnRight.IsChecked = true;
547
                 }
519
                 }
548
                 else if ("2".Equals(APP.CameraPosition))
520
                 else if ("2".Equals(APP.CameraPosition))
549
                 {
521
                 {
550
-                    rbnLeft.IsChecked = true;
522
+                    RbnLeft.IsChecked = true;
551
                 }
523
                 }
552
                 else if ("3".Equals(APP.CameraPosition))
524
                 else if ("3".Equals(APP.CameraPosition))
553
                 {
525
                 {
554
-                    rbnRightUnder.IsChecked = true;
526
+                    RbnRightUnder.IsChecked = true;
555
                 }
527
                 }
556
                 else if ("4".Equals(APP.CameraPosition))
528
                 else if ("4".Equals(APP.CameraPosition))
557
                 {
529
                 {
558
-                    rbnLeftUnder.IsChecked = true;
530
+                    RbnLeftUnder.IsChecked = true;
559
                 }
531
                 }
560
                 string type = FileToolsCommon.GetConfigValue("VideoType"); //<!--视频格式 1、MP4 2、FlV 3、AVI-->
532
                 string type = FileToolsCommon.GetConfigValue("VideoType"); //<!--视频格式 1、MP4 2、FlV 3、AVI-->
561
                 if ("1".Equals(type))
533
                 if ("1".Equals(type))
562
                 {
534
                 {
563
-                    rbnMP4.IsChecked = true;
535
+                    RbnMp4.IsChecked = true;
564
                 }
536
                 }
565
                 else if ("2".Equals(type))
537
                 else if ("2".Equals(type))
566
                 {
538
                 {
567
-                    rbnFLV.IsChecked = true;
539
+                    RbnFlv.IsChecked = true;
568
                 }
540
                 }
569
                 else if ("3".Equals(type))
541
                 else if ("3".Equals(type))
570
                 {
542
                 {
571
-                    rbnAVI.IsChecked = true;
543
+                    RbnAvi.IsChecked = true;
572
                 }
544
                 }
573
                 string isHide = FileToolsCommon.GetConfigValue("IsHideSRTool"); //工具栏是否隐藏
545
                 string isHide = FileToolsCommon.GetConfigValue("IsHideSRTool"); //工具栏是否隐藏
574
                 if (isHide.Equals("1"))
546
                 if (isHide.Equals("1"))
575
                 {
547
                 {
576
-                    rbnHide.IsChecked = true;
548
+                    RbnHide.IsChecked = true;
577
                 }
549
                 }
578
                 else
550
                 else
579
                 {
551
                 {
580
-                    rbnvisi.IsChecked = true;
552
+                    Rbnvisi.IsChecked = true;
581
                 }
553
                 }
582
-                //string isSound = FileToolsCommon.GetConfigValue("IsSound");//<!--声音 true 有 false 无-->
583
-                //if (isSound == "true")
584
-                //{
585
-                //    rbnY.IsChecked = true;
586
-                //}
587
-                //else
588
-                //{
589
-                //    rbnN.IsChecked = true;
590
-                //}
554
+
591
                 //加载皮肤按钮
555
                 //加载皮肤按钮
592
                 SkinSelectInit();
556
                 SkinSelectInit();
593
 
557
 
598
                 GridMain.Visibility = Visibility.Visible;
562
                 GridMain.Visibility = Visibility.Visible;
599
                 GridM.IsEnabled = true;
563
                 GridM.IsEnabled = true;
600
                 GridRecordingTitle.Visibility = Visibility.Visible;
564
                 GridRecordingTitle.Visibility = Visibility.Visible;
601
-                gridSetUp.Visibility = Visibility.Collapsed;
565
+                GridSetUp.Visibility = Visibility.Collapsed;
602
             }
566
             }
603
         }
567
         }
604
 
568
 
607
         /// </summary>
571
         /// </summary>
608
         private void UpdateHideSrToolConfig()
572
         private void UpdateHideSrToolConfig()
609
         {
573
         {
610
-            if (rbnHide.IsChecked == true)
574
+            if (RbnHide.IsChecked == true)
611
             {
575
             {
612
                 //隐藏
576
                 //隐藏
613
                 FileToolsCommon.SetConfigValue("IsHideSRTool", "1");
577
                 FileToolsCommon.SetConfigValue("IsHideSRTool", "1");
715
             {
679
             {
716
                 APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = true;
680
                 APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = true;
717
             }
681
             }
718
-            if (blackboard_canvas.Visibility == Visibility.Collapsed)
682
+            if (BlackboardCanvas.Visibility == Visibility.Collapsed)
719
             {
683
             {
720
-                blackboard_canvas.Visibility = Visibility.Visible;
684
+                BlackboardCanvas.Visibility = Visibility.Visible;
721
             }
685
             }
722
             APP.PageContextData.pagenum += 1;
686
             APP.PageContextData.pagenum += 1;
723
             HideAngleBorder();
687
             HideAngleBorder();
726
             myblackboard.changepage(APP.PageContextData.currpage - 1);
690
             myblackboard.changepage(APP.PageContextData.currpage - 1);
727
             ScroMain.ScrollToVerticalOffset(0);
691
             ScroMain.ScrollToVerticalOffset(0);
728
             //清空页面图片UI
692
             //清空页面图片UI
729
-            imgCanvas.Source = null;
730
-            imgDocumentation.Source = null;
731
-            imgPPT.Source = null;
693
+            ImgCanvas.Source = null;
694
+            ImgDocumentation.Source = null;
695
+            ImgPpt.Source = null;
732
             if (APP.PageContextData.pagenum == 1)
696
             if (APP.PageContextData.pagenum == 1)
733
             {
697
             {
734
                 APP.PageDrawList = new List<Model_DrawData>();
698
                 APP.PageDrawList = new List<Model_DrawData>();
886
         private void PageHide()
850
         private void PageHide()
887
         {
851
         {
888
             //设置
852
             //设置
889
-            gridSetUp.Visibility = Visibility.Collapsed;
853
+            GridSetUp.Visibility = Visibility.Collapsed;
890
             //我的
854
             //我的
891
             GridMyVideo.Visibility = Visibility.Collapsed;
855
             GridMyVideo.Visibility = Visibility.Collapsed;
892
             //首页
856
             //首页
902
 
866
 
903
         private void Print()
867
         private void Print()
904
         {
868
         {
905
-            if (string.IsNullOrWhiteSpace(cmbClass.Text))
869
+            if (string.IsNullOrWhiteSpace(CmbClass.Text))
906
             {
870
             {
907
                 MessageWindow.Show("请设置打印机!");
871
                 MessageWindow.Show("请设置打印机!");
908
                 return;
872
                 return;
915
             //打印数量
879
             //打印数量
916
             printmodel.num = 1;
880
             printmodel.num = 1;
917
             //打印机名称
881
             //打印机名称
918
-            string printerName = cmbClass.Text;
882
+            string printerName = CmbClass.Text;
919
             printmodel.printname = printerName;
883
             printmodel.printname = printerName;
920
             _printMsg = "准备中";
884
             _printMsg = "准备中";
921
             _msgnum = 0;
885
             _msgnum = 0;
1081
                 ImgPlayerLeft.Visibility = Visibility.Hidden;
1045
                 ImgPlayerLeft.Visibility = Visibility.Hidden;
1082
                 ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1046
                 ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1083
                 ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
1047
                 ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
1048
+                RbnOpen.IsEnabled = false;
1084
                 CameraHelper.CloseDevice();
1049
                 CameraHelper.CloseDevice();
1050
+                RbnOpen.IsEnabled = true;
1085
             }
1051
             }
1086
         }
1052
         }
1087
 
1053
 
1113
         /// </param>
1079
         /// </param>
1114
         /// <param name="e">
1080
         /// <param name="e">
1115
         /// </param>
1081
         /// </param>
1116
-        private void BtnDevice_Click(object sender, RoutedEventArgs e)
1082
+        private async void BtnDevice_Click(object sender, RoutedEventArgs e)
1117
         {
1083
         {
1118
-            RbnTurnOff.IsChecked = true;
1119
-            RbnTurnOff_Click(null, null);
1084
+            if (RbnTurnOff.IsChecked != null && !(bool)RbnTurnOff.IsChecked)
1085
+            {
1086
+                RbnTurnOff.IsChecked = true;
1087
+                RbnTurnOff_Click(null, null);
1088
+                await Task.Delay(1000);
1089
+            }
1120
             DeviceWindow deviceWin = new DeviceWindow();
1090
             DeviceWindow deviceWin = new DeviceWindow();
1121
-            deviceWin.Show();
1091
+            deviceWin.ShowDialog();
1122
         }
1092
         }
1123
 
1093
 
1124
         #endregion 设备检测
1094
         #endregion 设备检测
1138
         {
1108
         {
1139
             _drawingAttributes.Color = Colors.DeepSkyBlue;
1109
             _drawingAttributes.Color = Colors.DeepSkyBlue;
1140
             _color = Colors.DeepSkyBlue;
1110
             _color = Colors.DeepSkyBlue;
1141
-            imgRed.Visibility = Visibility.Collapsed;
1142
-            imgGray.Visibility = Visibility.Collapsed;
1143
-            imgCyanBlue.Visibility = Visibility.Collapsed;
1144
-            imgYellow.Visibility = Visibility.Collapsed;
1145
-            imgBlue.Visibility = Visibility.Visible;
1111
+            ImgRed.Visibility = Visibility.Collapsed;
1112
+            ImgGray.Visibility = Visibility.Collapsed;
1113
+            ImgCyanBlue.Visibility = Visibility.Collapsed;
1114
+            ImgYellow.Visibility = Visibility.Collapsed;
1115
+            ImgBlue.Visibility = Visibility.Visible;
1146
         }
1116
         }
1147
 
1117
 
1148
         /// <summary>
1118
         /// <summary>
1156
         {
1126
         {
1157
             _drawingAttributes.Color = Colors.LimeGreen;
1127
             _drawingAttributes.Color = Colors.LimeGreen;
1158
             _color = Colors.LimeGreen;
1128
             _color = Colors.LimeGreen;
1159
-            imgRed.Visibility = Visibility.Collapsed;
1160
-            imgGray.Visibility = Visibility.Collapsed;
1161
-            imgCyanBlue.Visibility = Visibility.Visible;
1162
-            imgYellow.Visibility = Visibility.Collapsed;
1163
-            imgBlue.Visibility = Visibility.Collapsed;
1129
+            ImgRed.Visibility = Visibility.Collapsed;
1130
+            ImgGray.Visibility = Visibility.Collapsed;
1131
+            ImgCyanBlue.Visibility = Visibility.Visible;
1132
+            ImgYellow.Visibility = Visibility.Collapsed;
1133
+            ImgBlue.Visibility = Visibility.Collapsed;
1164
         }
1134
         }
1165
 
1135
 
1166
         /// <summary>
1136
         /// <summary>
1174
         {
1144
         {
1175
             _drawingAttributes.Color = Colors.Black;
1145
             _drawingAttributes.Color = Colors.Black;
1176
             _color = Colors.Black;
1146
             _color = Colors.Black;
1177
-            imgRed.Visibility = Visibility.Collapsed;
1178
-            imgGray.Visibility = Visibility.Visible;
1179
-            imgCyanBlue.Visibility = Visibility.Collapsed;
1180
-            imgYellow.Visibility = Visibility.Collapsed;
1181
-            imgBlue.Visibility = Visibility.Collapsed;
1147
+            ImgRed.Visibility = Visibility.Collapsed;
1148
+            ImgGray.Visibility = Visibility.Visible;
1149
+            ImgCyanBlue.Visibility = Visibility.Collapsed;
1150
+            ImgYellow.Visibility = Visibility.Collapsed;
1151
+            ImgBlue.Visibility = Visibility.Collapsed;
1182
         }
1152
         }
1183
 
1153
 
1184
         /// <summary>
1154
         /// <summary>
1193
             //设置 DrawingAttributes 的 Color 属性设置颜色
1163
             //设置 DrawingAttributes 的 Color 属性设置颜色
1194
             _drawingAttributes.Color = Colors.Red;
1164
             _drawingAttributes.Color = Colors.Red;
1195
             _color = Colors.Red;
1165
             _color = Colors.Red;
1196
-            imgRed.Visibility = Visibility.Visible;
1197
-            imgGray.Visibility = Visibility.Collapsed;
1198
-            imgCyanBlue.Visibility = Visibility.Collapsed;
1199
-            imgYellow.Visibility = Visibility.Collapsed;
1200
-            imgBlue.Visibility = Visibility.Collapsed;
1166
+            ImgRed.Visibility = Visibility.Visible;
1167
+            ImgGray.Visibility = Visibility.Collapsed;
1168
+            ImgCyanBlue.Visibility = Visibility.Collapsed;
1169
+            ImgYellow.Visibility = Visibility.Collapsed;
1170
+            ImgBlue.Visibility = Visibility.Collapsed;
1201
         }
1171
         }
1202
 
1172
 
1203
         /// <summary>
1173
         /// <summary>
1209
         /// </param>
1179
         /// </param>
1210
         private void BtnWhite_Click(object sender, RoutedEventArgs e)
1180
         private void BtnWhite_Click(object sender, RoutedEventArgs e)
1211
         {
1181
         {
1212
-            ////创建 DrawingAttributes 类的一个实例
1213
-            //drawingAttributes = new DrawingAttributes();
1214
-            ////将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
1215
-            ////InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
1216
-            //blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
1217
-            ////设置 DrawingAttributes 的 Color 属性设置颜色
1218
             _drawingAttributes.Color = Colors.White;
1182
             _drawingAttributes.Color = Colors.White;
1219
             _color = Colors.White;
1183
             _color = Colors.White;
1220
         }
1184
         }
1230
         {
1194
         {
1231
             _drawingAttributes.Color = Colors.Gold;
1195
             _drawingAttributes.Color = Colors.Gold;
1232
             _color = Colors.Gold;
1196
             _color = Colors.Gold;
1233
-            imgRed.Visibility = Visibility.Collapsed;
1234
-            imgGray.Visibility = Visibility.Collapsed;
1235
-            imgCyanBlue.Visibility = Visibility.Collapsed;
1236
-            imgYellow.Visibility = Visibility.Visible;
1237
-            imgBlue.Visibility = Visibility.Collapsed;
1197
+            ImgRed.Visibility = Visibility.Collapsed;
1198
+            ImgGray.Visibility = Visibility.Collapsed;
1199
+            ImgCyanBlue.Visibility = Visibility.Collapsed;
1200
+            ImgYellow.Visibility = Visibility.Visible;
1201
+            ImgBlue.Visibility = Visibility.Collapsed;
1238
         }
1202
         }
1239
 
1203
 
1240
         private void imgCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
1204
         private void imgCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
1396
         {
1360
         {
1397
             Record();
1361
             Record();
1398
             HideAngleBorder();
1362
             HideAngleBorder();
1399
-            imgCanvas.Margin = new Thickness
1363
+            ImgCanvas.Margin = new Thickness
1400
             (
1364
             (
1401
                 0,
1365
                 0,
1402
                 0,
1366
                 0,
1492
                     }
1456
                     }
1493
                     if (APP.PageDrawList.Count >= APP.PageContextData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
1457
                     if (APP.PageDrawList.Count >= APP.PageContextData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
1494
                     {
1458
                     {
1495
-                        imgDocumentation.Source = null;
1459
+                        ImgDocumentation.Source = null;
1496
                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1460
                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1497
                         _mouseDown = false;
1461
                         _mouseDown = false;
1498
                         _imageOperationUtil.setMouseDown(_mouseDown);
1462
                         _imageOperationUtil.setMouseDown(_mouseDown);
1503
                         };
1467
                         };
1504
                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1468
                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1505
                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
1469
                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
1506
-                        imgCanvas.Source = bitImg;
1507
-                        imgCanvas.Width = bitImg.Width;
1508
-                        imgCanvas.Height = bitImg.Height;
1470
+                        ImgCanvas.Source = bitImg;
1471
+                        ImgCanvas.Width = bitImg.Width;
1472
+                        ImgCanvas.Height = bitImg.Height;
1509
                         ScroMain.ScrollToVerticalOffset(0);
1473
                         ScroMain.ScrollToVerticalOffset(0);
1510
                         APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes = new ScaleTransform
1474
                         APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes = new ScaleTransform
1511
                         {
1475
                         {
1512
-                            CenterX = imgCanvas.Width,
1513
-                            CenterY = imgCanvas.Height
1476
+                            CenterX = ImgCanvas.Width,
1477
+                            CenterY = ImgCanvas.Height
1514
                         };
1478
                         };
1515
                         BtnPrint.IsEnabled = true;
1479
                         BtnPrint.IsEnabled = true;
1516
                     }
1480
                     }
1667
                                         }
1631
                                         }
1668
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1632
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1669
                                         {
1633
                                         {
1670
-                                            imgCanvas.Source = null;
1634
+                                            ImgCanvas.Source = null;
1671
                                             BtnScreenshot.IsEnabled = false;
1635
                                             BtnScreenshot.IsEnabled = false;
1672
-                                            imgDocumentation.Source = null;
1673
-                                            imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1636
+                                            ImgDocumentation.Source = null;
1637
+                                            ImgPpt.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1674
                                             ScroMain.ScrollToVerticalOffset(0);
1638
                                             ScroMain.ScrollToVerticalOffset(0);
1675
                                             for (int i = iStart; i < iEnd; i++)
1639
                                             for (int i = iStart; i < iEnd; i++)
1676
                                             {
1640
                                             {
1682
                                                 APP.PageDrawList[i].IsImageLocation = true;
1646
                                                 APP.PageDrawList[i].IsImageLocation = true;
1683
                                                 APP.PageDrawList[i].ImageSizes = new ScaleTransform
1647
                                                 APP.PageDrawList[i].ImageSizes = new ScaleTransform
1684
                                                 {
1648
                                                 {
1685
-                                                    CenterX = imgCanvas.Width,
1686
-                                                    CenterY = imgCanvas.Height
1649
+                                                    CenterX = ImgCanvas.Width,
1650
+                                                    CenterY = ImgCanvas.Height
1687
                                                 };
1651
                                                 };
1688
                                             }
1652
                                             }
1689
                                         }
1653
                                         }
1690
                                         else
1654
                                         else
1691
                                         {
1655
                                         {
1692
-                                            imgDocumentation.Source = null;
1693
-                                            imgCanvas.Source = null;
1694
-                                            imgPPT.Source = null;
1656
+                                            ImgDocumentation.Source = null;
1657
+                                            ImgCanvas.Source = null;
1658
+                                            ImgPpt.Source = null;
1695
                                             //截图可用
1659
                                             //截图可用
1696
                                             BtnScreenshot.IsEnabled = true;
1660
                                             BtnScreenshot.IsEnabled = true;
1697
                                         }
1661
                                         }
1805
                                         }
1769
                                         }
1806
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1770
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1807
                                         {
1771
                                         {
1808
-                                            imgCanvas.Source = null;
1809
-                                            imgPPT.Source = null;
1772
+                                            ImgCanvas.Source = null;
1773
+                                            ImgPpt.Source = null;
1810
                                             BtnScreenshot.IsEnabled = false;
1774
                                             BtnScreenshot.IsEnabled = false;
1811
-                                            imgDocumentation.Visibility = Visibility.Visible;
1812
-                                            imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath)); //给当前页面展示图片
1775
+                                            ImgDocumentation.Visibility = Visibility.Visible;
1776
+                                            ImgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath)); //给当前页面展示图片
1813
                                             ScroMain.ScrollToVerticalOffset(0);
1777
                                             ScroMain.ScrollToVerticalOffset(0);
1814
                                         }
1778
                                         }
1815
                                         else
1779
                                         else
1816
                                         {
1780
                                         {
1817
-                                            imgDocumentation.Source = null;
1818
-                                            imgCanvas.Source = null;
1819
-                                            imgPPT.Source = null;
1781
+                                            ImgDocumentation.Source = null;
1782
+                                            ImgCanvas.Source = null;
1783
+                                            ImgPpt.Source = null;
1820
                                             //截图可用
1784
                                             //截图可用
1821
                                             BtnScreenshot.IsEnabled = true;
1785
                                             BtnScreenshot.IsEnabled = true;
1822
                                         }
1786
                                         }
1895
                                     }
1859
                                     }
1896
                                     if (APP.PageDrawList.Count >= APP.PageContextData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
1860
                                     if (APP.PageDrawList.Count >= APP.PageContextData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
1897
                                     {
1861
                                     {
1898
-                                        imgDocumentation.Source = null;
1862
+                                        ImgDocumentation.Source = null;
1899
                                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1863
                                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1900
                                         _mouseDown = false;
1864
                                         _mouseDown = false;
1901
                                         _imageOperationUtil.setMouseDown(_mouseDown);
1865
                                         _imageOperationUtil.setMouseDown(_mouseDown);
1906
                                         };
1870
                                         };
1907
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1871
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1908
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
1872
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
1909
-                                        imgCanvas.Source = bitImg;
1910
-                                        imgCanvas.Width = bitImg.Width;
1911
-                                        imgCanvas.Height = bitImg.Height;
1873
+                                        ImgCanvas.Source = bitImg;
1874
+                                        ImgCanvas.Width = bitImg.Width;
1875
+                                        ImgCanvas.Height = bitImg.Height;
1912
                                         ScroMain.ScrollToVerticalOffset(0);
1876
                                         ScroMain.ScrollToVerticalOffset(0);
1913
-                                        imgCanvas.Margin = new Thickness
1877
+                                        ImgCanvas.Margin = new Thickness
1914
                                         (
1878
                                         (
1915
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
1879
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
1916
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
1880
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
1919
                                         );
1883
                                         );
1920
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes = new ScaleTransform
1884
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes = new ScaleTransform
1921
                                         {
1885
                                         {
1922
-                                            CenterX = imgCanvas.Width,
1923
-                                            CenterY = imgCanvas.Height
1886
+                                            CenterX = ImgCanvas.Width,
1887
+                                            CenterY = ImgCanvas.Height
1924
                                         };
1888
                                         };
1925
                                         BtnPrint.IsEnabled = true;
1889
                                         BtnPrint.IsEnabled = true;
1926
                                     }
1890
                                     }
1982
                                         }
1946
                                         }
1983
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1947
                                         if (APP.PageDrawList != null && APP.PageContextData.currpage > 0 && APP.PageContextData.currpage <= APP.PageDrawList.Count)
1984
                                         {
1948
                                         {
1985
-                                            imgCanvas.Source = null;
1986
-                                            imgPPT.Source = null;
1949
+                                            ImgCanvas.Source = null;
1950
+                                            ImgPpt.Source = null;
1987
                                             BtnScreenshot.IsEnabled = false;
1951
                                             BtnScreenshot.IsEnabled = false;
1988
-                                            imgDocumentation.Visibility = Visibility.Visible;
1989
-                                            imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath)); //给当前页面展示图片
1952
+                                            ImgDocumentation.Visibility = Visibility.Visible;
1953
+                                            ImgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath)); //给当前页面展示图片
1990
                                             ScroMain.ScrollToVerticalOffset(0);
1954
                                             ScroMain.ScrollToVerticalOffset(0);
1991
                                         }
1955
                                         }
1992
                                         else
1956
                                         else
1993
                                         {
1957
                                         {
1994
-                                            imgDocumentation.Source = null;
1995
-                                            imgCanvas.Source = null;
1996
-                                            imgPPT.Source = null;
1958
+                                            ImgDocumentation.Source = null;
1959
+                                            ImgCanvas.Source = null;
1960
+                                            ImgPpt.Source = null;
1997
                                             //截图可用
1961
                                             //截图可用
1998
                                             BtnScreenshot.IsEnabled = true;
1962
                                             BtnScreenshot.IsEnabled = true;
1999
                                         }
1963
                                         }
2223
         /// </summary>
2187
         /// </summary>
2224
         private void LoadCurrentPageData()
2188
         private void LoadCurrentPageData()
2225
         {
2189
         {
2226
-            lblVideoPageNum.Content = _currentPage + "/" + _totalPage;
2190
+            LblVideoPageNum.Content = _currentPage + "/" + _totalPage;
2227
             //隐藏显示的控件
2191
             //隐藏显示的控件
2228
             if (_videoControlList.Count > 0)
2192
             if (_videoControlList.Count > 0)
2229
             {
2193
             {
2298
             LoadingVideoList();
2262
             LoadingVideoList();
2299
             if (_modelVideoList.Count > 0)
2263
             if (_modelVideoList.Count > 0)
2300
             {
2264
             {
2301
-                lblVideoMess.Visibility = Visibility.Hidden;
2265
+                LblVideoMess.Visibility = Visibility.Hidden;
2302
                 BtnVideoUpPage.Visibility = Visibility.Visible;
2266
                 BtnVideoUpPage.Visibility = Visibility.Visible;
2303
-                lblVideoPageNum.Visibility = Visibility.Visible;
2267
+                LblVideoPageNum.Visibility = Visibility.Visible;
2304
                 BtnVideoDownPage.Visibility = Visibility.Visible;
2268
                 BtnVideoDownPage.Visibility = Visibility.Visible;
2305
                 if (GridMyVideo.ActualHeight > 0)
2269
                 if (GridMyVideo.ActualHeight > 0)
2306
                 {
2270
                 {
2335
             }
2299
             }
2336
             else
2300
             else
2337
             {
2301
             {
2338
-                lblVideoMess.Visibility = Visibility.Visible;
2302
+                LblVideoMess.Visibility = Visibility.Visible;
2339
                 BtnVideoUpPage.Visibility = Visibility.Hidden;
2303
                 BtnVideoUpPage.Visibility = Visibility.Hidden;
2340
-                lblVideoPageNum.Visibility = Visibility.Hidden;
2304
+                LblVideoPageNum.Visibility = Visibility.Hidden;
2341
                 BtnVideoDownPage.Visibility = Visibility.Hidden;
2305
                 BtnVideoDownPage.Visibility = Visibility.Hidden;
2342
                 //隐藏显示的控件
2306
                 //隐藏显示的控件
2343
                 if (_videoControlList.Count > 0)
2307
                 if (_videoControlList.Count > 0)
2566
             }
2530
             }
2567
             if (_recordType == 0)
2531
             if (_recordType == 0)
2568
             {
2532
             {
2569
-                start_pause_grid.Visibility = Visibility.Hidden;
2570
-                stop_grid.Visibility = Visibility.Hidden;
2571
-                close_grid.Visibility = Visibility.Hidden;
2533
+                StartPauseGrid.Visibility = Visibility.Hidden;
2534
+                StopGrid.Visibility = Visibility.Hidden;
2535
+                CloseGrid.Visibility = Visibility.Hidden;
2572
                 if (!_microphoneGood)
2536
                 if (!_microphoneGood)
2573
                 {
2537
                 {
2574
-                    start_pause_grid.Visibility = Visibility.Visible;
2575
-                    stop_grid.Visibility = Visibility.Visible;
2576
-                    close_grid.Visibility = Visibility.Visible;
2538
+                    StartPauseGrid.Visibility = Visibility.Visible;
2539
+                    StopGrid.Visibility = Visibility.Visible;
2540
+                    CloseGrid.Visibility = Visibility.Visible;
2577
                     MessageWindow.Show("麦克风不可用");
2541
                     MessageWindow.Show("麦克风不可用");
2578
                     return;
2542
                     return;
2579
                 }
2543
                 }
2580
-                blackboard_canvas.Visibility = Visibility.Visible;
2544
+                BlackboardCanvas.Visibility = Visibility.Visible;
2581
                 if (RectImgBorder.Visibility != Visibility.Hidden)
2545
                 if (RectImgBorder.Visibility != Visibility.Hidden)
2582
                 {
2546
                 {
2583
                     HideAngleBorder();
2547
                     HideAngleBorder();
2591
                 BtnSetUp.IsEnabled = false;
2555
                 BtnSetUp.IsEnabled = false;
2592
                 BtnDevice.IsEnabled = false;
2556
                 BtnDevice.IsEnabled = false;
2593
                 BtnLoginType.IsEnabled = false;
2557
                 BtnLoginType.IsEnabled = false;
2594
-                blackboard_canvas.Visibility = Visibility.Visible;
2558
+                BlackboardCanvas.Visibility = Visibility.Visible;
2595
                 TxbType.Text = "准备录制";
2559
                 TxbType.Text = "准备录制";
2596
                 BtnRecord.Visibility = Visibility.Collapsed;
2560
                 BtnRecord.Visibility = Visibility.Collapsed;
2597
                 BtnRecordSuspend.Visibility = Visibility.Visible;
2561
                 BtnRecordSuspend.Visibility = Visibility.Visible;
2616
                 await Task.Delay(3000);
2580
                 await Task.Delay(3000);
2617
                 //停止中开始录制
2581
                 //停止中开始录制
2618
                 _recordType = 3;
2582
                 _recordType = 3;
2619
-                close_grid.Visibility = Visibility.Visible;
2583
+                CloseGrid.Visibility = Visibility.Visible;
2620
                 TxbType.Text = "正在录制";
2584
                 TxbType.Text = "正在录制";
2621
                 _recordType = 1;
2585
                 _recordType = 1;
2622
                 await StartRecord();
2586
                 await StartRecord();
2623
-                start_pause_grid.Visibility = Visibility.Visible;
2624
-                stop_grid.Visibility = Visibility.Visible;
2587
+                StartPauseGrid.Visibility = Visibility.Visible;
2588
+                StopGrid.Visibility = Visibility.Visible;
2625
             }
2589
             }
2626
             else if (_recordType == 1)
2590
             else if (_recordType == 1)
2627
             {
2591
             {
2691
 
2655
 
2692
             if (_recordType != 0)
2656
             if (_recordType != 0)
2693
             {
2657
             {
2694
-                blackboard_canvas.Visibility = Visibility.Collapsed;
2658
+                BlackboardCanvas.Visibility = Visibility.Collapsed;
2695
                 //鼠标模式
2659
                 //鼠标模式
2696
                 _luoBoPenUtil.lb_device_mouse();
2660
                 _luoBoPenUtil.lb_device_mouse();
2697
                 await EndRecord();
2661
                 await EndRecord();
2720
             APP.PageContextData.pagenum = 0;
2684
             APP.PageContextData.pagenum = 0;
2721
             myblackboard.clear();
2685
             myblackboard.clear();
2722
             APP.PageDrawList.Clear();
2686
             APP.PageDrawList.Clear();
2723
-            imgCanvas.Source = null;
2724
-            imgDocumentation.Source = null;
2725
-            imgPPT.Source = null;
2687
+            ImgCanvas.Source = null;
2688
+            ImgDocumentation.Source = null;
2689
+            ImgPpt.Source = null;
2726
             GridPage.Visibility = Visibility.Collapsed;
2690
             GridPage.Visibility = Visibility.Collapsed;
2727
             BtnRecord.IsEnabled = false;
2691
             BtnRecord.IsEnabled = false;
2728
             BtnStop.IsEnabled = false;
2692
             BtnStop.IsEnabled = false;
2731
             _timer.Dispose();
2695
             _timer.Dispose();
2732
             TxbTime.Text = "00:00";
2696
             TxbTime.Text = "00:00";
2733
             TxbType.Text = "保存中";
2697
             TxbType.Text = "保存中";
2734
-            start_pause_grid.Visibility = Visibility.Hidden;
2698
+            StartPauseGrid.Visibility = Visibility.Hidden;
2735
             await Task.Run
2699
             await Task.Run
2736
             (
2700
             (
2737
                 () =>
2701
                 () =>
2828
             TxbType.Text = "准备就绪";
2792
             TxbType.Text = "准备就绪";
2829
             BtnRecord.Visibility = Visibility.Visible;
2793
             BtnRecord.Visibility = Visibility.Visible;
2830
             BtnRecordSuspend.Visibility = Visibility.Collapsed;
2794
             BtnRecordSuspend.Visibility = Visibility.Collapsed;
2831
-            start_pause_grid.Visibility = Visibility.Visible;
2795
+            StartPauseGrid.Visibility = Visibility.Visible;
2832
         }
2796
         }
2833
 
2797
 
2834
         /// <summary>
2798
         /// <summary>
2989
 
2953
 
2990
         private void ImgXy()
2954
         private void ImgXy()
2991
         {
2955
         {
2992
-            imgCanvas.Width = APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes.CenterX;
2993
-            imgCanvas.Height = APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes.CenterY;
2994
-            imgCanvas.Margin = new Thickness
2956
+            ImgCanvas.Width = APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes.CenterX;
2957
+            ImgCanvas.Height = APP.PageDrawList[APP.PageContextData.currpage - 1].ImageSizes.CenterY;
2958
+            ImgCanvas.Margin = new Thickness
2995
             (
2959
             (
2996
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
2960
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
2997
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
2961
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
3018
                 {
2982
                 {
3019
                     APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = true;
2983
                     APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = true;
3020
                 }
2984
                 }
3021
-                if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.PageContextData.currpage <= APP.PageDrawList.Count && APP.PageContextData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
2985
+                if (!string.IsNullOrWhiteSpace(TxbCurrpage.Text) && APP.PageContextData.currpage <= APP.PageDrawList.Count && APP.PageContextData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath))
3022
                 {
2986
                 {
3023
                     if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImgDocumentation)
2987
                     if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImgDocumentation)
3024
                     {
2988
                     {
3025
                         if ("ppt".Equals(APP.PageDrawList[APP.PageContextData.currpage - 1].Type))
2989
                         if ("ppt".Equals(APP.PageDrawList[APP.PageContextData.currpage - 1].Type))
3026
                         {
2990
                         {
3027
-                            imgCanvas.Source = null;
3028
-                            imgDocumentation.Source = null;
3029
-                            imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
2991
+                            ImgCanvas.Source = null;
2992
+                            ImgDocumentation.Source = null;
2993
+                            ImgPpt.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
3030
                             BtnScreenshot.IsEnabled = false;
2994
                             BtnScreenshot.IsEnabled = false;
3031
                         }
2995
                         }
3032
                         else
2996
                         else
3033
                         {
2997
                         {
3034
-                            imgPPT.Source = null;
3035
-                            imgCanvas.Source = null;
3036
-                            imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
2998
+                            ImgPpt.Source = null;
2999
+                            ImgCanvas.Source = null;
3000
+                            ImgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
3037
                             BtnScreenshot.IsEnabled = false;
3001
                             BtnScreenshot.IsEnabled = false;
3038
                         }
3002
                         }
3039
                     }
3003
                     }
3040
                     else
3004
                     else
3041
                     {
3005
                     {
3042
-                        imgPPT.Source = null;
3043
-                        imgDocumentation.Source = null;
3044
-                        imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
3006
+                        ImgPpt.Source = null;
3007
+                        ImgDocumentation.Source = null;
3008
+                        ImgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
3045
                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
3009
                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
3046
                         if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X > 0)
3010
                         if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X > 0)
3047
                         {
3011
                         {
3053
                 }
3017
                 }
3054
                 else
3018
                 else
3055
                 {
3019
                 {
3056
-                    imgPPT.Source = null;
3057
-                    imgCanvas.Source = null;
3058
-                    imgDocumentation.Source = null;
3020
+                    ImgPpt.Source = null;
3021
+                    ImgCanvas.Source = null;
3022
+                    ImgDocumentation.Source = null;
3059
                 }
3023
                 }
3060
             }
3024
             }
3061
         }
3025
         }
3113
                 (
3077
                 (
3114
                     () =>
3078
                     () =>
3115
                     {
3079
                     {
3116
-                        txbNotConnected.Text = "笔/板已连接";
3080
+                        TxbNotConnected.Text = "笔/板已连接";
3117
                         TxbNotConnecteds.Text = "笔/板已连接";
3081
                         TxbNotConnecteds.Text = "笔/板已连接";
3118
                     }
3082
                     }
3119
                 );
3083
                 );
3124
                 (
3088
                 (
3125
                     () =>
3089
                     () =>
3126
                     {
3090
                     {
3127
-                        txbNotConnected.Text = "手写板已连接";
3091
+                        TxbNotConnected.Text = "手写板已连接";
3128
                         TxbNotConnecteds.Text = "手写板已连接";
3092
                         TxbNotConnecteds.Text = "手写板已连接";
3129
                     }
3093
                     }
3130
                 );
3094
                 );
3135
                 (
3099
                 (
3136
                     () =>
3100
                     () =>
3137
                     {
3101
                     {
3138
-                        txbNotConnected.Text = "智能笔已连接";
3102
+                        TxbNotConnected.Text = "智能笔已连接";
3139
                         TxbNotConnecteds.Text = "智能笔已连接";
3103
                         TxbNotConnecteds.Text = "智能笔已连接";
3140
                     }
3104
                     }
3141
                 );
3105
                 );
3146
                 (
3110
                 (
3147
                     () =>
3111
                     () =>
3148
                     {
3112
                     {
3149
-                        txbNotConnected.Text = "智能笔已连接";
3113
+                        TxbNotConnected.Text = "智能笔已连接";
3150
                         TxbNotConnecteds.Text = "智能笔已连接";
3114
                         TxbNotConnecteds.Text = "智能笔已连接";
3151
                     }
3115
                     }
3152
                 );
3116
                 );
3157
                 (
3121
                 (
3158
                     () =>
3122
                     () =>
3159
                     {
3123
                     {
3160
-                        txbNotConnected.Text = "未连接";
3124
+                        TxbNotConnected.Text = "未连接";
3161
                         TxbNotConnecteds.Text = "未连接";
3125
                         TxbNotConnecteds.Text = "未连接";
3162
                     }
3126
                     }
3163
                 );
3127
                 );
3247
             {
3211
             {
3248
                 return;
3212
                 return;
3249
             }
3213
             }
3250
-            double propW = blackboard_canvas.ActualWidth / TQLA4_WIDTH;
3251
-            double propH = blackboard_canvas.ActualHeight / TQLA4_HEIGHT;
3214
+            double propW = BlackboardCanvas.ActualWidth / TQLA4_WIDTH;
3215
+            double propH = BlackboardCanvas.ActualHeight / TQLA4_HEIGHT;
3252
             //点
3216
             //点
3253
             double tempX = cx * propW;
3217
             double tempX = cx * propW;
3254
             double tempY = cy * propH;
3218
             double tempY = cy * propH;
3632
             this._hei = hei;
3596
             this._hei = hei;
3633
             if (!string.IsNullOrWhiteSpace(imgPath))
3597
             if (!string.IsNullOrWhiteSpace(imgPath))
3634
             {
3598
             {
3635
-                imgPri.Source = new BitmapImage(new Uri(imgPath));
3599
+                ImgPri.Source = new BitmapImage(new Uri(imgPath));
3636
             }
3600
             }
3637
             else
3601
             else
3638
             {
3602
             {
3639
-                imgPri.Source = null;
3603
+                ImgPri.Source = null;
3640
             }
3604
             }
3641
             GridPrintMask.Visibility = Visibility.Collapsed;
3605
             GridPrintMask.Visibility = Visibility.Collapsed;
3642
         }
3606
         }
3669
                     }
3633
                     }
3670
                 }
3634
                 }
3671
             );
3635
             );
3672
-            cmbClass.ItemsSource = _dtComponentsUniqueNo.DefaultView;
3673
-            cmbClass.SelectedIndex = 0;
3636
+            CmbClass.ItemsSource = _dtComponentsUniqueNo.DefaultView;
3637
+            CmbClass.SelectedIndex = 0;
3674
             TqlPrintInit();
3638
             TqlPrintInit();
3675
         }
3639
         }
3676
 
3640
 
3924
                                 BtnPrint.IsEnabled = true;
3888
                                 BtnPrint.IsEnabled = true;
3925
                                 _num = 99;
3889
                                 _num = 99;
3926
                                 _timesPrint.Stop();
3890
                                 _timesPrint.Stop();
3927
-                                pgbProcess.Value = 100;
3928
-                                lbProcess.Content = "100%";
3891
+                                PgbProcess.Value = 100;
3892
+                                LbProcess.Content = "100%";
3929
                                 GridPrintMask.Visibility = Visibility.Collapsed;
3893
                                 GridPrintMask.Visibility = Visibility.Collapsed;
3930
                                 //MessageWindow.Show("已加入打印机队列,打印中。");
3894
                                 //MessageWindow.Show("已加入打印机队列,打印中。");
3931
                             }
3895
                             }
3970
                         BtnPrint.IsEnabled = true;
3934
                         BtnPrint.IsEnabled = true;
3971
                         _num = 99;
3935
                         _num = 99;
3972
                         _timesPrint.Stop();
3936
                         _timesPrint.Stop();
3973
-                        pgbProcess.Value = 100;
3974
-                        lbProcess.Content = "100%";
3937
+                        PgbProcess.Value = 100;
3938
+                        LbProcess.Content = "100%";
3975
                         GridPrintMask.Visibility = Visibility.Collapsed;
3939
                         GridPrintMask.Visibility = Visibility.Collapsed;
3976
                         //MessageWindow.Show("已加入打印机队列,打印中。");
3940
                         //MessageWindow.Show("已加入打印机队列,打印中。");
3977
                     }
3941
                     }
3992
             (
3956
             (
3993
                 () =>
3957
                 () =>
3994
                 {
3958
                 {
3995
-                    pgbProcess.Value = _num;
3996
-                    lbProcess.Content = _num + "%";
3959
+                    PgbProcess.Value = _num;
3960
+                    LbProcess.Content = _num + "%";
3997
                     if (_num < 99)
3961
                     if (_num < 99)
3998
                     {
3962
                     {
3999
                         _num++;
3963
                         _num++;
4070
                     );
4034
                     );
4071
                 }
4035
                 }
4072
             }
4036
             }
4073
-            double propW = blackboard_canvas.ActualWidth / mNDeviceH;
4074
-            double propH = blackboard_canvas.ActualHeight / mNDeviceW;
4037
+            double propW = BlackboardCanvas.ActualWidth / mNDeviceH;
4038
+            double propH = BlackboardCanvas.ActualHeight / mNDeviceW;
4075
             //点
4039
             //点
4076
             double tempY = (mNDeviceW - bx) * propH;
4040
             double tempY = (mNDeviceW - bx) * propH;
4077
             double tempX = by * propW;
4041
             double tempX = by * propW;

+ 2
- 2
XHWK.WKTool/Resources/StyleButton.xaml View File

10
                         Padding="{TemplateBinding Padding}"
10
                         Padding="{TemplateBinding Padding}"
11
                         Background="{TemplateBinding Background}"
11
                         Background="{TemplateBinding Background}"
12
                         BorderThickness="0"
12
                         BorderThickness="0"
13
-                        CornerRadius="6">
13
+                        CornerRadius="4">
14
                         <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
14
                         <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
15
                     </Border>
15
                     </Border>
16
                     <ControlTemplate.Triggers>
16
                     <ControlTemplate.Triggers>
22
             </Setter.Value>
22
             </Setter.Value>
23
         </Setter>
23
         </Setter>
24
     </Style>
24
     </Style>
25
-</ResourceDictionary>
25
+</ResourceDictionary>

Loading…
Cancel
Save