|
@@ -176,6 +176,8 @@ namespace XHWK.WKTool
|
176
|
176
|
txbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoSavePath");
|
177
|
177
|
Initialize();
|
178
|
178
|
InitPen();
|
|
179
|
+ k_hook = new KeyboardHookCommon();
|
|
180
|
+ k_hook.KeyDownEvent += K_hook_KeyDownEvent;
|
179
|
181
|
}
|
180
|
182
|
/// <summary>
|
181
|
183
|
/// 初始化
|
|
@@ -207,7 +209,13 @@ namespace XHWK.WKTool
|
207
|
209
|
//wfhCamera.Visibility = Visibility.Hidden;
|
208
|
210
|
ImgPDFPath = null;
|
209
|
211
|
ImgPDFPath = new string[300];
|
210
|
|
-
|
|
212
|
+ }
|
|
213
|
+ /// <summary>
|
|
214
|
+ /// 初始化快捷键
|
|
215
|
+ /// </summary>
|
|
216
|
+ public void InitializeKeyDownEvent()
|
|
217
|
+ {
|
|
218
|
+ k_hook.Start();//安装键盘钩子
|
211
|
219
|
}
|
212
|
220
|
/// <summary>
|
213
|
221
|
/// 快捷键
|
|
@@ -232,14 +240,16 @@ namespace XHWK.WKTool
|
232
|
240
|
next_btn_Click(null, null);
|
233
|
241
|
}
|
234
|
242
|
}
|
235
|
|
- //if (e.KeyValue == (int)System.Windows.Forms.Keys.Delete)
|
236
|
|
- //{
|
237
|
|
- // if (APP.pageData.currpage < APP.pageData.pagenum)
|
238
|
|
- // {
|
239
|
|
- // //下一页
|
240
|
|
- // next_btn_Click(null, null);
|
241
|
|
- // }
|
242
|
|
- //}
|
|
243
|
+ if (e.KeyValue == (int)System.Windows.Forms.Keys.Delete)
|
|
244
|
+ {
|
|
245
|
+ if (RectImgBorder.Visibility != Visibility.Hidden)
|
|
246
|
+ {
|
|
247
|
+ HideAngleBorder();
|
|
248
|
+ imgCanvas.Source = null;
|
|
249
|
+ APP.PageDrawList[APP.pageData.currpage - 1].PdfImagePath = null;
|
|
250
|
+ APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath = null;
|
|
251
|
+ }
|
|
252
|
+ }
|
243
|
253
|
}
|
244
|
254
|
|
245
|
255
|
/// <summary>
|
|
@@ -902,20 +912,24 @@ namespace XHWK.WKTool
|
902
|
912
|
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + time + ".jpg";
|
903
|
913
|
APP.ImgPath = desktopPath;
|
904
|
914
|
ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), desktopPath, false, out BitmapImage bitmap);
|
|
915
|
+ k_hook.Stop();
|
905
|
916
|
if (WindowState == WindowState.Normal)//截图隐藏窗口
|
906
|
917
|
{
|
907
|
918
|
WindowState = WindowState.Minimized;
|
908
|
919
|
}
|
|
920
|
+
|
909
|
921
|
if (APP.W_JieTuWindow != null)
|
910
|
922
|
{
|
911
|
923
|
APP.W_JieTuWindow.initialization();
|
912
|
924
|
APP.W_JieTuWindow.Screenshot();
|
|
925
|
+ APP.W_JieTuWindow.InitializeKeyDownEvent();
|
913
|
926
|
APP.W_JieTuWindow.WindowState = WindowState.Maximized;
|
914
|
927
|
APP.W_JieTuWindow.Visibility = Visibility.Visible;
|
915
|
928
|
}
|
916
|
929
|
else
|
917
|
930
|
{
|
918
|
931
|
APP.W_JieTuWindow = new JieTuWindow();
|
|
932
|
+ APP.W_JieTuWindow.InitializeKeyDownEvent();
|
919
|
933
|
// 订阅事件
|
920
|
934
|
APP.W_JieTuWindow.ChangeTextEvent += new ChangeTextHandler(frm_ChangeTextEvent);
|
921
|
935
|
APP.W_JieTuWindow.click_closeJietuWindowClick += JietuWindow_click_closeJietuWindowClick;
|
|
@@ -937,6 +951,7 @@ namespace XHWK.WKTool
|
937
|
951
|
Topmost = true;
|
938
|
952
|
WindowState = WindowState.Normal;
|
939
|
953
|
}
|
|
954
|
+ InitializeKeyDownEvent();
|
940
|
955
|
if (!string.IsNullOrWhiteSpace(APP.ImgPath) && File.Exists(APP.ImgPath))
|
941
|
956
|
{
|
942
|
957
|
if (APP.pageData.currpage == 0)
|
|
@@ -2629,7 +2644,8 @@ namespace XHWK.WKTool
|
2629
|
2644
|
// return;
|
2630
|
2645
|
// }
|
2631
|
2646
|
//}
|
2632
|
|
- #endregion
|
|
2647
|
+ #endregion
|
|
2648
|
+ k_hook.Stop();
|
2633
|
2649
|
if (APP.W_ScreenRecordingToolbarWindow == null)
|
2634
|
2650
|
{
|
2635
|
2651
|
APP.W_ScreenRecordingToolbarWindow = new ScreenRecordingToolbarWindow
|