|
@@ -247,12 +247,31 @@ namespace XHWK.WKTool
|
247
|
247
|
}
|
248
|
248
|
}
|
249
|
249
|
/// <summary>
|
|
250
|
+ /// 是否已经按下按钮
|
|
251
|
+ /// </summary>
|
|
252
|
+ bool IsPressButton = false;
|
|
253
|
+ /// <summary>
|
250
|
254
|
/// 开始或暂停录制
|
251
|
255
|
/// </summary>
|
252
|
256
|
/// <param name="sender"></param>
|
253
|
257
|
/// <param name="e"></param>
|
254
|
258
|
private void BtnRecordingScreen_Click(object sender, RoutedEventArgs e)
|
255
|
259
|
{
|
|
260
|
+ #region 防止连击
|
|
261
|
+ if (IsPressButton)
|
|
262
|
+ {
|
|
263
|
+ new Thread(new ThreadStart(new Action(() =>
|
|
264
|
+ {
|
|
265
|
+ Thread.Sleep(500);
|
|
266
|
+ IsPressButton = false;
|
|
267
|
+ }))).Start();
|
|
268
|
+ return;
|
|
269
|
+ }
|
|
270
|
+ else
|
|
271
|
+ {
|
|
272
|
+ IsPressButton = true;
|
|
273
|
+ }
|
|
274
|
+ #endregion
|
256
|
275
|
if (IsSuspend)
|
257
|
276
|
{
|
258
|
277
|
if (IsFirstRS)
|
|
@@ -443,6 +462,21 @@ namespace XHWK.WKTool
|
443
|
462
|
/// <param name="e"></param>
|
444
|
463
|
private void BtnStopRecordingScreen_Click(object sender, RoutedEventArgs e)
|
445
|
464
|
{
|
|
465
|
+ #region 防止连击
|
|
466
|
+ if (IsPressButton)
|
|
467
|
+ {
|
|
468
|
+ new Thread(new ThreadStart(new Action(() =>
|
|
469
|
+ {
|
|
470
|
+ Thread.Sleep(500);
|
|
471
|
+ IsPressButton = false;
|
|
472
|
+ }))).Start();
|
|
473
|
+ return;
|
|
474
|
+ }
|
|
475
|
+ else
|
|
476
|
+ {
|
|
477
|
+ IsPressButton = true;
|
|
478
|
+ }
|
|
479
|
+ #endregion
|
446
|
480
|
k_hook.Stop();
|
447
|
481
|
IsSuspend = true;
|
448
|
482
|
txbTime.Text = "00:00";
|
|
@@ -551,9 +585,11 @@ namespace XHWK.WKTool
|
551
|
585
|
{
|
552
|
586
|
Directory.CreateDirectory(tempPath);
|
553
|
587
|
}
|
554
|
|
- string imagePath = Path.Combine(tempPath, time + ".jpg");
|
555
|
588
|
|
556
|
|
- ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);
|
|
589
|
+ #region 录屏批注取消画笔
|
|
590
|
+ //string imagePath = Path.Combine(tempPath, time + ".jpg");
|
|
591
|
+ //ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);
|
|
592
|
+ #endregion
|
557
|
593
|
|
558
|
594
|
try
|
559
|
595
|
{
|
|
@@ -600,7 +636,7 @@ namespace XHWK.WKTool
|
600
|
636
|
};
|
601
|
637
|
//practiceWin.Owner = this;
|
602
|
638
|
}
|
603
|
|
- APP.W_PracticeWindow.Initialize(imagePath);
|
|
639
|
+ APP.W_PracticeWindow.Initialize();// imagePath);
|
604
|
640
|
flg = 11;
|
605
|
641
|
APP.W_PracticeWindow.Blue();
|
606
|
642
|
APP.W_PracticeWindow.Show();
|
|
@@ -833,9 +869,10 @@ namespace XHWK.WKTool
|
833
|
869
|
{
|
834
|
870
|
Directory.CreateDirectory(tempPath);
|
835
|
871
|
}
|
|
872
|
+ #region 录屏批注取消画笔
|
836
|
873
|
string imagePath = Path.Combine(tempPath, time + ".jpg");
|
837
|
|
-
|
838
|
874
|
ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);
|
|
875
|
+ #endregion
|
839
|
876
|
try
|
840
|
877
|
{
|
841
|
878
|
if (flg == 10)
|
|
@@ -877,7 +914,7 @@ namespace XHWK.WKTool
|
877
|
914
|
};
|
878
|
915
|
//practiceWin.Owner = this;
|
879
|
916
|
}
|
880
|
|
- APP.W_PracticeWindow.Initialize(imagePath);
|
|
917
|
+ APP.W_PracticeWindow.Initialize();//imagePath);
|
881
|
918
|
flg = 10;
|
882
|
919
|
APP.W_PracticeWindow.Red();
|
883
|
920
|
APP.W_PracticeWindow.Show();
|
|
@@ -907,8 +944,11 @@ namespace XHWK.WKTool
|
907
|
944
|
{
|
908
|
945
|
Directory.CreateDirectory(tempPath);
|
909
|
946
|
}
|
910
|
|
- string imagePath = Path.Combine(tempPath, time + ".jpg");
|
911
|
|
- ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);
|
|
947
|
+
|
|
948
|
+ #region 录屏批注取消画笔
|
|
949
|
+ //string imagePath = Path.Combine(tempPath, time + ".jpg");
|
|
950
|
+ //ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);
|
|
951
|
+ #endregion
|
912
|
952
|
|
913
|
953
|
try
|
914
|
954
|
{
|
|
@@ -924,7 +964,7 @@ namespace XHWK.WKTool
|
924
|
964
|
};
|
925
|
965
|
//practiceWin.Owner = this;
|
926
|
966
|
}
|
927
|
|
- APP.W_PracticeWindow.Initialize(imagePath);
|
|
967
|
+ APP.W_PracticeWindow.Initialize();//imagePath);
|
928
|
968
|
|
929
|
969
|
if (flg == 0)
|
930
|
970
|
{
|