소스 검색

优化

tags/录制修改前
zhangxueyang 4 년 전
부모
커밋
ca6c0a3ef6

+ 2
- 2
XHWK.WKTool/App.config 파일 보기

@@ -33,8 +33,8 @@
33 33
     <!--上传每片大小 Mb-->
34 34
     <add key="UploadSliceLen" value="1" />
35 35
     <!--版本号-->
36
-    <add key="VersionCode" value="28" />
37
-    <add key="VersionName" value="1.2.7" />
36
+    <add key="VersionCode" value="29" />
37
+    <add key="VersionName" value="1.2.8" />
38 38
     <add key="ClientSettingsProvider.ServiceUri" value="" />
39 39
   </appSettings>
40 40
   <system.web>

+ 1
- 0
XHWK.WKTool/JieTuWindow.xaml.cs 파일 보기

@@ -127,6 +127,7 @@ namespace ComeCapture
127 127
                 k_hook.Stop();
128 128
                 Current.OnCancel();
129 129
                 APP.W_XHMicroLessonSystemWindow.InitializeKeyDownEvent();
130
+                APP.W_XHMicroLessonSystemWindow.WindowType();
130 131
                 this.Hide();
131 132
             }
132 133
         }

+ 2
- 2
XHWK.WKTool/Properties/AssemblyInfo.cs 파일 보기

@@ -49,5 +49,5 @@ using System.Windows;
49 49
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
50 50
 //通过使用 "*",如下所示:
51 51
 // [assembly: AssemblyVersion("1.0.*")]
52
-[assembly: AssemblyVersion("1.2.7.0")]
53
-[assembly: AssemblyFileVersion("1.2.7.0")]
52
+[assembly: AssemblyVersion("1.2.8.0")]
53
+[assembly: AssemblyFileVersion("1.2.8.0")]

+ 28
- 25
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs 파일 보기

@@ -75,41 +75,43 @@ namespace XHWK.WKTool
75 75
         public ScreenRecordingToolbarWindow()
76 76
         {
77 77
             InitializeComponent();
78
-            if (APP.W_PracticeWindow == null)
79
-            {
80
-                APP.W_PracticeWindow = new PracticeWindow
81
-                {
82
-                    //APP.W_PracticeWindow.Topmost = true;
83
-                    Width = pwidth,
84
-                    Height = pHeight,
85
-                    Left = 0,
86
-                    Top = 0
87
-                };
88
-                //practiceWin.Owner = this;
89
-            }
90
-            APP.W_PracticeWindow.Show();
91
-            new Thread(new ThreadStart(new Action(() =>
92
-            {
93
-                Thread.Sleep(100);
94
-                Dispatcher.Invoke(() =>
95
-                {
96
-                    this.Owner = APP.W_PracticeWindow;
97
-                    this.Topmost = true;
98
-                });
99
-            }))).Start();
100
-            APP.W_PracticeWindow.Hide();
78
+            this.ResizeMode = ResizeMode.NoResize;
101 79
         }
102 80
         /// <summary>
103 81
         /// 初始化
104 82
         /// </summary>
105 83
         public void Initialize()
106 84
         {
85
+                if (APP.W_PracticeWindow == null)
86
+                {
87
+                    APP.W_PracticeWindow = new PracticeWindow
88
+                    {
89
+                        //APP.W_PracticeWindow.Topmost = true;
90
+                        Width = pwidth,
91
+                        Height = pHeight,
92
+                        Left = 0,
93
+                        Top = 0
94
+                    };
95
+                    //practiceWin.Owner = this;
96
+                }
97
+                APP.W_PracticeWindow.Show();
98
+                new Thread(new ThreadStart(new Action(() =>
99
+                {
100
+                    Thread.Sleep(100);
101
+                    Dispatcher.Invoke(() =>
102
+                    {
103
+                        this.Owner = APP.W_PracticeWindow;
104
+                        this.Topmost = true;
105
+                    });
106
+                }))).Start();
107
+                APP.W_PracticeWindow.Hide();
108
+            
107 109
             //timer = new System.Timers.Timer(200);
108 110
             //timer.Interval = 300;
109 111
             //timer.Elapsed += new System.Timers.ElapsedEventHandler(TimerDealy);
110 112
             //timer.Enabled = true; //启动计时器
111 113
 
112
-                borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
114
+            borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
113 115
                 borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
114 116
             flg = 0;
115 117
          
@@ -509,7 +511,7 @@ namespace XHWK.WKTool
509 511
                 if (APP.W_PracticeWindow.Visibility == Visibility.Visible)
510 512
                 {
511 513
                     this.Owner = null;
512
-                    APP.W_PracticeWindow.Hide();
514
+                    APP.W_PracticeWindow.ReturnPractice();
513 515
                 }
514 516
             }
515 517
             if (gridToolbar.Visibility == Visibility.Visible)
@@ -1083,6 +1085,7 @@ namespace XHWK.WKTool
1083 1085
 
1084 1086
                 txbTime.Visibility = Visibility.Hidden;
1085 1087
                 End();
1088
+                APP.W_PracticeWindow.ReturnPractice();
1086 1089
                 if (APP.W_PracticeWindow != null)
1087 1090
                 {
1088 1091
                     if (APP.W_PracticeWindow.Visibility == Visibility.Visible)

+ 1
- 1
XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs 파일 보기

@@ -69,7 +69,7 @@ namespace XHWK.WKTool.UControl
69 69
             string videoName = FileToolsCommon.GetIOFileNameNoExtension(VideoModel.VideoPath);
70 70
             TbName.Text = videoName.Length > 11 ? videoName.Substring(0, 11) + "..." : videoName;
71 71
             TbName.ToolTip = videoName;
72
-            lblDateSize.Content = VideoModel.RSTime + "|" + VideoModel.VideoSize;
72
+            lblDateSize.Content = VideoModel.RSTime + " " + VideoModel.VideoSize;
73 73
             if (VideoModel.IsUpload)
74 74
             {
75 75
                 //BtnUpload.Visibility = Visibility.Hidden;

+ 15
- 2
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs 파일 보기

@@ -938,6 +938,14 @@ namespace XHWK.WKTool
938 938
 
939 939
             //imgCanvas.Source = new BitmapImage(new Uri(desktopPath));
940 940
         }
941
+        public void WindowType()
942
+        {
943
+            if (WindowState == WindowState.Minimized)//截图完恢复窗口
944
+            {
945
+                Topmost = true;
946
+                WindowState = WindowState.Normal;
947
+            }
948
+        }
941 949
         /// <summary>
942 950
         /// 截图关闭窗口
943 951
         /// </summary>
@@ -992,6 +1000,7 @@ namespace XHWK.WKTool
992 1000
                         imgCanvas.Source = bitImg;
993 1001
                         imgCanvas.Width = bitImg.Width;
994 1002
                         imgCanvas.Height = bitImg.Height;
1003
+                        scroMain.ScrollToVerticalOffset(0);
995 1004
                         APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes = new ScaleTransform
996 1005
                         {
997 1006
                             CenterX = imgCanvas.Width,
@@ -1042,8 +1051,8 @@ namespace XHWK.WKTool
1042 1051
                 string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
1043 1052
                 ofd = new System.Windows.Forms.OpenFileDialog
1044 1053
                 {
1045
-                    Filter = "文档|*.docx;*.doc;*.ppt;*.pptx",
1046
-                    //Filter = "文档|*.docx;*.doc;*.ppt;*.pptx;*.pdf",
1054
+                    //Filter = "文档|*.docx;*.doc;*.ppt;*.pptx",
1055
+                    Filter = "文档|*.docx;*.doc;*.ppt;*.pptx;*.pdf",
1047 1056
                     InitialDirectory = desktopPath,
1048 1057
                     Multiselect = false,
1049 1058
                     AddExtension = true,
@@ -1197,6 +1206,7 @@ namespace XHWK.WKTool
1197 1206
                                     btnScreenshot.IsEnabled = false;
1198 1207
                                     imgDocumentation.Source = null;
1199 1208
                                     imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1209
+                                    scroMain.ScrollToVerticalOffset(0);
1200 1210
                                     for (int i = iStart; i < iEnd; i++)
1201 1211
                                     {
1202 1212
                                         APP.PageDrawList[i].ImageLocation = new TranslateTransform
@@ -1328,6 +1338,7 @@ namespace XHWK.WKTool
1328 1338
                                     btnScreenshot.IsEnabled = false;
1329 1339
                                     imgDocumentation.Source = null;
1330 1340
                                     imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1341
+                                    scroMain.ScrollToVerticalOffset(0);
1331 1342
                                     for (int i = iStart; i < iEnd; i++)
1332 1343
                                     {
1333 1344
                                         APP.PageDrawList[i].ImageLocation = new TranslateTransform
@@ -1420,6 +1431,7 @@ namespace XHWK.WKTool
1420 1431
                                     btnScreenshot.IsEnabled = false;
1421 1432
                                     imgDocumentation.Visibility = Visibility.Visible;
1422 1433
                                     imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1434
+                                    scroMain.ScrollToVerticalOffset(0);
1423 1435
                                 }
1424 1436
                                 else
1425 1437
                                 {
@@ -3498,6 +3510,7 @@ namespace XHWK.WKTool
3498 3510
             gridPage.Visibility = Visibility.Visible;//页码大于0 显示
3499 3511
             APP.pageData.currpage = APP.pageData.pagenum;
3500 3512
             myblackboard.changepage(APP.pageData.currpage - 1);
3513
+            scroMain.ScrollToVerticalOffset(0);
3501 3514
             ///清空页面图片UI
3502 3515
             imgCanvas.Source = null;
3503 3516
             imgDocumentation.Source = null;

Loading…
취소
저장