|
@@ -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;
|