张剑 пре 1 година
родитељ
комит
971e2af20a

+ 1
- 4
XHWK.WKTool/DeviceWindow.xaml Прегледај датотеку

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

+ 92
- 117
XHWK.WKTool/MainWindow.xaml Прегледај датотеку

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

+ 185
- 221
XHWK.WKTool/MainWindow.xaml.cs Прегледај датотеку

@@ -75,15 +75,8 @@ namespace XHWK.WKTool
75 75
         //定义委托
76 76
         public delegate void ChangeTextHandlers(string text, int i);
77 77
 
78
-        //private DispatcherTimer t = null;
79
-
80 78
         #region 上传
81 79
 
82
-        /// <summary>
83
-        /// 数据列表
84
-        /// </summary>
85
-        internal FileDirectoryData pageData = new FileDirectoryData();
86
-
87 80
         /// <summary>
88 81
         /// 视频模型
89 82
         /// </summary>
@@ -118,7 +111,7 @@ namespace XHWK.WKTool
118 111
 
119 112
             ResizeMode = ResizeMode.CanMinimize;
120 113
             BtnPrint.IsEnabled = false;
121
-            myblackboard = new BlackboardNew(blackboard_canvas);
114
+            myblackboard = new BlackboardNew(BlackboardCanvas);
122 115
             APP.PageContextData.pagenum = 0;
123 116
             APP.PageContextData.currpage = 0;
124 117
             DataContext = APP.PageContextData;
@@ -127,9 +120,9 @@ namespace XHWK.WKTool
127 120
             APP.PageDrawList = new List<Model_DrawData>();
128 121
             Model_DrawData modelDrawData = new Model_DrawData { PageNum = APP.PageContextData.currpage };
129 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 126
             Initialize();
134 127
 
135 128
             //罗博手写板
@@ -152,7 +145,7 @@ namespace XHWK.WKTool
152 145
                 RectLeftDown,
153 146
                 RectRightDown,
154 147
                 RectImgBorder,
155
-                imgCanvas,
148
+                ImgCanvas,
156 149
                 GridM
157 150
             );
158 151
             InitPrint();
@@ -189,14 +182,7 @@ namespace XHWK.WKTool
189 182
         /// </summary>
190 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 187
             #region 数据初始化
202 188
 
@@ -216,14 +202,14 @@ namespace XHWK.WKTool
216 202
             _drawingAttributes = new DrawingAttributes();
217 203
             //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
218 204
             //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
219
-            blackboard_canvas.DefaultDrawingAttributes = _drawingAttributes;
220
-            blackboard_canvas.UseCustomCursor = true;
205
+            BlackboardCanvas.DefaultDrawingAttributes = _drawingAttributes;
206
+            BlackboardCanvas.UseCustomCursor = true;
221 207
             _drawingAttributes.FitToCurve = true;
222 208
             _drawingAttributes.IgnorePressure = false;
223 209
             _drawingAttributes.Width = _penSize;
224 210
             _drawingAttributes.Height = _penSize;
225 211
             _drawingAttributes.Color = _color;
226
-            blackboard_canvas.Cursor = Cursors.Pen;
212
+            BlackboardCanvas.Cursor = Cursors.Pen;
227 213
         }
228 214
 
229 215
         /// <summary>
@@ -270,7 +256,7 @@ namespace XHWK.WKTool
270 256
                 if (RectImgBorder.Visibility != Visibility.Hidden)
271 257
                 {
272 258
                     HideAngleBorder();
273
-                    imgCanvas.Source = null;
259
+                    ImgCanvas.Source = null;
274 260
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PdfImagePath = null;
275 261
                     APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath = null;
276 262
                 }
@@ -297,20 +283,8 @@ namespace XHWK.WKTool
297 283
 
298 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 288
             await Task.WhenAll(checkMicrophone, checkLoudspeaker);
315 289
             _microphoneGood = checkMicrophone.Result;
316 290
             _loudspeakerGood = checkMicrophone.Result;
@@ -343,11 +317,12 @@ namespace XHWK.WKTool
343 317
                     "提示",
344 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,8 +377,6 @@ namespace XHWK.WKTool
402 377
             ImgHeadImgN.Visibility = Visibility.Visible;
403 378
             ImgHeadImg.Visibility = Visibility.Collapsed;
404 379
             APP.UserInfo = new Model_UserInfo();
405
-            //ImgUpload.Visibility = Visibility.Collapsed;
406
-            //ImgUploadTwo.Visibility = Visibility.Visible;
407 380
         }
408 381
 
409 382
         #endregion 登录
@@ -419,16 +392,15 @@ namespace XHWK.WKTool
419 392
         /// </param>
420 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 395
             _fbd = new System.Windows.Forms.FolderBrowserDialog();
425 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,12 +428,12 @@ namespace XHWK.WKTool
456 428
             try
457 429
             {
458 430
                 BtnRecord.IsEnabled = true; //设置结束时可录制
459
-                if (rbnMP4.IsChecked == true)
431
+                if (RbnMp4.IsChecked == true)
460 432
                 {
461 433
                     //存储文件
462 434
                     FileToolsCommon.SetConfigValue("VideoType", "1");
463 435
                 }
464
-                else if (rbnFLV.IsChecked == true)
436
+                else if (RbnFlv.IsChecked == true)
465 437
                 {
466 438
                     FileToolsCommon.SetConfigValue("VideoType", "2");
467 439
                 }
@@ -472,32 +444,32 @@ namespace XHWK.WKTool
472 444
                 UpdateHideSrToolConfig();
473 445
 
474 446
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
475
-                if (rbnRight.IsChecked == true)
447
+                if (RbnRight.IsChecked == true)
476 448
                 {
477 449
                     FileToolsCommon.SetConfigValue("CameraPosition", "1");
478 450
                 }
479
-                else if (rbnLeft.IsChecked == true)
451
+                else if (RbnLeft.IsChecked == true)
480 452
                 {
481 453
                     FileToolsCommon.SetConfigValue("CameraPosition", "2");
482 454
                 }
483
-                else if (rbnRightUnder.IsChecked == true)
455
+                else if (RbnRightUnder.IsChecked == true)
484 456
                 {
485 457
                     FileToolsCommon.SetConfigValue("CameraPosition", "3");
486 458
                 }
487
-                else if (rbnLeftUnder.IsChecked == true)
459
+                else if (RbnLeftUnder.IsChecked == true)
488 460
                 {
489 461
                     FileToolsCommon.SetConfigValue("CameraPosition", "4");
490 462
                 }
491 463
                 //格式
492
-                if (rbnMP4.IsChecked == true)
464
+                if (RbnMp4.IsChecked == true)
493 465
                 {
494 466
                     FileToolsCommon.SetConfigValue("VideoType", "1");
495 467
                 }
496
-                else if (rbnFLV.IsChecked == true)
468
+                else if (RbnFlv.IsChecked == true)
497 469
                 {
498 470
                     FileToolsCommon.SetConfigValue("VideoType", "2");
499 471
                 }
500
-                else if (rbnAVI.IsChecked == true)
472
+                else if (RbnAvi.IsChecked == true)
501 473
                 {
502 474
                     FileToolsCommon.SetConfigValue("VideoType", "3");
503 475
                 }
@@ -505,15 +477,15 @@ namespace XHWK.WKTool
505 477
                 GridMain.Visibility = Visibility.Visible;
506 478
                 GridM.IsEnabled = true;
507 479
                 GridRecordingTitle.Visibility = Visibility.Visible;
508
-                gridSetUp.Visibility = Visibility.Collapsed;
480
+                GridSetUp.Visibility = Visibility.Collapsed;
509 481
                 ImgPlayerRight.Visibility = Visibility.Collapsed;
510 482
                 ImgPlayerLeft.Visibility = Visibility.Collapsed;
511 483
                 ImgPlayerRightUnder.Visibility = Visibility.Collapsed;
512 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 489
                     MessageWindow.Show("路径已变更,下次创建微课时自动生效。");
518 490
                 }
519 491
             }
@@ -532,62 +504,54 @@ namespace XHWK.WKTool
532 504
         /// </param>
533 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 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 513
                 #region 读取用户配置
542 514
 
543 515
                 // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
544 516
                 if ("1".Equals(APP.CameraPosition))
545 517
                 {
546
-                    rbnRight.IsChecked = true;
518
+                    RbnRight.IsChecked = true;
547 519
                 }
548 520
                 else if ("2".Equals(APP.CameraPosition))
549 521
                 {
550
-                    rbnLeft.IsChecked = true;
522
+                    RbnLeft.IsChecked = true;
551 523
                 }
552 524
                 else if ("3".Equals(APP.CameraPosition))
553 525
                 {
554
-                    rbnRightUnder.IsChecked = true;
526
+                    RbnRightUnder.IsChecked = true;
555 527
                 }
556 528
                 else if ("4".Equals(APP.CameraPosition))
557 529
                 {
558
-                    rbnLeftUnder.IsChecked = true;
530
+                    RbnLeftUnder.IsChecked = true;
559 531
                 }
560 532
                 string type = FileToolsCommon.GetConfigValue("VideoType"); //<!--视频格式 1、MP4 2、FlV 3、AVI-->
561 533
                 if ("1".Equals(type))
562 534
                 {
563
-                    rbnMP4.IsChecked = true;
535
+                    RbnMp4.IsChecked = true;
564 536
                 }
565 537
                 else if ("2".Equals(type))
566 538
                 {
567
-                    rbnFLV.IsChecked = true;
539
+                    RbnFlv.IsChecked = true;
568 540
                 }
569 541
                 else if ("3".Equals(type))
570 542
                 {
571
-                    rbnAVI.IsChecked = true;
543
+                    RbnAvi.IsChecked = true;
572 544
                 }
573 545
                 string isHide = FileToolsCommon.GetConfigValue("IsHideSRTool"); //工具栏是否隐藏
574 546
                 if (isHide.Equals("1"))
575 547
                 {
576
-                    rbnHide.IsChecked = true;
548
+                    RbnHide.IsChecked = true;
577 549
                 }
578 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 556
                 SkinSelectInit();
593 557
 
@@ -598,7 +562,7 @@ namespace XHWK.WKTool
598 562
                 GridMain.Visibility = Visibility.Visible;
599 563
                 GridM.IsEnabled = true;
600 564
                 GridRecordingTitle.Visibility = Visibility.Visible;
601
-                gridSetUp.Visibility = Visibility.Collapsed;
565
+                GridSetUp.Visibility = Visibility.Collapsed;
602 566
             }
603 567
         }
604 568
 
@@ -607,7 +571,7 @@ namespace XHWK.WKTool
607 571
         /// </summary>
608 572
         private void UpdateHideSrToolConfig()
609 573
         {
610
-            if (rbnHide.IsChecked == true)
574
+            if (RbnHide.IsChecked == true)
611 575
             {
612 576
                 //隐藏
613 577
                 FileToolsCommon.SetConfigValue("IsHideSRTool", "1");
@@ -715,9 +679,9 @@ namespace XHWK.WKTool
715 679
             {
716 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 686
             APP.PageContextData.pagenum += 1;
723 687
             HideAngleBorder();
@@ -726,9 +690,9 @@ namespace XHWK.WKTool
726 690
             myblackboard.changepage(APP.PageContextData.currpage - 1);
727 691
             ScroMain.ScrollToVerticalOffset(0);
728 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 696
             if (APP.PageContextData.pagenum == 1)
733 697
             {
734 698
                 APP.PageDrawList = new List<Model_DrawData>();
@@ -886,7 +850,7 @@ namespace XHWK.WKTool
886 850
         private void PageHide()
887 851
         {
888 852
             //设置
889
-            gridSetUp.Visibility = Visibility.Collapsed;
853
+            GridSetUp.Visibility = Visibility.Collapsed;
890 854
             //我的
891 855
             GridMyVideo.Visibility = Visibility.Collapsed;
892 856
             //首页
@@ -902,7 +866,7 @@ namespace XHWK.WKTool
902 866
 
903 867
         private void Print()
904 868
         {
905
-            if (string.IsNullOrWhiteSpace(cmbClass.Text))
869
+            if (string.IsNullOrWhiteSpace(CmbClass.Text))
906 870
             {
907 871
                 MessageWindow.Show("请设置打印机!");
908 872
                 return;
@@ -915,7 +879,7 @@ namespace XHWK.WKTool
915 879
             //打印数量
916 880
             printmodel.num = 1;
917 881
             //打印机名称
918
-            string printerName = cmbClass.Text;
882
+            string printerName = CmbClass.Text;
919 883
             printmodel.printname = printerName;
920 884
             _printMsg = "准备中";
921 885
             _msgnum = 0;
@@ -1081,7 +1045,9 @@ namespace XHWK.WKTool
1081 1045
                 ImgPlayerLeft.Visibility = Visibility.Hidden;
1082 1046
                 ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1083 1047
                 ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
1048
+                RbnOpen.IsEnabled = false;
1084 1049
                 CameraHelper.CloseDevice();
1050
+                RbnOpen.IsEnabled = true;
1085 1051
             }
1086 1052
         }
1087 1053
 
@@ -1113,12 +1079,16 @@ namespace XHWK.WKTool
1113 1079
         /// </param>
1114 1080
         /// <param name="e">
1115 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 1090
             DeviceWindow deviceWin = new DeviceWindow();
1121
-            deviceWin.Show();
1091
+            deviceWin.ShowDialog();
1122 1092
         }
1123 1093
 
1124 1094
         #endregion 设备检测
@@ -1138,11 +1108,11 @@ namespace XHWK.WKTool
1138 1108
         {
1139 1109
             _drawingAttributes.Color = Colors.DeepSkyBlue;
1140 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 1118
         /// <summary>
@@ -1156,11 +1126,11 @@ namespace XHWK.WKTool
1156 1126
         {
1157 1127
             _drawingAttributes.Color = Colors.LimeGreen;
1158 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 1136
         /// <summary>
@@ -1174,11 +1144,11 @@ namespace XHWK.WKTool
1174 1144
         {
1175 1145
             _drawingAttributes.Color = Colors.Black;
1176 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 1154
         /// <summary>
@@ -1193,11 +1163,11 @@ namespace XHWK.WKTool
1193 1163
             //设置 DrawingAttributes 的 Color 属性设置颜色
1194 1164
             _drawingAttributes.Color = Colors.Red;
1195 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 1173
         /// <summary>
@@ -1209,12 +1179,6 @@ namespace XHWK.WKTool
1209 1179
         /// </param>
1210 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 1182
             _drawingAttributes.Color = Colors.White;
1219 1183
             _color = Colors.White;
1220 1184
         }
@@ -1230,11 +1194,11 @@ namespace XHWK.WKTool
1230 1194
         {
1231 1195
             _drawingAttributes.Color = Colors.Gold;
1232 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 1204
         private void imgCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -1396,7 +1360,7 @@ namespace XHWK.WKTool
1396 1360
         {
1397 1361
             Record();
1398 1362
             HideAngleBorder();
1399
-            imgCanvas.Margin = new Thickness
1363
+            ImgCanvas.Margin = new Thickness
1400 1364
             (
1401 1365
                 0,
1402 1366
                 0,
@@ -1492,7 +1456,7 @@ namespace XHWK.WKTool
1492 1456
                     }
1493 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 1460
                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1497 1461
                         _mouseDown = false;
1498 1462
                         _imageOperationUtil.setMouseDown(_mouseDown);
@@ -1503,14 +1467,14 @@ namespace XHWK.WKTool
1503 1467
                         };
1504 1468
                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1505 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 1473
                         ScroMain.ScrollToVerticalOffset(0);
1510 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 1479
                         BtnPrint.IsEnabled = true;
1516 1480
                     }
@@ -1667,10 +1631,10 @@ namespace XHWK.WKTool
1667 1631
                                         }
1668 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 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 1638
                                             ScroMain.ScrollToVerticalOffset(0);
1675 1639
                                             for (int i = iStart; i < iEnd; i++)
1676 1640
                                             {
@@ -1682,16 +1646,16 @@ namespace XHWK.WKTool
1682 1646
                                                 APP.PageDrawList[i].IsImageLocation = true;
1683 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 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 1660
                                             BtnScreenshot.IsEnabled = true;
1697 1661
                                         }
@@ -1805,18 +1769,18 @@ namespace XHWK.WKTool
1805 1769
                                         }
1806 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 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 1777
                                             ScroMain.ScrollToVerticalOffset(0);
1814 1778
                                         }
1815 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 1785
                                             BtnScreenshot.IsEnabled = true;
1822 1786
                                         }
@@ -1895,7 +1859,7 @@ namespace XHWK.WKTool
1895 1859
                                     }
1896 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 1863
                                         BitmapImage bitImg = new BitmapImage(new Uri(APP.PageDrawList[APP.PageContextData.currpage - 1].PageImagePath));
1900 1864
                                         _mouseDown = false;
1901 1865
                                         _imageOperationUtil.setMouseDown(_mouseDown);
@@ -1906,11 +1870,11 @@ namespace XHWK.WKTool
1906 1870
                                         };
1907 1871
                                         APP.PageDrawList[APP.PageContextData.currpage - 1].Type = "截图";
1908 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 1876
                                         ScroMain.ScrollToVerticalOffset(0);
1913
-                                        imgCanvas.Margin = new Thickness
1877
+                                        ImgCanvas.Margin = new Thickness
1914 1878
                                         (
1915 1879
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
1916 1880
                                             APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
@@ -1919,8 +1883,8 @@ namespace XHWK.WKTool
1919 1883
                                         );
1920 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 1889
                                         BtnPrint.IsEnabled = true;
1926 1890
                                     }
@@ -1982,18 +1946,18 @@ namespace XHWK.WKTool
1982 1946
                                         }
1983 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 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 1954
                                             ScroMain.ScrollToVerticalOffset(0);
1991 1955
                                         }
1992 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 1962
                                             BtnScreenshot.IsEnabled = true;
1999 1963
                                         }
@@ -2223,7 +2187,7 @@ namespace XHWK.WKTool
2223 2187
         /// </summary>
2224 2188
         private void LoadCurrentPageData()
2225 2189
         {
2226
-            lblVideoPageNum.Content = _currentPage + "/" + _totalPage;
2190
+            LblVideoPageNum.Content = _currentPage + "/" + _totalPage;
2227 2191
             //隐藏显示的控件
2228 2192
             if (_videoControlList.Count > 0)
2229 2193
             {
@@ -2298,9 +2262,9 @@ namespace XHWK.WKTool
2298 2262
             LoadingVideoList();
2299 2263
             if (_modelVideoList.Count > 0)
2300 2264
             {
2301
-                lblVideoMess.Visibility = Visibility.Hidden;
2265
+                LblVideoMess.Visibility = Visibility.Hidden;
2302 2266
                 BtnVideoUpPage.Visibility = Visibility.Visible;
2303
-                lblVideoPageNum.Visibility = Visibility.Visible;
2267
+                LblVideoPageNum.Visibility = Visibility.Visible;
2304 2268
                 BtnVideoDownPage.Visibility = Visibility.Visible;
2305 2269
                 if (GridMyVideo.ActualHeight > 0)
2306 2270
                 {
@@ -2335,9 +2299,9 @@ namespace XHWK.WKTool
2335 2299
             }
2336 2300
             else
2337 2301
             {
2338
-                lblVideoMess.Visibility = Visibility.Visible;
2302
+                LblVideoMess.Visibility = Visibility.Visible;
2339 2303
                 BtnVideoUpPage.Visibility = Visibility.Hidden;
2340
-                lblVideoPageNum.Visibility = Visibility.Hidden;
2304
+                LblVideoPageNum.Visibility = Visibility.Hidden;
2341 2305
                 BtnVideoDownPage.Visibility = Visibility.Hidden;
2342 2306
                 //隐藏显示的控件
2343 2307
                 if (_videoControlList.Count > 0)
@@ -2566,18 +2530,18 @@ namespace XHWK.WKTool
2566 2530
             }
2567 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 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 2541
                     MessageWindow.Show("麦克风不可用");
2578 2542
                     return;
2579 2543
                 }
2580
-                blackboard_canvas.Visibility = Visibility.Visible;
2544
+                BlackboardCanvas.Visibility = Visibility.Visible;
2581 2545
                 if (RectImgBorder.Visibility != Visibility.Hidden)
2582 2546
                 {
2583 2547
                     HideAngleBorder();
@@ -2591,7 +2555,7 @@ namespace XHWK.WKTool
2591 2555
                 BtnSetUp.IsEnabled = false;
2592 2556
                 BtnDevice.IsEnabled = false;
2593 2557
                 BtnLoginType.IsEnabled = false;
2594
-                blackboard_canvas.Visibility = Visibility.Visible;
2558
+                BlackboardCanvas.Visibility = Visibility.Visible;
2595 2559
                 TxbType.Text = "准备录制";
2596 2560
                 BtnRecord.Visibility = Visibility.Collapsed;
2597 2561
                 BtnRecordSuspend.Visibility = Visibility.Visible;
@@ -2616,12 +2580,12 @@ namespace XHWK.WKTool
2616 2580
                 await Task.Delay(3000);
2617 2581
                 //停止中开始录制
2618 2582
                 _recordType = 3;
2619
-                close_grid.Visibility = Visibility.Visible;
2583
+                CloseGrid.Visibility = Visibility.Visible;
2620 2584
                 TxbType.Text = "正在录制";
2621 2585
                 _recordType = 1;
2622 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 2590
             else if (_recordType == 1)
2627 2591
             {
@@ -2691,7 +2655,7 @@ namespace XHWK.WKTool
2691 2655
 
2692 2656
             if (_recordType != 0)
2693 2657
             {
2694
-                blackboard_canvas.Visibility = Visibility.Collapsed;
2658
+                BlackboardCanvas.Visibility = Visibility.Collapsed;
2695 2659
                 //鼠标模式
2696 2660
                 _luoBoPenUtil.lb_device_mouse();
2697 2661
                 await EndRecord();
@@ -2720,9 +2684,9 @@ namespace XHWK.WKTool
2720 2684
             APP.PageContextData.pagenum = 0;
2721 2685
             myblackboard.clear();
2722 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 2690
             GridPage.Visibility = Visibility.Collapsed;
2727 2691
             BtnRecord.IsEnabled = false;
2728 2692
             BtnStop.IsEnabled = false;
@@ -2731,7 +2695,7 @@ namespace XHWK.WKTool
2731 2695
             _timer.Dispose();
2732 2696
             TxbTime.Text = "00:00";
2733 2697
             TxbType.Text = "保存中";
2734
-            start_pause_grid.Visibility = Visibility.Hidden;
2698
+            StartPauseGrid.Visibility = Visibility.Hidden;
2735 2699
             await Task.Run
2736 2700
             (
2737 2701
                 () =>
@@ -2828,7 +2792,7 @@ namespace XHWK.WKTool
2828 2792
             TxbType.Text = "准备就绪";
2829 2793
             BtnRecord.Visibility = Visibility.Visible;
2830 2794
             BtnRecordSuspend.Visibility = Visibility.Collapsed;
2831
-            start_pause_grid.Visibility = Visibility.Visible;
2795
+            StartPauseGrid.Visibility = Visibility.Visible;
2832 2796
         }
2833 2797
 
2834 2798
         /// <summary>
@@ -2989,9 +2953,9 @@ namespace XHWK.WKTool
2989 2953
 
2990 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 2960
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X,
2997 2961
                 APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.Y,
@@ -3018,30 +2982,30 @@ namespace XHWK.WKTool
3018 2982
                 {
3019 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 2987
                     if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImgDocumentation)
3024 2988
                     {
3025 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 2994
                             BtnScreenshot.IsEnabled = false;
3031 2995
                         }
3032 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 3001
                             BtnScreenshot.IsEnabled = false;
3038 3002
                         }
3039 3003
                     }
3040 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 3009
                         APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = false;
3046 3010
                         if (APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.PageContextData.currpage - 1].ImageLocation.X > 0)
3047 3011
                         {
@@ -3053,9 +3017,9 @@ namespace XHWK.WKTool
3053 3017
                 }
3054 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,7 +3077,7 @@ namespace XHWK.WKTool
3113 3077
                 (
3114 3078
                     () =>
3115 3079
                     {
3116
-                        txbNotConnected.Text = "笔/板已连接";
3080
+                        TxbNotConnected.Text = "笔/板已连接";
3117 3081
                         TxbNotConnecteds.Text = "笔/板已连接";
3118 3082
                     }
3119 3083
                 );
@@ -3124,7 +3088,7 @@ namespace XHWK.WKTool
3124 3088
                 (
3125 3089
                     () =>
3126 3090
                     {
3127
-                        txbNotConnected.Text = "手写板已连接";
3091
+                        TxbNotConnected.Text = "手写板已连接";
3128 3092
                         TxbNotConnecteds.Text = "手写板已连接";
3129 3093
                     }
3130 3094
                 );
@@ -3135,7 +3099,7 @@ namespace XHWK.WKTool
3135 3099
                 (
3136 3100
                     () =>
3137 3101
                     {
3138
-                        txbNotConnected.Text = "智能笔已连接";
3102
+                        TxbNotConnected.Text = "智能笔已连接";
3139 3103
                         TxbNotConnecteds.Text = "智能笔已连接";
3140 3104
                     }
3141 3105
                 );
@@ -3146,7 +3110,7 @@ namespace XHWK.WKTool
3146 3110
                 (
3147 3111
                     () =>
3148 3112
                     {
3149
-                        txbNotConnected.Text = "智能笔已连接";
3113
+                        TxbNotConnected.Text = "智能笔已连接";
3150 3114
                         TxbNotConnecteds.Text = "智能笔已连接";
3151 3115
                     }
3152 3116
                 );
@@ -3157,7 +3121,7 @@ namespace XHWK.WKTool
3157 3121
                 (
3158 3122
                     () =>
3159 3123
                     {
3160
-                        txbNotConnected.Text = "未连接";
3124
+                        TxbNotConnected.Text = "未连接";
3161 3125
                         TxbNotConnecteds.Text = "未连接";
3162 3126
                     }
3163 3127
                 );
@@ -3247,8 +3211,8 @@ namespace XHWK.WKTool
3247 3211
             {
3248 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 3217
             double tempX = cx * propW;
3254 3218
             double tempY = cy * propH;
@@ -3632,11 +3596,11 @@ namespace XHWK.WKTool
3632 3596
             this._hei = hei;
3633 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 3601
             else
3638 3602
             {
3639
-                imgPri.Source = null;
3603
+                ImgPri.Source = null;
3640 3604
             }
3641 3605
             GridPrintMask.Visibility = Visibility.Collapsed;
3642 3606
         }
@@ -3669,8 +3633,8 @@ namespace XHWK.WKTool
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 3638
             TqlPrintInit();
3675 3639
         }
3676 3640
 
@@ -3924,8 +3888,8 @@ namespace XHWK.WKTool
3924 3888
                                 BtnPrint.IsEnabled = true;
3925 3889
                                 _num = 99;
3926 3890
                                 _timesPrint.Stop();
3927
-                                pgbProcess.Value = 100;
3928
-                                lbProcess.Content = "100%";
3891
+                                PgbProcess.Value = 100;
3892
+                                LbProcess.Content = "100%";
3929 3893
                                 GridPrintMask.Visibility = Visibility.Collapsed;
3930 3894
                                 //MessageWindow.Show("已加入打印机队列,打印中。");
3931 3895
                             }
@@ -3970,8 +3934,8 @@ namespace XHWK.WKTool
3970 3934
                         BtnPrint.IsEnabled = true;
3971 3935
                         _num = 99;
3972 3936
                         _timesPrint.Stop();
3973
-                        pgbProcess.Value = 100;
3974
-                        lbProcess.Content = "100%";
3937
+                        PgbProcess.Value = 100;
3938
+                        LbProcess.Content = "100%";
3975 3939
                         GridPrintMask.Visibility = Visibility.Collapsed;
3976 3940
                         //MessageWindow.Show("已加入打印机队列,打印中。");
3977 3941
                     }
@@ -3992,8 +3956,8 @@ namespace XHWK.WKTool
3992 3956
             (
3993 3957
                 () =>
3994 3958
                 {
3995
-                    pgbProcess.Value = _num;
3996
-                    lbProcess.Content = _num + "%";
3959
+                    PgbProcess.Value = _num;
3960
+                    LbProcess.Content = _num + "%";
3997 3961
                     if (_num < 99)
3998 3962
                     {
3999 3963
                         _num++;
@@ -4070,8 +4034,8 @@ namespace XHWK.WKTool
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 4040
             double tempY = (mNDeviceW - bx) * propH;
4077 4041
             double tempX = by * propW;

+ 2
- 2
XHWK.WKTool/Resources/StyleButton.xaml Прегледај датотеку

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

Loading…
Откажи
Сачувај