Browse Source

剔除拓思德点阵笔验证

master
张剑 2 years ago
parent
commit
77230290f2

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

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

+ 0
- 7
XHWK.WKTool/App.xaml.cs View File

12
 using System.Threading.Tasks;
12
 using System.Threading.Tasks;
13
 using System.Windows;
13
 using System.Windows;
14
 
14
 
15
-using TStudyDigitalPen.HID;
16
-
17
 using XHWK.Model;
15
 using XHWK.Model;
18
 using XHWK.WKTool.Helpers;
16
 using XHWK.WKTool.Helpers;
19
 using XHWK.WKTool.Skin;
17
 using XHWK.WKTool.Skin;
203
 
201
 
204
         #region 点阵笔
202
         #region 点阵笔
205
 
203
 
206
-        /// <summary>
207
-        /// 点阵笔
208
-        /// </summary>
209
-        public static DigitalPenHID digitalPen;
210
-
211
         /// <summary>
204
         /// <summary>
212
         /// 笔序号
205
         /// 笔序号
213
         /// </summary>
206
         /// </summary>

+ 1
- 1
XHWK.WKTool/MainWindow.xaml.cs View File

2714
         /// </param>
2714
         /// </param>
2715
         /// <param name="e">
2715
         /// <param name="e">
2716
         /// </param>
2716
         /// </param>
2717
-        private async void BtnScreenRecording_Click(object sender, RoutedEventArgs e)
2717
+        private void BtnScreenRecording_Click(object sender, RoutedEventArgs e)
2718
         {
2718
         {
2719
             luoBoPenUtil.lb_device_mouse();
2719
             luoBoPenUtil.lb_device_mouse();
2720
 
2720
 

+ 54
- 151
XHWK.WKTool/PracticeWindow.xaml.cs View File

9
 using System.Windows.Input;
9
 using System.Windows.Input;
10
 using System.Windows.Media;
10
 using System.Windows.Media;
11
 
11
 
12
-using TStudyDigitalPen.HID;
13
-
14
 using XHWK.Model;
12
 using XHWK.Model;
15
 
13
 
16
 namespace XHWK.WKTool
14
 namespace XHWK.WKTool
20
     /// </summary>
18
     /// </summary>
21
     public partial class PracticeWindow : Window
19
     public partial class PracticeWindow : Window
22
     {
20
     {
23
-        //声明一个 DrawingAttributes 类型的变量  
21
+        //声明一个 DrawingAttributes 类型的变量
24
         private DrawingAttributes drawingAttributes;
22
         private DrawingAttributes drawingAttributes;
23
+
25
         private DrawingAttributes drawing;
24
         private DrawingAttributes drawing;
26
         private ViewModel viewModel;
25
         private ViewModel viewModel;
26
+
27
         /// <summary>
27
         /// <summary>
28
-        /// 0 画笔 1 矩形 2 圆形 
28
+        /// 0 画笔 1 矩形 2 圆形
29
         /// </summary>
29
         /// </summary>
30
         private int flg = 0;
30
         private int flg = 0;
31
 
31
 
33
         /// 当前画笔颜色
33
         /// 当前画笔颜色
34
         /// </summary>
34
         /// </summary>
35
         private Color Colour = Colors.Red;
35
         private Color Colour = Colors.Red;
36
+
36
         /// <summary>
37
         /// <summary>
37
         /// 当前画笔宽
38
         /// 当前画笔宽
38
         /// </summary>
39
         /// </summary>
39
         private int Wit = 2;
40
         private int Wit = 2;
41
+
40
         /// <summary>
42
         /// <summary>
41
         /// 当前画笔高
43
         /// 当前画笔高
42
         /// </summary>
44
         /// </summary>
43
         private int Hei = 2;
45
         private int Hei = 2;
46
+
44
         public PracticeWindow()
47
         public PracticeWindow()
45
         {
48
         {
46
             InitializeComponent();
49
             InitializeComponent();
47
-            InitPen();
50
+
48
             InitTQLPPen();
51
             InitTQLPPen();
49
         }
52
         }
53
+
50
         public void Initialize(string _imgPath = null)
54
         public void Initialize(string _imgPath = null)
51
         {
55
         {
52
             flg = 0;
56
             flg = 0;
59
             //    imgCanvas.Source = new BitmapImage(new Uri(_imgPath));
63
             //    imgCanvas.Source = new BitmapImage(new Uri(_imgPath));
60
             //}
64
             //}
61
 
65
 
62
-
63
-
64
-
65
-            //创建 DrawingAttributes 类的一个实例  
66
+            //创建 DrawingAttributes 类的一个实例
66
             drawingAttributes = new DrawingAttributes();
67
             drawingAttributes = new DrawingAttributes();
67
 
68
 
68
             //drawingAttributes.StylusTip = StylusTip.Rectangle;
69
             //drawingAttributes.StylusTip = StylusTip.Rectangle;
69
             //drawingAttributes.IsHighlighter = false;
70
             //drawingAttributes.IsHighlighter = false;
70
             //drawingAttributes.IgnorePressure = true;
71
             //drawingAttributes.IgnorePressure = true;
71
 
72
 
72
-
73
-
74
-            ////将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用  
75
-            ////InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型  
73
+            ////将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
74
+            ////InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
76
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
75
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
77
             Pen();
76
             Pen();
78
             //blackboard_canvas.Cursor = Cursors.Pen;
77
             //blackboard_canvas.Cursor = Cursors.Pen;
79
 
78
 
80
-
81
             //Cursor cus = new Cursor(@"G:\06.cur");
79
             //Cursor cus = new Cursor(@"G:\06.cur");
82
 
80
 
83
             //blackboard_canvas.Cursor = cus;
81
             //blackboard_canvas.Cursor = cus;
91
             //APP.W_ScreenRecordingToolbarWindow.Owner = this;
89
             //APP.W_ScreenRecordingToolbarWindow.Owner = this;
92
             //APP.W_ScreenRecordingToolbarWindow.Topmost = true;
90
             //APP.W_ScreenRecordingToolbarWindow.Topmost = true;
93
         }
91
         }
92
+
94
         /// <summary>
93
         /// <summary>
95
         /// 画笔颜色事件 白色
94
         /// 画笔颜色事件 白色
96
         /// </summary>
95
         /// </summary>
102
             drawingAttributes.Color = Colors.White;
101
             drawingAttributes.Color = Colors.White;
103
             Colour = Colors.White;
102
             Colour = Colors.White;
104
         }
103
         }
104
+
105
         /// <summary>
105
         /// <summary>
106
         /// 画笔颜色事件 红色
106
         /// 画笔颜色事件 红色
107
         /// </summary>
107
         /// </summary>
112
             drawingAttributes.Color = Colors.Red;
112
             drawingAttributes.Color = Colors.Red;
113
             Colour = Colors.Red;
113
             Colour = Colors.Red;
114
         }
114
         }
115
+
115
         /// <summary>
116
         /// <summary>
116
         /// 画笔颜色事件 黑色
117
         /// 画笔颜色事件 黑色
117
         /// </summary>
118
         /// </summary>
123
             drawingAttributes.Color = Colors.Black;
124
             drawingAttributes.Color = Colors.Black;
124
             Colour = Colors.Black;
125
             Colour = Colors.Black;
125
         }
126
         }
127
+
126
         /// <summary>
128
         /// <summary>
127
         /// 画笔颜色事件 青色
129
         /// 画笔颜色事件 青色
128
         /// </summary>
130
         /// </summary>
134
             drawingAttributes.Color = Colors.LimeGreen;
136
             drawingAttributes.Color = Colors.LimeGreen;
135
             Colour = Colors.LimeGreen;
137
             Colour = Colors.LimeGreen;
136
         }
138
         }
139
+
137
         /// <summary>
140
         /// <summary>
138
         /// 画笔颜色事件 黄色
141
         /// 画笔颜色事件 黄色
139
         /// </summary>
142
         /// </summary>
145
             drawingAttributes.Color = Colors.Gold;
148
             drawingAttributes.Color = Colors.Gold;
146
             Colour = Colors.Gold;
149
             Colour = Colors.Gold;
147
         }
150
         }
151
+
148
         /// <summary>
152
         /// <summary>
149
         /// 画笔颜色事件 蓝色
153
         /// 画笔颜色事件 蓝色
150
         /// </summary>
154
         /// </summary>
156
             drawingAttributes.Color = Colors.DeepSkyBlue;
160
             drawingAttributes.Color = Colors.DeepSkyBlue;
157
             Colour = Colors.DeepSkyBlue;
161
             Colour = Colors.DeepSkyBlue;
158
         }
162
         }
163
+
159
         /// <summary>
164
         /// <summary>
160
         /// 画笔粗细事件 细
165
         /// 画笔粗细事件 细
161
         /// </summary>
166
         /// </summary>
169
             Wit = 1;
174
             Wit = 1;
170
             Hei = 1;
175
             Hei = 1;
171
         }
176
         }
177
+
172
         /// <summary>
178
         /// <summary>
173
         /// 画笔粗细事件 中
179
         /// 画笔粗细事件 中
174
         /// </summary>
180
         /// </summary>
181
             drawingAttributes.Height = 3;
187
             drawingAttributes.Height = 3;
182
             Wit = 3;
188
             Wit = 3;
183
             Hei = 3;
189
             Hei = 3;
184
-
185
         }
190
         }
191
+
186
         /// <summary>
192
         /// <summary>
187
         /// 画笔粗细事件 粗
193
         /// 画笔粗细事件 粗
188
         /// </summary>
194
         /// </summary>
196
             Wit = 5;
202
             Wit = 5;
197
             Hei = 5;
203
             Hei = 5;
198
         }
204
         }
205
+
199
         /// <summary>
206
         /// <summary>
200
         /// 橡皮
207
         /// 橡皮
201
         /// </summary>
208
         /// </summary>
207
             blackboard_canvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
214
             blackboard_canvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
208
             blackboard_canvas.EraserShape = new EllipseStylusShape(64, 64, 0);
215
             blackboard_canvas.EraserShape = new EllipseStylusShape(64, 64, 0);
209
         }
216
         }
217
+
210
         /// <summary>
218
         /// <summary>
211
         /// 画笔
219
         /// 画笔
212
         /// </summary>
220
         /// </summary>
220
 
228
 
221
             blackboard_canvas.Cursor = Cursors.Pen;
229
             blackboard_canvas.Cursor = Cursors.Pen;
222
         }
230
         }
231
+
223
         /// <summary>
232
         /// <summary>
224
         /// 圆
233
         /// 圆
225
         /// </summary>
234
         /// </summary>
235
                 //FitToCurve = true,
244
                 //FitToCurve = true,
236
                 IsHighlighter = false,
245
                 IsHighlighter = false,
237
                 IgnorePressure = true,
246
                 IgnorePressure = true,
238
-
239
             };
247
             };
240
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
248
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
241
             blackboard_canvas.EditingMode = InkCanvasEditingMode.None;
249
             blackboard_canvas.EditingMode = InkCanvasEditingMode.None;
242
             blackboard_canvas.Cursor = Cursors.Cross;
250
             blackboard_canvas.Cursor = Cursors.Cross;
243
         }
251
         }
252
+
244
         /// <summary>
253
         /// <summary>
245
         /// 矩形
254
         /// 矩形
246
         /// </summary>
255
         /// </summary>
256
                 //FitToCurve = true,
265
                 //FitToCurve = true,
257
                 IsHighlighter = false,
266
                 IsHighlighter = false,
258
                 IgnorePressure = true,
267
                 IgnorePressure = true,
259
-
260
             };
268
             };
261
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
269
             blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
262
             blackboard_canvas.EditingMode = InkCanvasEditingMode.None;
270
             blackboard_canvas.EditingMode = InkCanvasEditingMode.None;
263
             blackboard_canvas.Cursor = Cursors.Cross;
271
             blackboard_canvas.Cursor = Cursors.Cross;
264
         }
272
         }
273
+
265
         private System.Windows.Point iniP;
274
         private System.Windows.Point iniP;
275
+
266
         private void blackboard_canvas_MouseDown(object sender, MouseButtonEventArgs e)
276
         private void blackboard_canvas_MouseDown(object sender, MouseButtonEventArgs e)
267
         {
277
         {
268
             if (flg != 0)
278
             if (flg != 0)
276
 
286
 
277
         private Stroke StrokeRound;
287
         private Stroke StrokeRound;
278
         private Stroke StrokeRectangle;
288
         private Stroke StrokeRectangle;
289
+
279
         private void blackboard_canvas_MouseMove(object sender, MouseEventArgs e)
290
         private void blackboard_canvas_MouseMove(object sender, MouseEventArgs e)
280
         {
291
         {
281
             if (flg != 0)
292
             if (flg != 0)
329
                 }
340
                 }
330
             }
341
             }
331
         }
342
         }
343
+
332
         private List<System.Windows.Point> GenerateEclipseGeometry(System.Windows.Point st, System.Windows.Point ed)
344
         private List<System.Windows.Point> GenerateEclipseGeometry(System.Windows.Point st, System.Windows.Point ed)
333
         {
345
         {
334
             double a = 0.5 * (ed.X - st.X);
346
             double a = 0.5 * (ed.X - st.X);
340
             }
352
             }
341
             return pointList;
353
             return pointList;
342
         }
354
         }
355
+
343
         /// <summary>
356
         /// <summary>
344
         /// 鼠标松开时
357
         /// 鼠标松开时
345
         /// </summary>
358
         /// </summary>
350
             StrokeRound = null;
363
             StrokeRound = null;
351
             StrokeRectangle = null;
364
             StrokeRectangle = null;
352
         }
365
         }
366
+
353
         /// <summary>
367
         /// <summary>
354
         /// 鼠标右键
368
         /// 鼠标右键
355
         /// </summary>
369
         /// </summary>
367
             }
381
             }
368
             Hide();
382
             Hide();
369
         }
383
         }
384
+
370
         /// <summary>
385
         /// <summary>
371
         /// 鼠标中键点击
386
         /// 鼠标中键点击
372
         /// </summary>
387
         /// </summary>
373
-        void SwitchPages()
388
+        private void SwitchPages()
374
         {
389
         {
375
             try
390
             try
376
             {
391
             {
386
             }
401
             }
387
         }
402
         }
388
 
403
 
389
-
390
         private void blackboard_canvas_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
404
         private void blackboard_canvas_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
391
         {
405
         {
392
             if (APP.W_ScreenRecordingToolbarWindow.flg == 10)
406
             if (APP.W_ScreenRecordingToolbarWindow.flg == 10)
415
             SwitchPages();
429
             SwitchPages();
416
             //Hide();
430
             //Hide();
417
         }
431
         }
432
+
418
         /// <summary>
433
         /// <summary>
419
         /// 退出批注并清空画板
434
         /// 退出批注并清空画板
420
         /// </summary>
435
         /// </summary>
437
             }))).Start();
452
             }))).Start();
438
         }
453
         }
439
 
454
 
440
-
441
         #region 点阵笔相关
455
         #region 点阵笔相关
456
+
442
         #region 值初始化
457
         #region 值初始化
458
+
443
         // 不同尺寸点阵纸点阵宽高尺寸计算方法为:纸张物理尺寸(毫米)/0.3 *8,详见 开发必读.pdf 文档
459
         // 不同尺寸点阵纸点阵宽高尺寸计算方法为:纸张物理尺寸(毫米)/0.3 *8,详见 开发必读.pdf 文档
444
 
460
 
445
         /// <summary>
461
         /// <summary>
472
         /// </summary>
488
         /// </summary>
473
         private bool isPenDown;
489
         private bool isPenDown;
474
 
490
 
475
-        //当前点阵地址
476
-        private string currentPageSerial = string.Empty;
477
-
478
-        //不同点阵地址对应的笔迹绘制图片,用于实现在不同点阵地址书写切换时,显示书写内容自动切换
479
-        //本例图片放在内存中存储,对于大量或者需要在多个点阵地址对应图片进行切换演示,建议将图片存储到文件,以免内存溢出
480
-        private Dictionary<string, System.Drawing.Image> pagesDic = new Dictionary<string, System.Drawing.Image>();
481
-        #endregion
482
-        public void InitPen()
483
-        {
484
-            stroke = new List<System.Drawing.Point>();
485
-            //获取点阵笔实例,并绑定点阵笔事件
486
-            //将授权文件内容传入,获取点阵笔对象实例
487
-            APP.digitalPen = DigitalPenHID.GetInstance(certificates.MyLicense.Bytes);
488
-            //绑定笔连接事件
489
-            APP.digitalPen.PenConnected += OnPenConnect;
490
-            //绑定笔断开事件
491
-            APP.digitalPen.PenDisconnect += OnPenDisconnect;
492
-            //绑定笔书写输出坐标事件
493
-            APP.digitalPen.PenCoordinate += OnPenCoordinate;
494
-            //绑定抬笔事件
495
-            APP.digitalPen.PenUp += OnPenUp;
496
-            //绑定落笔事件
497
-            APP.digitalPen.PenDown += OnPenDown;
498
-            APP.digitalPen.PenBatteryCapacity += OnBatteryCapacity;
499
-            APP.digitalPen.PenMemoryFillLevel += OnMemoryFillLevel;
500
-            //完成初始化点阵笔,开始与点阵笔通信
501
-            ERROR_CODE ER = APP.digitalPen.Start();
502
-
503
-            ////绑定笔在新的点阵地址页面书写事件
504
-            //APP.digitalPen.PenNewPage += APP.digitalPen_OnPenNewPage;
505
-            ////绑定笔信息事件
506
-            //APP.digitalPen.PenInfo += APP.digitalPen_OnPenInfo;
507
-            //启动接收笔数据,完成初始化工作
508
-            //ERROR_CODE rc = APP.digitalPen.Start();
509
-            //判断是否成功
510
-            if (ER != ERROR_CODE.ERROR_OK)
511
-            {
512
-                MessageWindow.Show("初始化失败,授权过期,返回值:" + ER.ToString());
513
-            }
514
-        }
491
+        #endregion 值初始化
515
 
492
 
516
         /// <summary>
493
         /// <summary>
517
         /// 落笔
494
         /// 落笔
553
 
530
 
554
                 stroke.Clear();
531
                 stroke.Clear();
555
             }
532
             }
556
-            //if (APP.pageData.currpage > 0)
557
-            //{
558
-            //    Dispatcher.Invoke(new Action(() =>
559
-            //    {
560
-            //        myblackboard.changepages(0, 0, true, Color, PenSize, APP.pageData.currpage - 1, 0);
561
-            //    }));
562
-            //}
563
-
564
 
533
 
565
             if (strokes != null && strokes.StylusPoints.Count > 1)
534
             if (strokes != null && strokes.StylusPoints.Count > 1)
566
             {
535
             {
615
                 APP.PenSerial = penSerial;
584
                 APP.PenSerial = penSerial;
616
                 APP.PenStatus = true;
585
                 APP.PenStatus = true;
617
                 this.penSerial = penSerial;
586
                 this.penSerial = penSerial;
618
-                //连接后,在获取笔数据前,可以清除笔内的历史数据
619
-                //APP.digitalPen.ClearMemory(penSerial);
620
-
621
-                //开始接收笔数据
622
-                APP.digitalPen.GetPenData(penSerial);
623
-                //UpdateDevStatus();
624
-                ////Dispatcher.Invoke(new Action(() =>
625
-                ////{
626
-                ////    txbNotConnected.Text = "已连接";
627
-                ////    txbNotConnecteds.Text = "已连接";
628
-                ////}));
629
-
630
             }
587
             }
631
         }
588
         }
589
+
632
         /// <summary>
590
         /// <summary>
633
         /// 电池电量
591
         /// 电池电量
634
         /// </summary>
592
         /// </summary>
739
                                     //blackboard_canvas.Strokes = new StrokeCollection();
697
                                     //blackboard_canvas.Strokes = new StrokeCollection();
740
                                     strokes = new Stroke(stylusPoints);
698
                                     strokes = new Stroke(stylusPoints);
741
 
699
 
742
-
743
                                     strokes.DrawingAttributes = drawing;
700
                                     strokes.DrawingAttributes = drawing;
744
                                     //blackboard_canvas.Strokes.Add(strokes);
701
                                     //blackboard_canvas.Strokes.Add(strokes);
745
 
702
 
778
                             }
735
                             }
779
                         }));
736
                         }));
780
                     }
737
                     }
781
-
782
                 }
738
                 }
783
             }
739
             }
784
         }
740
         }
785
-        bool isFirst = true;
741
+
742
+        private bool isFirst = true;
786
         private StylusPointCollection stylusPoints = new StylusPointCollection();
743
         private StylusPointCollection stylusPoints = new StylusPointCollection();
787
         private StylusPoint stylusPoint = new StylusPoint();
744
         private StylusPoint stylusPoint = new StylusPoint();
788
         private Stroke strokes;
745
         private Stroke strokes;
789
-        /// <summary>
790
-        /// 停止笔
791
-        /// </summary>
792
-        public void StopDigitalPen()
793
-        {
794
-            //停止,释放资源
795
-            APP.digitalPen.Stop();
796
-        }
797
-        /// <summary>
798
-        /// 清空笔内存储
799
-        /// </summary>
800
-        public void ClearPenStorage()
801
-        {
802
-            if (!string.IsNullOrEmpty(penSerial))
803
-            {
804
-                APP.digitalPen.ClearMemory(penSerial);
805
-            }
806
-        }
807
-        /// <summary>
808
-        /// 获取剩余电量
809
-        /// </summary>
810
-        public void GetPenElectricityQuantity()
811
-        {
812
-            if (!string.IsNullOrEmpty(penSerial))
813
-            {
814
-                APP.digitalPen.GetBatteryCapacity(penSerial);
815
-            }
816
-        }
817
-
818
-        /// <summary>
819
-        /// 获取存储空间
820
-        /// </summary>
821
-        public void GetUsedStorage()
822
-        {
823
-            if (!string.IsNullOrEmpty(penSerial))
824
-            {
825
-                APP.digitalPen.GetMemoryFillLevel(penSerial);
826
-            }
827
-        }
828
-
829
-        /// <summary>
830
-        /// 开启悬浮
831
-        /// </summary>
832
-        public void 开启悬浮()
833
-        {
834
-            if (!string.IsNullOrEmpty(penSerial))
835
-            {
836
-                APP.digitalPen.SetPenHoverMode(true, penSerial);
837
-            }
838
-        }
839
-
840
-        /// <summary>
841
-        /// 关闭悬浮
842
-        /// </summary>
843
-        public void 关闭悬浮()
844
-        {
845
-            if (!string.IsNullOrEmpty(penSerial))
846
-            {
847
-                APP.digitalPen.SetPenHoverMode(false, penSerial);
848
-            }
849
-        }
850
 
746
 
851
         /// <summary>
747
         /// <summary>
852
         /// 引用user32.dll动态链接库(windows api),
748
         /// 引用user32.dll动态链接库(windows api),
856
         [System.Runtime.InteropServices.DllImport("user32.dll")]
752
         [System.Runtime.InteropServices.DllImport("user32.dll")]
857
         private static extern int SetCursorPos(int x, int y);
753
         private static extern int SetCursorPos(int x, int y);
858
 
754
 
859
-        #endregion
755
+        #endregion 点阵笔相关
860
 
756
 
861
         #region 腾千里手写笔
757
         #region 腾千里手写笔
758
+
862
         /// <summary>
759
         /// <summary>
863
         /// 是否在书写
760
         /// 是否在书写
864
         /// </summary>
761
         /// </summary>
865
-        bool isTQLPenDown = false;
762
+        private bool isTQLPenDown = false;
763
+
866
         /// <summary>
764
         /// <summary>
867
         /// TQL点阵笔宽高
765
         /// TQL点阵笔宽高
868
         /// </summary>
766
         /// </summary>
869
         //static float TQLA4_WIDTH = (float)1075 / (float)150 * (float)25.4 / (float)1.524; //OID4
767
         //static float TQLA4_WIDTH = (float)1075 / (float)150 * (float)25.4 / (float)1.524; //OID4
870
         //static float TQLA4_HEIGHT = (float)1512 / (float)150 * (float)25.4 / (float)1.524;
768
         //static float TQLA4_HEIGHT = (float)1512 / (float)150 * (float)25.4 / (float)1.524;
871
-        static float TQLA4_WIDTH = (float)2480 / (float)300 * (float)25.4 / (float)1.524;
872
-        static float TQLA4_HEIGHT = (float)3509 / (float)300 * (float)25.4 / (float)1.524;
769
+        private static float TQLA4_WIDTH = (float)2480 / (float)300 * (float)25.4 / (float)1.524;
770
+
771
+        private static float TQLA4_HEIGHT = (float)3509 / (float)300 * (float)25.4 / (float)1.524;
772
+
873
         /// <summary>
773
         /// <summary>
874
         /// 初始化
774
         /// 初始化
875
         /// </summary>
775
         /// </summary>
884
                 APP.TQLPenevents.InToType = 2;
784
                 APP.TQLPenevents.InToType = 2;
885
             }
785
             }
886
         }
786
         }
787
+
887
         /// <summary>
788
         /// <summary>
888
         /// 笔落下
789
         /// 笔落下
889
         /// </summary>
790
         /// </summary>
899
             stylusPoint = new StylusPoint();
800
             stylusPoint = new StylusPoint();
900
             strokes = null;
801
             strokes = null;
901
         }
802
         }
803
+
902
         /// <summary>
804
         /// <summary>
903
         /// 笔抬起
805
         /// 笔抬起
904
         /// </summary>
806
         /// </summary>
914
             stylusPoint = new StylusPoint();
816
             stylusPoint = new StylusPoint();
915
             strokes = null;
817
             strokes = null;
916
         }
818
         }
819
+
917
         /// <summary>
820
         /// <summary>
918
         /// 笔书写
821
         /// 笔书写
919
         /// </summary>
822
         /// </summary>
995
                 }));
898
                 }));
996
             }
899
             }
997
         }
900
         }
998
-        #endregion
999
-    }
1000
-}
1001
 
901
 
902
+        #endregion 腾千里手写笔
903
+    }
904
+}

+ 3
- 3
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

112
                 };
112
                 };
113
                 //practiceWin.Owner = this;
113
                 //practiceWin.Owner = this;
114
             }
114
             }
115
-            APP.W_PracticeWindow.InitPen();
115
+
116
             APP.W_PracticeWindow.InitTQLPPen();
116
             APP.W_PracticeWindow.InitTQLPPen();
117
             APP.W_PracticeWindow.Show();
117
             APP.W_PracticeWindow.Show();
118
             new Thread(new ThreadStart(new Action(() =>
118
             new Thread(new ThreadStart(new Action(() =>
695
                         };
695
                         };
696
                         //practiceWin.Owner = this;
696
                         //practiceWin.Owner = this;
697
                     }
697
                     }
698
-                    APP.W_PracticeWindow.InitPen();
698
+
699
                     APP.W_PracticeWindow.InitTQLPPen();
699
                     APP.W_PracticeWindow.InitTQLPPen();
700
                     APP.W_PracticeWindow.Initialize();// imagePath);
700
                     APP.W_PracticeWindow.Initialize();// imagePath);
701
                     flg = 11;
701
                     flg = 11;
871
                             Top = 0
871
                             Top = 0
872
                         };
872
                         };
873
                     }
873
                     }
874
-                    APP.W_PracticeWindow.InitPen();
874
+
875
                     APP.W_PracticeWindow.InitTQLPPen();
875
                     APP.W_PracticeWindow.InitTQLPPen();
876
                     APP.W_PracticeWindow.Initialize();//imagePath);
876
                     APP.W_PracticeWindow.Initialize();//imagePath);
877
                     flg = 10;
877
                     flg = 10;

+ 18
- 17
XHWK.WKTool/Utils/pen/luobo/LuoBoPenUtil.cs View File

9
 
9
 
10
 namespace XHWK.WKTool.Utils.luobo
10
 namespace XHWK.WKTool.Utils.luobo
11
 {
11
 {
12
-    class LuoBoPenUtil
12
+    internal class LuoBoPenUtil
13
     {
13
     {
14
         #region 罗博智慧笔
14
         #region 罗博智慧笔
15
 
15
 
16
         #region 值初始化
16
         #region 值初始化
17
 
17
 
18
-        PenEventI penEvent = null;
18
+        private PenEventI penEvent = null;
19
 
19
 
20
         [System.Runtime.InteropServices.DllImport("kernel32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
20
         [System.Runtime.InteropServices.DllImport("kernel32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
21
         public static extern void OutputDebugString(string message);
21
         public static extern void OutputDebugString(string message);
30
         private int m_nDeviceH = 16650;
30
         private int m_nDeviceH = 16650;
31
         private robotpenController.returnPointData date = null;
31
         private robotpenController.returnPointData date = null;
32
 
32
 
33
-
34
         public bool isOpen = true;
33
         public bool isOpen = true;
35
 
34
 
36
         /// <summary>
35
         /// <summary>
38
         /// </summary>
37
         /// </summary>
39
         private bool IsPen = false;
38
         private bool IsPen = false;
40
 
39
 
41
-        private bool IsT8 = true;
42
-
43
         #endregion 值初始化
40
         #endregion 值初始化
44
 
41
 
45
-
46
-        public LuoBoPenUtil(PenEventI penEvent) {
42
+        public LuoBoPenUtil(PenEventI penEvent)
43
+        {
47
             this.penEvent = penEvent;
44
             this.penEvent = penEvent;
48
         }
45
         }
49
 
46
 
107
                         strStatus = "DEVICE_POWER_OFF";
104
                         strStatus = "DEVICE_POWER_OFF";
108
                     }
105
                     }
109
                     break;
106
                     break;
107
+
110
                 case NODE_STATUS.DEVICE_STANDBY:
108
                 case NODE_STATUS.DEVICE_STANDBY:
111
                     {
109
                     {
112
                         strStatus = "DEVICE_STANDBY";
110
                         strStatus = "DEVICE_STANDBY";
113
-
114
                     }
111
                     }
115
                     break;
112
                     break;
113
+
116
                 case NODE_STATUS.DEVICE_INIT_BTN:
114
                 case NODE_STATUS.DEVICE_INIT_BTN:
117
                     {
115
                     {
118
                         strStatus = "DEVICE_INIT_BTN";
116
                         strStatus = "DEVICE_INIT_BTN";
119
-
120
                     }
117
                     }
121
                     break;
118
                     break;
119
+
122
                 case NODE_STATUS.DEVICE_OFFLINE:
120
                 case NODE_STATUS.DEVICE_OFFLINE:
123
                     {
121
                     {
124
                         strStatus = "DEVICE_OFFLINE";
122
                         strStatus = "DEVICE_OFFLINE";
125
                     }
123
                     }
126
                     break;
124
                     break;
125
+
127
                 case NODE_STATUS.DEVICE_ACTIVE:
126
                 case NODE_STATUS.DEVICE_ACTIVE:
128
                     {
127
                     {
129
                         strStatus = "DEVICE_ACTIVE";
128
                         strStatus = "DEVICE_ACTIVE";
130
                         //deviceHand();
129
                         //deviceHand();
131
                     }
130
                     }
132
                     break;
131
                     break;
132
+
133
                 case NODE_STATUS.DEVICE_LOW_POWER_ACTIVE:
133
                 case NODE_STATUS.DEVICE_LOW_POWER_ACTIVE:
134
                     {
134
                     {
135
                         strStatus = "DEVICE_LOW_POWER_ACTIVE";
135
                         strStatus = "DEVICE_LOW_POWER_ACTIVE";
136
                     }
136
                     }
137
                     break;
137
                     break;
138
+
138
                 case NODE_STATUS.DEVICE_OTA_MODE:
139
                 case NODE_STATUS.DEVICE_OTA_MODE:
139
                     {
140
                     {
140
                         strStatus = "DEVICE_OTA_MODE";
141
                         strStatus = "DEVICE_OTA_MODE";
141
                     }
142
                     }
142
                     break;
143
                     break;
144
+
143
                 case NODE_STATUS.DEVICE_OTA_WAIT_SWITCH:
145
                 case NODE_STATUS.DEVICE_OTA_WAIT_SWITCH:
144
                     {
146
                     {
145
                         strStatus = "DEVICE_OTA_WAIT_SWITCH";
147
                         strStatus = "DEVICE_OTA_WAIT_SWITCH";
146
                     }
148
                     }
147
                     break;
149
                     break;
150
+
148
                 case NODE_STATUS.DEVICE_DFU_MODE:
151
                 case NODE_STATUS.DEVICE_DFU_MODE:
149
                     {
152
                     {
150
                         strStatus = "DEVICE_DFU_MODE";
153
                         strStatus = "DEVICE_DFU_MODE";
151
-
152
                     }
154
                     }
153
                     break;
155
                     break;
156
+
154
                 case NODE_STATUS.DEVICE_TRYING_POWER_OFF:
157
                 case NODE_STATUS.DEVICE_TRYING_POWER_OFF:
155
                     {
158
                     {
156
                         strStatus = "DEVICE_TRYING_POWER_OFF";
159
                         strStatus = "DEVICE_TRYING_POWER_OFF";
157
                     }
160
                     }
158
                     break;
161
                     break;
162
+
159
                 case NODE_STATUS.DEVICE_FINISHED_PRODUCT_TEST:
163
                 case NODE_STATUS.DEVICE_FINISHED_PRODUCT_TEST:
160
                     {
164
                     {
161
                         strStatus = "DEVICE_FINISHED_PRODUCT_TEST";
165
                         strStatus = "DEVICE_FINISHED_PRODUCT_TEST";
162
                     }
166
                     }
163
                     break;
167
                     break;
168
+
164
                 case NODE_STATUS.DEVICE_SYNC_MODE:
169
                 case NODE_STATUS.DEVICE_SYNC_MODE:
165
                     {
170
                     {
166
                         strStatus = "DEVICE_SYNC_MODE";
171
                         strStatus = "DEVICE_SYNC_MODE";
167
                     }
172
                     }
168
                     break;
173
                     break;
174
+
169
                 default:
175
                 default:
170
                     {
176
                     {
171
                         strStatus = "UNKNOW";
177
                         strStatus = "UNKNOW";
173
                     break;
179
                     break;
174
             }
180
             }
175
         }
181
         }
182
+
176
         private void luobo_switchModeEvt(int modeType)
183
         private void luobo_switchModeEvt(int modeType)
177
         {
184
         {
178
             if (modeType == 1)
185
             if (modeType == 1)
222
             }
229
             }
223
         }
230
         }
224
 
231
 
225
-
226
-
227
         /// <summary>
232
         /// <summary>
228
         /// 设备插拔消息,更新listview
233
         /// 设备插拔消息,更新listview
229
         /// </summary>
234
         /// </summary>
264
         /// </param>
269
         /// </param>
265
         private void luobo_bigDataReportEvt1(byte bIndex, byte bPenStatus, short bx, short by, short bPress)
270
         private void luobo_bigDataReportEvt1(byte bIndex, byte bPenStatus, short bx, short by, short bPress)
266
         {
271
         {
267
-
268
             if (bx == 0 && by == 0 && bPenStatus == 0 && bPress == 0)
272
             if (bx == 0 && by == 0 && bPenStatus == 0 && bPress == 0)
269
             {
273
             {
270
                 return;
274
                 return;
354
                                 robotpenController.GetInstance()._Send(cmdId.SearchMode);
358
                                 robotpenController.GetInstance()._Send(cmdId.SearchMode);
355
                             }))).Start();
359
                             }))).Start();
356
                         }
360
                         }
357
-
358
-
359
                     }
361
                     }
360
                 }
362
                 }
361
             }
363
             }
457
         /// </summary>
459
         /// </summary>
458
         public void UpdateDevStatus()
460
         public void UpdateDevStatus()
459
         {
461
         {
460
-     
461
             if (penEvent != null)
462
             if (penEvent != null)
462
             {
463
             {
463
                 penEvent.penStatusEvent();
464
                 penEvent.penStatusEvent();
466
 
467
 
467
         #endregion 罗博智慧笔
468
         #endregion 罗博智慧笔
468
     }
469
     }
469
-}
470
+}

+ 0
- 4
XHWK.WKTool/XHWK.WKTool.csproj View File

181
       <SpecificVersion>False</SpecificVersion>
181
       <SpecificVersion>False</SpecificVersion>
182
       <HintPath>..\DLL\TQL\TQLComm.dll</HintPath>
182
       <HintPath>..\DLL\TQL\TQLComm.dll</HintPath>
183
     </Reference>
183
     </Reference>
184
-    <Reference Include="TStudy.DigitalPen, Version=3.0.0.0, Culture=neutral, processorArchitecture=x86">
185
-      <SpecificVersion>False</SpecificVersion>
186
-      <HintPath>..\DLL\TStudy\TStudy.DigitalPen.dll</HintPath>
187
-    </Reference>
188
     <Reference Include="VisioForge.Controls, Version=12.0.56.0, Culture=neutral, PublicKeyToken=5873e863f1bcda5d, processorArchitecture=MSIL">
184
     <Reference Include="VisioForge.Controls, Version=12.0.56.0, Culture=neutral, PublicKeyToken=5873e863f1bcda5d, processorArchitecture=MSIL">
189
       <HintPath>..\packages\VisioForge.DotNet.Core.TRIAL.12.0.56\lib\net45\VisioForge.Controls.dll</HintPath>
185
       <HintPath>..\packages\VisioForge.DotNet.Core.TRIAL.12.0.56\lib\net45\VisioForge.Controls.dll</HintPath>
190
     </Reference>
186
     </Reference>

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

3
 
3
 
4
 #define MyAppName "星火微课"  
4
 #define MyAppName "星火微课"  
5
 #define MyAppDir "xhwk"
5
 #define MyAppDir "xhwk"
6
-#define MyAppVersion "3.2.6"
6
+#define MyAppVersion "3.2.7"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
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\xhwkclient\XHWK.WKTool\bin\x86\Debug\"

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

3
 
3
 
4
 #define MyAppName "星火微课测试版"  
4
 #define MyAppName "星火微课测试版"  
5
 #define MyAppDir "xhwk_test"
5
 #define MyAppDir "xhwk_test"
6
-#define MyAppVersion "3.2.6"
6
+#define MyAppVersion "3.2.7"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
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\xhwkclient\XHWK.WKTool\bin\x86\Debug\"

Loading…
Cancel
Save