Browse Source

正式环境发版 3.9.2

master
张剑 1 year ago
parent
commit
fa6f4395a9

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

@@ -5,12 +5,12 @@
5 5
   </startup>
6 6
   <appSettings>
7 7
     <!--0正式 1测试-->
8
-    <add key="IsDebug" value="1" />
8
+    <add key="IsDebug" value="0" />
9 9
     <!--参数是否加密 0不加密 1加密-->
10 10
     <add key="IsParameterEncryption" value="0" />
11 11
     <!--版本号-->
12
-    <add key="VersionCode" value="118" />
13
-    <add key="VersionName" value="3.9.1" />
12
+    <add key="VersionCode" value="119" />
13
+    <add key="VersionName" value="3.9.2" />
14 14
     <!--皮肤样式 0白 1蓝 2黑色 -->
15 15
     <add key="SkinStyle" value="0" />
16 16
     <!--是否输出视频记录日志:0否-->

+ 2
- 44
XHWK.WKTool/MainWindow.xaml View File

@@ -102,9 +102,7 @@
102 102
                 Background="White"
103 103
                 MouseLeftButtonDown="Window_MouseLeftButtonDown">
104 104
                 <Grid Background="{DynamicResource BackTitle}">
105
-                    <!--<Grid.Background>
106
-                            <ImageBrush ImageSource="" />
107
-                        </Grid.Background>-->
105
+
108 106
                     <Grid.ColumnDefinitions>
109 107
                         <ColumnDefinition Width="200*" />
110 108
                         <ColumnDefinition Width="926*" />
@@ -670,7 +668,7 @@
670 668
                                         </Grid>
671 669
                                     </ScrollViewer>
672 670
                                     <Image
673
-                                        x:Name="ImgPlayerLeft"
671
+                                        x:Name="HeadImg"
674 672
                                         Width="172"
675 673
                                         Height="124"
676 674
                                         Margin="10,7,10,10"
@@ -683,46 +681,6 @@
683 681
                                         </Image.RenderTransform>
684 682
                                     </Image>
685 683
 
686
-
687
-                                    <Image
688
-                                        x:Name="ImgPlayerRight"
689
-                                        Width="172"
690
-                                        Height="124"
691
-                                        Margin="10,7,26,10"
692
-                                        HorizontalAlignment="Right"
693
-                                        VerticalAlignment="Top"
694
-                                        RenderTransformOrigin="0.5,0.5"
695
-                                        Visibility="Collapsed">
696
-                                        <Image.RenderTransform>
697
-                                            <ScaleTransform ScaleX="-1" />
698
-                                        </Image.RenderTransform>
699
-                                    </Image>
700
-                                    <Image
701
-                                        x:Name="ImgPlayerLeftUnder"
702
-                                        Width="172"
703
-                                        Height="124"
704
-                                        Margin="10,7,10,10"
705
-                                        HorizontalAlignment="Left"
706
-                                        VerticalAlignment="Bottom"
707
-                                        RenderTransformOrigin="0.5,0.5"
708
-                                        Visibility="Collapsed">
709
-                                        <Image.RenderTransform>
710
-                                            <ScaleTransform ScaleX="-1" />
711
-                                        </Image.RenderTransform>
712
-                                    </Image>
713
-                                    <Image
714
-                                        x:Name="ImgPlayerRightUnder"
715
-                                        Width="172"
716
-                                        Height="124"
717
-                                        Margin="10,7,26,10"
718
-                                        HorizontalAlignment="Right"
719
-                                        VerticalAlignment="Bottom"
720
-                                        RenderTransformOrigin="0.5,0.5"
721
-                                        Visibility="Collapsed">
722
-                                        <Image.RenderTransform>
723
-                                            <ScaleTransform ScaleX="-1" />
724
-                                        </Image.RenderTransform>
725
-                                    </Image>
726 684
                                 </Grid>
727 685
                             </Border>
728 686
                         </Grid>

+ 94
- 76
XHWK.WKTool/MainWindow.xaml.cs View File

@@ -152,21 +152,26 @@ namespace XHWK.WKTool
152 152
 
153 153
         private void LoadImage(BitmapImage image)
154 154
         {
155
+            HeadImg.Source = image;
155 156
             try
156 157
             {
157 158
                 switch (APP.CameraPosition)
158 159
                 {
159 160
                     case "1":
160
-                        ImgPlayerRight.Source = image;
161
+                        HeadImg.HorizontalAlignment = HorizontalAlignment.Right;
162
+                        HeadImg.VerticalAlignment = VerticalAlignment.Top;
161 163
                         break;
162 164
                     case "2":
163
-                        ImgPlayerLeft.Source = image;
165
+                        HeadImg.HorizontalAlignment = HorizontalAlignment.Left;
166
+                        HeadImg.VerticalAlignment = VerticalAlignment.Top;
164 167
                         break;
165 168
                     case "3":
166
-                        ImgPlayerRightUnder.Source = image;
169
+                        HeadImg.HorizontalAlignment = HorizontalAlignment.Right;
170
+                        HeadImg.VerticalAlignment = VerticalAlignment.Bottom;
167 171
                         break;
168 172
                     case "4":
169
-                        ImgPlayerLeftUnder.Source = image;
173
+                        HeadImg.HorizontalAlignment = HorizontalAlignment.Left;
174
+                        HeadImg.VerticalAlignment = VerticalAlignment.Bottom;
170 175
                         break;
171 176
                 }
172 177
             }
@@ -475,10 +480,11 @@ namespace XHWK.WKTool
475 480
                 GridM.IsEnabled = true;
476 481
                 GridRecordingTitle.Visibility = Visibility.Visible;
477 482
                 GridSetUp.Visibility = Visibility.Collapsed;
478
-                ImgPlayerRight.Visibility = Visibility.Collapsed;
479
-                ImgPlayerLeft.Visibility = Visibility.Collapsed;
480
-                ImgPlayerRightUnder.Visibility = Visibility.Collapsed;
481
-                ImgPlayerLeftUnder.Visibility = Visibility.Collapsed;
483
+                HeadImg.Visibility = Visibility.Hidden;
484
+                if (_isRbnOpen)
485
+                {
486
+                    HeadImg.Visibility = Visibility.Visible;
487
+                }
482 488
                 if (!TxbStoragePath.Content.ToString().Equals(APP.WKData.WkPath))
483 489
                 {
484 490
                     //存储文件
@@ -662,7 +668,7 @@ namespace XHWK.WKTool
662 668
         private bool _isHasCode;
663 669
 
664 670
         /// <summary>
665
-        /// 加事件
671
+        /// 加事件
666 672
         /// </summary>
667 673
         /// <param name="sender">
668 674
         /// </param>
@@ -671,7 +677,7 @@ namespace XHWK.WKTool
671 677
         private void BtnAdd_Click(object sender, RoutedEventArgs e)
672 678
         {
673 679
             _luoBoPenUtil.lb_device_hand();
674
-            Record();
680
+            PrepareRecord();
675 681
             if (APP.PageContextData.currpage > 0)
676 682
             {
677 683
                 APP.PageDrawList[APP.PageContextData.currpage - 1].IsImageLocation = true;
@@ -707,10 +713,6 @@ namespace XHWK.WKTool
707 713
                 //截图可用
708 714
                 BtnScreenshot.IsEnabled = true;
709 715
             }
710
-
711
-            #region 插入页码
712
-
713
-            #endregion 插入页码
714 716
         }
715 717
 
716 718
         /// <summary>
@@ -935,7 +937,7 @@ namespace XHWK.WKTool
935 937
         /// </param>
936 938
         /// <param name="e">
937 939
         /// </param>
938
-        private async void RbnOpen_Click(object sender, RoutedEventArgs e)
940
+        private void RbnOpen_Click(object sender, RoutedEventArgs e)
939 941
         {
940 942
             if (!_isRbnOpen)
941 943
             {
@@ -946,8 +948,14 @@ namespace XHWK.WKTool
946 948
                     return;
947 949
                 }
948 950
                 _isPressButton = true;
949
-                await Task.Delay(500);
950
-                _isPressButton = false;
951
+                Task.Run
952
+                (
953
+                    () =>
954
+                    {
955
+                        Thread.Sleep(3000);
956
+                        _isPressButton = false;
957
+                    }
958
+                );
951 959
 
952 960
                 #endregion 防止连击
953 961
 
@@ -968,6 +976,12 @@ namespace XHWK.WKTool
968 976
                     }
969 977
                     CameraHelper.imageCallback = LoadImage;
970 978
                     CameraHelper.StartCameraDevice(cameraIndex, this.Dispatcher);
979
+                    if (_timer != null)
980
+                    {
981
+                        _times.Elapsed -= Times_Elapsed;
982
+                        _times.Enabled = false;
983
+                        _times.Dispose();
984
+                    }
971 985
                     _times = new System.Timers.Timer(200) //初始值为300
972 986
                     {
973 987
                         AutoReset = true //设置是否执行System.Timers.Timer.Elapsed事件
@@ -977,45 +991,42 @@ namespace XHWK.WKTool
977 991
                     _isRbnOpen = true;
978 992
                     string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayer");
979 993
                     FileToolsCommon.CreateDirectory(imgPath);
980
-
994
+                    HeadImg.Visibility = Visibility.Visible;
981 995
                     // < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
982
-                    if ("1".Equals(APP.CameraPosition))
983
-                    {
984
-                        ImgPlayerRight.Visibility = Visibility.Visible;
985
-                        ImgPlayerLeft.Visibility = Visibility.Hidden;
986
-                        ImgPlayerRightUnder.Visibility = Visibility.Hidden;
987
-                        ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
988
-                    }
989
-                    else if ("2".Equals(APP.CameraPosition))
996
+                    switch (APP.CameraPosition)
990 997
                     {
991
-                        ImgPlayerRight.Visibility = Visibility.Hidden;
992
-                        ImgPlayerLeft.Visibility = Visibility.Visible;
993
-                        ImgPlayerRightUnder.Visibility = Visibility.Hidden;
994
-                        ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
995
-                    }
996
-                    else if ("3".Equals(APP.CameraPosition))
997
-                    {
998
-                        ImgPlayerRight.Visibility = Visibility.Hidden;
999
-                        ImgPlayerLeft.Visibility = Visibility.Hidden;
1000
-                        ImgPlayerRightUnder.Visibility = Visibility.Visible;
1001
-                        ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
1002
-                    }
1003
-                    else if ("4".Equals(APP.CameraPosition))
1004
-                    {
1005
-                        ImgPlayerRight.Visibility = Visibility.Hidden;
1006
-                        ImgPlayerLeft.Visibility = Visibility.Hidden;
1007
-                        ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1008
-                        ImgPlayerLeftUnder.Visibility = Visibility.Visible;
1009
-                    }
1010
-                    else
1011
-                    {
1012
-                        ImgPlayerLeft.Visibility = Visibility.Hidden;
1013
-                        ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1014
-                        ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
998
+                        case "1":
999
+                            HeadImg.HorizontalAlignment = HorizontalAlignment.Right;
1000
+                            HeadImg.VerticalAlignment = VerticalAlignment.Top;
1001
+                            break;
1002
+                        case "2":
1003
+                            HeadImg.HorizontalAlignment = HorizontalAlignment.Left;
1004
+                            HeadImg.VerticalAlignment = VerticalAlignment.Top;
1005
+                            break;
1006
+                        case "3":
1007
+                            HeadImg.HorizontalAlignment = HorizontalAlignment.Right;
1008
+                            HeadImg.VerticalAlignment = VerticalAlignment.Bottom;
1009
+                            break;
1010
+                        case "4":
1011
+                            HeadImg.HorizontalAlignment = HorizontalAlignment.Left;
1012
+                            HeadImg.VerticalAlignment = VerticalAlignment.Bottom;
1013
+                            break;
1015 1014
                     }
1016 1015
                     RbnTurnOff.IsEnabled = false;
1017
-                    await Task.Delay(2000);
1018
-                    RbnTurnOff.IsEnabled = true;
1016
+                    Task.Run
1017
+                    (
1018
+                        () =>
1019
+                        {
1020
+                            Thread.Sleep(3000);
1021
+                            Dispatcher.Invoke
1022
+                            (
1023
+                                () =>
1024
+                                {
1025
+                                    RbnTurnOff.IsEnabled = true;
1026
+                                }
1027
+                            );
1028
+                        }
1029
+                    );
1019 1030
                 }
1020 1031
             }
1021 1032
         }
@@ -1027,7 +1038,7 @@ namespace XHWK.WKTool
1027 1038
         /// </param>
1028 1039
         /// <param name="e">
1029 1040
         /// </param>
1030
-        private async void RbnTurnOff_Click(object sender, RoutedEventArgs e)
1041
+        private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
1031 1042
         {
1032 1043
             if (_isRbnOpen)
1033 1044
             {
@@ -1038,19 +1049,29 @@ namespace XHWK.WKTool
1038 1049
                     return;
1039 1050
                 }
1040 1051
                 _isPressButton = true;
1041
-                await Task.Delay(500);
1042
-                _isPressButton = false;
1052
+                Task.Run
1053
+                (
1054
+                    () =>
1055
+                    {
1056
+                        Thread.Sleep(500);
1057
+                        _isPressButton = false;
1058
+                    }
1059
+                );
1043 1060
 
1044 1061
                 #endregion 防止连击
1045 1062
 
1046 1063
                 _isRbnOpen = false;
1047
-                ImgPlayerRight.Visibility = Visibility.Hidden;
1048
-                ImgPlayerLeft.Visibility = Visibility.Hidden;
1049
-                ImgPlayerRightUnder.Visibility = Visibility.Hidden;
1050
-                ImgPlayerLeftUnder.Visibility = Visibility.Hidden;
1064
+                HeadImg.Visibility = Visibility.Hidden;
1051 1065
                 RbnOpen.IsEnabled = false;
1052 1066
                 CameraHelper.CloseDevice();
1053 1067
                 RbnOpen.IsEnabled = true;
1068
+                if (_timer != null)
1069
+                {
1070
+                    _times.Elapsed -= Times_Elapsed;
1071
+                    _times.Enabled = false;
1072
+                    _times.Dispose();
1073
+                    _times = null;
1074
+                }
1054 1075
             }
1055 1076
         }
1056 1077
 
@@ -1331,7 +1352,7 @@ namespace XHWK.WKTool
1331 1352
         {
1332 1353
             try
1333 1354
             {
1334
-                Record();
1355
+                PrepareRecord();
1335 1356
                 HideAngleBorder();
1336 1357
                 string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
1337 1358
                 _ofd = new System.Windows.Forms.OpenFileDialog
@@ -1361,7 +1382,7 @@ namespace XHWK.WKTool
1361 1382
         /// </param>
1362 1383
         private void BtnScreenshot_Click(object sender, RoutedEventArgs e)
1363 1384
         {
1364
-            Record();
1385
+            PrepareRecord();
1365 1386
             HideAngleBorder();
1366 1387
             ImgCanvas.Margin = new Thickness
1367 1388
             (
@@ -2381,7 +2402,7 @@ namespace XHWK.WKTool
2381 2402
                 MessageWindow.Show("扬声器不可用");
2382 2403
                 return;
2383 2404
             }
2384
-            Record();
2405
+            PrepareRecord();
2385 2406
             _kHook.Stop();
2386 2407
             if (APP.W_ScreenRecordingToolbarWindow == null)
2387 2408
             {
@@ -2511,18 +2532,15 @@ namespace XHWK.WKTool
2511 2532
             {
2512 2533
                 return;
2513 2534
             }
2514
-            else
2515
-            {
2516
-                _isPressButton = true;
2517
-                new Thread
2518
-                (
2519
-                    () =>
2520
-                    {
2521
-                        Thread.Sleep(500);
2522
-                        _isPressButton = false;
2523
-                    }
2524
-                ).Start();
2525
-            }
2535
+            _isPressButton = true;
2536
+            new Thread
2537
+            (
2538
+                () =>
2539
+                {
2540
+                    Thread.Sleep(500);
2541
+                    _isPressButton = false;
2542
+                }
2543
+            ).Start();
2526 2544
 
2527 2545
             #endregion 防止连击
2528 2546
 
@@ -2549,7 +2567,7 @@ namespace XHWK.WKTool
2549 2567
                 {
2550 2568
                     HideAngleBorder();
2551 2569
                 }
2552
-                Record();
2570
+                PrepareRecord();
2553 2571
                 BtnPrint.IsEnabled = false;
2554 2572
                 BtnScreenshot.IsEnabled = false;
2555 2573
                 BtnImport.IsEnabled = false;
@@ -3378,7 +3396,7 @@ namespace XHWK.WKTool
3378 3396
         /// <summary>
3379 3397
         /// 录屏 录制 截图 导入文档 增加 主页面显示
3380 3398
         /// </summary>
3381
-        private void Record()
3399
+        private void PrepareRecord()
3382 3400
         {
3383 3401
             PageHide();
3384 3402
             GridMain.Visibility = Visibility.Visible;

+ 2
- 2
星火微课/星火微课-正式.iss View File

@@ -3,10 +3,10 @@
3 3
 
4 4
 #define MyAppName "星火微课"  
5 5
 #define MyAppDir "xhwk"
6
-#define MyAppVersion "3.9.0"
6
+#define MyAppVersion "3.9.2"
7 7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8 8
 #define MyAppURL "http://www.xhkjedu.com/"
9
-#define MySourcePath "D:\Project\CSharp\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
9
+#define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"
10 10
 #define MyAppExeName "星火微课.exe"
11 11
 #define MyIcoName "256.ico"
12 12
 #define MyTargetPath "D:\程序打包\星火微课-正式\"

+ 1
- 1
星火微课/星火微课-测试.iss View File

@@ -3,7 +3,7 @@
3 3
 
4 4
 #define MyAppName "星火微课测试版"  
5 5
 #define MyAppDir "xhwk_test"
6
-#define MyAppVersion "3.9.1"
6
+#define MyAppVersion "3.9.2"
7 7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8 8
 #define MyAppURL "http://www.xhkjedu.com/"
9 9
 #define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"

Loading…
Cancel
Save