Explorar el Código

笔迹 导入清晰度 优化功能

tags/录制修改前
zhangxueyang hace 4 años
padre
commit
86097f383b

+ 182
- 106
Common/system/BlackboardNew.cs Ver fichero

@@ -68,7 +68,7 @@ namespace Common.system
68 68
         {
69 69
             init(canvas, _pencolor);
70 70
         }
71
-
71
+        DrawingAttributes drawingAttributes;
72 72
         private void init(InkCanvas canvas, Color _pencolor)
73 73
         {
74 74
             m_canvas = canvas;
@@ -79,7 +79,7 @@ namespace Common.system
79 79
             if (canvas != null)
80 80
             {
81 81
                 canvas.EditingMode = InkCanvasEditingMode.Ink;
82
-                DrawingAttributes drawingAttributes = new DrawingAttributes();
82
+                 drawingAttributes = new DrawingAttributes();
83 83
                 canvas.DefaultDrawingAttributes = drawingAttributes;
84 84
                 drawingAttributes.Width = pensize;
85 85
                 drawingAttributes.Height = pensize;
@@ -159,12 +159,12 @@ namespace Common.system
159 159
         }
160 160
 
161 161
         // public方法 笔
162
-        public void change_pen()
162
+        public void change_pen(Color _color) 
163 163
         {
164 164
             //this.type = ZPenType.Pen;
165 165
             DrawingAttributes drawingAttributes = new DrawingAttributes();
166 166
             m_canvas.DefaultDrawingAttributes = drawingAttributes;
167
-            drawingAttributes.Color = pencolor;
167
+            drawingAttributes.Color = _color;
168 168
             drawingAttributes.Width = pensize;
169 169
             drawingAttributes.Height = pensize;
170 170
             drawingAttributes.FitToCurve = true;
@@ -230,14 +230,22 @@ namespace Common.system
230 230
         // 清空
231 231
         public void clear()
232 232
         {
233
-            ZBBPage page = strokes_page_all[pagenum];
234
-            if (page != null)
235
-            {
236
-                m_canvas.Strokes.Clear();
237
-                page.lines_histoty.Clear();
238
-                page.lines.Clear();
239
-                page.lines.Add(new ZBBPageStep());
240
-            }
233
+     
234
+            ZBBPage page = new ZBBPage();
235
+            page.lines.Add(new ZBBPageStep());
236
+            page.lines = new List<ZBBPageStep>();
237
+            page.lines_histoty = new List<ZBBPageStep>();
238
+            strokes_page_all.Add(page);
239
+
240
+
241
+            //ZBBPage page = strokes_page_all[pagenum];
242
+            //    if (page != null)
243
+            //{
244
+            //    m_canvas.Strokes.Clear();
245
+            //    page.lines_histoty.Clear();
246
+            //    page.lines.Clear();
247
+            //    page.lines.Add(new ZBBPageStep());
248
+            //}
241 249
         }
242 250
 
243 251
         public void changepage(int mpagenum)
@@ -257,7 +265,7 @@ namespace Common.system
257 265
                 }
258 266
 
259 267
                 ZBBPage page = strokes_page_all[pagenum];
260
-                if (page != null)
268
+                if (page != null&& page.lines.Count>0)
261 269
                 {
262 270
                     if (page.lines.Last().lines_curr.Count > 0)
263 271
                     {
@@ -270,13 +278,10 @@ namespace Common.system
270 278
                     }
271 279
 
272 280
                     m_canvas.Strokes.Add(page.lines.Last().lines_curr);
273
-                    //StylusPoints stylusPoints = new StylusPoints();
274
-                    //stylusPoints.Add();
275
-                    //m_canvas.Strokes[0].StylusPoints.Add();
281
+
282
+
276 283
                     StrokeCollection strokes = new StrokeCollection();
277 284
                     StylusPointCollection stylusPoints = new StylusPointCollection();
278
-                    //stylusPoints.
279
-                    //Stroke stroke = new Stroke();
280 285
                     System.Windows.Input.StylusPointDescription stylusPointDescription = new StylusPointDescription();
281 286
                     StylusPoint stylusPoint = new StylusPoint();
282 287
                     stylusPoint.X = 580;
@@ -289,30 +294,36 @@ namespace Common.system
289 294
                     stylusPoints.Add(stylusPoint);
290 295
                     stroke = new Stroke(stylusPoints);
291 296
 
292
-                    stylusPoint.X = 586;
293
-                    stylusPoint.Y = 214;
294
-                    stylusPoints.Add(stylusPoint);
295
-                    stroke = new Stroke(stylusPoints);
296
-
297
-                    stylusPoint.X = 599;
298
-                    stylusPoint.Y = 214;
299
-                    stylusPoints.Add(stylusPoint);
300
-                    stroke = new Stroke(stylusPoints);
301
-                    stylusPoint.X = 623;
302
-                    stylusPoint.Y = 214;
303
-                    stylusPoints.Add(stylusPoint);
304
-                    stroke = new Stroke(stylusPoints);
305
-
306
-                    stylusPoint.X = 663;
307
-                    stylusPoint.Y = 214;
308
-                    stylusPoints.Add(stylusPoint);
309
-                    stroke = new Stroke(stylusPoints);
310
-                    stylusPoint.X = 963;
311
-                    stylusPoint.Y = 214;
312
-                    stylusPoints.Add(stylusPoint);
313
-                    stroke = new Stroke(stylusPoints);
314
-                    //page.lines.Last().lines_curr.Add();
315
-
297
+                    //stylusPoint.X = 586;
298
+                    //stylusPoint.Y = 214;
299
+                    //stylusPoints.Add(stylusPoint);
300
+                    //stroke = new Stroke(stylusPoints);
301
+
302
+                    //stylusPoint.X = 599;
303
+                    //stylusPoint.Y = 214;
304
+                    //stylusPoints.Add(stylusPoint);
305
+                    //stroke = new Stroke(stylusPoints);
306
+                    //stylusPoint.X = 623;
307
+                    //stylusPoint.Y = 214;
308
+                    //stylusPoints.Add(stylusPoint);
309
+                    //stroke = new Stroke(stylusPoints);
310
+
311
+                    //stylusPoint.X = 663;
312
+                    //stylusPoint.Y = 214;
313
+                    //stylusPoints.Add(stylusPoint);
314
+                    //stroke = new Stroke(stylusPoints);
315
+                    //stylusPoint.X = 963;
316
+                    //stylusPoint.Y = 214;
317
+                    //stylusPoints.Add(stylusPoint);
318
+                    //stroke = new Stroke(stylusPoints);
319
+                    //DrawingAttributes drawingAttributes = new DrawingAttributes();
320
+                    //m_canvas.DefaultDrawingAttributes = drawingAttributes;
321
+                    //drawingAttributes.Color = Colors.Red;
322
+                    //drawingAttributes.Width = pensize;
323
+                    //drawingAttributes.Height = pensize;
324
+                    //drawingAttributes.FitToCurve = true;
325
+                    //drawingAttributes.IgnorePressure = false;
326
+                    //stroke.DrawingAttributes = drawingAttributes;
316 327
                     m_canvas.Strokes.Add(stroke);
317 328
                 }
318 329
             }
@@ -320,72 +331,93 @@ namespace Common.system
320 331
         StylusPointCollection stylusPoints = new StylusPointCollection();
321 332
         StylusPoint stylusPoint = new StylusPoint();
322 333
         Stroke stroke;
323
-        public void changepages(double _x, double _y, bool _new)
324
-        {
325
-            if (_new)
326
-            {
327
-                if(stroke!=null&&stroke.StylusPoints.Count > 1)
328
-                {
329
-                    m_canvas.Strokes.Add(stroke);
330
-                }
331
-            
332
-                stylusPoints = new StylusPointCollection();
333
-                stylusPoint = new StylusPoint();
334
-                //stroke = new Stroke(stylusPoints);
335
-                stroke=null;
336
-            }
337
-            else
338
-            {
339
-                //stylusPoints = new StylusPointCollection();
340
-                //stylusPoint = new StylusPoint();
341
-                stylusPoint.X = _x;
342
-                stylusPoint.Y = _y;
343
-                stylusPoints.Add(stylusPoint);
344
-                stroke = new Stroke(stylusPoints);
345
-            }
346
-           
334
+        bool isFirst = true;
335
+        //public void changepages(double _x, double _y, bool _new, Color _color, int _size)
336
+        //{
337
+        //    if (_new)
338
+        //    {
339
+        //        if (stroke != null && stroke.StylusPoints.Count > 1)
340
+        //        {
341
+        //             drawingAttributes = new DrawingAttributes();
342
+        //            //m_canvas.DefaultDrawingAttributes = drawingAttributes;
343
+        //            drawingAttributes.Color = _color;
344
+        //            drawingAttributes.Width = _size;
345
+        //            drawingAttributes.Height = _size;
346
+        //            drawingAttributes.FitToCurve = true;
347
+        //            drawingAttributes.IgnorePressure = false;
348
+        //            stroke.DrawingAttributes = drawingAttributes;
349
+        //            m_canvas.Strokes.Add(stroke);
350
+        //            isFirst = true;
351
+        //        }
347 352
 
348
-            //page.lines.Last().lines_curr.Add();
349
-            //if (stroke.StylusPoints.Count > 20)
350
-            //{
351
-              
352
-            
353
+        //        stylusPoints = new StylusPointCollection();
354
+        //        stylusPoint = new StylusPoint();
355
+        //        //stroke = new Stroke(stylusPoints);
356
+        //        stroke = null;
357
+        //    }
358
+        //    else
359
+        //    {
360
+        //        if(isFirst)
361
+        //        {
362
+        //            stylusPoint.X = _x;
363
+        //            stylusPoint.Y = _y;
364
+        //            stylusPoints.Add(stylusPoint);
365
+        //            if (stylusPoints.Count>1)
366
+        //            {
367
+        //                stroke = new Stroke(stylusPoints);
368
+        //                m_canvas.Strokes.Add(stroke);
369
+        //                isFirst = false;
370
+        //            }
371
+        //        }
372
+        //        else
373
+        //        {
374
+        //            stylusPoint.X = _x;
375
+        //            stylusPoint.Y = _y;
376
+        //            stylusPoints.Add(stylusPoint);
377
+        //            stroke = new Stroke(stylusPoints);
378
+        //            m_canvas.Strokes[m_canvas.Strokes.Count - 1].StylusPoints.Add(stylusPoints);
379
+        //        }
380
+        //    }
381
+        //}
353 382
 
354 383
 
355 384
 
356
-        }
357
-        //声明一个 DrawingAttributes 类型的变量  
358
-        DrawingAttributes drawingAttributes;
359
-        public void changepaget(double _x, double _y, bool _new,InkCanvas canvas) 
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+        public void changepages(double _x, double _y, bool _new, Color _color, int _size)
360 399
         {
361 400
             if (_new)
362 401
             {
363 402
                 if (stroke != null && stroke.StylusPoints.Count > 1)
364 403
                 {
365
-                    //m_canvas.Strokes.Add(stroke);
366
-                    DrawingAttributes drawingAttributes = new DrawingAttributes();
367
-                    canvas.DefaultDrawingAttributes = drawingAttributes;
368
-                    drawingAttributes.Width = pensize;
369
-                    drawingAttributes.Height = pensize;
370
-                    drawingAttributes.Color = Colors.Red;
404
+                    drawingAttributes = new DrawingAttributes();
405
+                    //m_canvas.DefaultDrawingAttributes = drawingAttributes;
406
+                    drawingAttributes.Color = _color;
407
+                    drawingAttributes.Width = _size*5;
408
+                    drawingAttributes.Height = _size*5;
371 409
                     drawingAttributes.FitToCurve = true;
372 410
                     drawingAttributes.IgnorePressure = false;
373
-                
374
-                    canvas.Strokes.Add(stroke);
375
-                    canvas.DefaultDrawingAttributes = drawingAttributes;
376
-                    ZBBPage page = strokes_page_all[pagenum];
377
-                    if (page != null)
378
-                    {
379
-                        step.lines_curr.Add(m_canvas.Strokes);
380
-                        page.lines.Add(step);
381
-                        step = null;
382
-                    }
411
+
412
+                    stroke.DrawingAttributes = drawingAttributes;
413
+                    //m_canvas.DefaultDrawingAttributes= drawingAttributes;
414
+                    m_canvas.Strokes.Add(stroke);
383 415
                 }
384 416
 
385 417
                 stylusPoints = new StylusPointCollection();
386 418
                 stylusPoint = new StylusPoint();
387 419
                 //stroke = new Stroke(stylusPoints);
388
-                stroke = null;
420
+                //stroke = null;
389 421
             }
390 422
             else
391 423
             {
@@ -395,21 +427,65 @@ namespace Common.system
395 427
                 stylusPoint.Y = _y;
396 428
                 stylusPoints.Add(stylusPoint);
397 429
                 stroke = new Stroke(stylusPoints);
398
-                //m_canvas.
399
-
400
-                //page.lines.Last().lines_curr
401
-               
402 430
             }
403
-
404
-
405
-            //page.lines.Last().lines_curr.Add();
406
-            //if (stroke.StylusPoints.Count > 20)
407
-            //{
408
-
409
-
410
-
411
-
412
-
413 431
         }
432
+        ////声明一个 DrawingAttributes 类型的变量  
433
+        //DrawingAttributes drawingAttributes;
434
+        //public void changepaget(double _x, double _y, bool _new,InkCanvas canvas) 
435
+        //{
436
+        //    if (_new)
437
+        //    {
438
+        //        if (stroke != null && stroke.StylusPoints.Count > 1)
439
+        //        {
440
+        //            //m_canvas.Strokes.Add(stroke);
441
+        //            DrawingAttributes drawingAttributes = new DrawingAttributes();
442
+        //            canvas.DefaultDrawingAttributes = drawingAttributes;
443
+        //            drawingAttributes.Width = pensize;
444
+        //            drawingAttributes.Height = pensize;
445
+        //            drawingAttributes.Color = Colors.Red;
446
+        //            drawingAttributes.FitToCurve = true;
447
+        //            drawingAttributes.IgnorePressure = false;
448
+        //            canvas.DefaultDrawingAttributes = drawingAttributes;
449
+        //            canvas.Strokes.Add(stroke);
450
+
451
+        //            ZBBPage page = strokes_page_all[pagenum];
452
+        //            if (page != null)
453
+        //            {
454
+        //                step.lines_curr.Add(m_canvas.Strokes);
455
+        //                page.lines.Add(step);
456
+        //                step = null;
457
+        //            }
458
+        //        }
459
+
460
+        //        stylusPoints = new StylusPointCollection();
461
+        //        stylusPoint = new StylusPoint();
462
+        //        //stroke = new Stroke(stylusPoints);
463
+        //        stroke = null;
464
+        //    }
465
+        //    else
466
+        //    {
467
+        //       change_pen(Colors.Red);
468
+        //        //stylusPoints = new StylusPointCollection();
469
+        //        //stylusPoint = new StylusPoint();
470
+        //        stylusPoint.X = _x;
471
+        //        stylusPoint.Y = _y;
472
+        //        stylusPoints.Add(stylusPoint);
473
+        //        stroke = new Stroke(stylusPoints);
474
+        //        //m_canvas.
475
+
476
+        //        //page.lines.Last().lines_curr
477
+
478
+        //    }
479
+
480
+
481
+        //    //page.lines.Last().lines_curr.Add();
482
+        //    //if (stroke.StylusPoints.Count > 20)
483
+        //    //{
484
+
485
+
486
+
487
+
488
+
489
+        //}
414 490
     }
415 491
 }

+ 26
- 10
XHWK.Model/Model_DrawData.cs Ver fichero

@@ -4,6 +4,7 @@ using System.Drawing;
4 4
 using System.Linq;
5 5
 using System.Text;
6 6
 using System.Threading.Tasks;
7
+using System.Windows.Media;
7 8
 
8 9
 namespace XHWK.Model
9 10
 {
@@ -15,11 +16,14 @@ namespace XHWK.Model
15 16
         private int _PageNum;
16 17
         private string _pageCode;
17 18
         private string _pageImagePath;
18
-        private PointF _ImageLocation;
19
-        private SizeF _ImageSize;
20
-        private string _PenColor;
21
-        private int _PenWigth;
19
+        private TranslateTransform _ImageLocation;
20
+        private ScaleTransform _ImageSize;
21
+        private bool _IsImageLocation;
22
+        //private string _PenColor;
23
+        //private int _PenWigth;
22 24
         //private List<PointF> _Handwriting;
25
+        private string _pdfImagePath;
26
+        private bool _imgDocumentation;
23 27
         /// <summary>
24 28
         /// 页码
25 29
         /// </summary>
@@ -35,19 +39,31 @@ namespace XHWK.Model
35 39
         /// <summary>
36 40
         /// 图片坐标
37 41
         /// </summary>
38
-        public PointF ImageLocation { get => _ImageLocation; set => _ImageLocation = value; }
42
+        public TranslateTransform ImageLocation { get => _ImageLocation; set => _ImageLocation = value; }
39 43
         /// <summary>
40 44
         /// 图片大小
41 45
         /// </summary>
42
-        public SizeF ImageSize { get => _ImageSize; set => _ImageSize = value; }
46
+        public ScaleTransform ImageSize { get => _ImageSize; set => _ImageSize = value; }
43 47
         /// <summary>
44
-        /// 笔颜色 十六进制
48
+        /// PDF 图片路径
45 49
         /// </summary>
46
-        public string PenColor { get => _PenColor; set => _PenColor = value; }
50
+        public string PdfImagePath { get => _pdfImagePath; set => _pdfImagePath = value; }
47 51
         /// <summary>
48
-        /// 线宽
52
+        /// 坐标是否固定
49 53
         /// </summary>
50
-        public int PenWigth { get => _PenWigth; set => _PenWigth = value; }
54
+        public bool IsImageLocation { get => _IsImageLocation; set => _IsImageLocation = value; }
55
+        /// <summary>
56
+        /// true 文档图片  folse 截图图片
57
+        /// </summary>
58
+        public bool ImgDocumentation { get => _imgDocumentation; set => _imgDocumentation = value; }
59
+        ///// <summary>
60
+        ///// 笔颜色 十六进制
61
+        ///// </summary>
62
+        //public string PenColor { get => _PenColor; set => _PenColor = value; }
63
+        ///// <summary>
64
+        ///// 线宽
65
+        ///// </summary>
66
+        //public int PenWigth { get => _PenWigth; set => _PenWigth = value; }
51 67
         ///// <summary>
52 68
         ///// 笔迹 暂无
53 69
         ///// </summary>

+ 2
- 0
XHWK.WKTool/App.config Ver fichero

@@ -18,5 +18,7 @@
18 18
     <add key="userName" value="" />
19 19
     <!--记住密码-->
20 20
     <add key="isRemind" value="" />
21
+    <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
22
+    <add key="CameraPosition" value=""/>
21 23
   </appSettings>
22 24
 </configuration>

+ 5
- 0
XHWK.WKTool/App.cs Ver fichero

@@ -38,6 +38,9 @@ namespace XHWK.WKTool
38 38
         /// 微课视频列表
39 39
         /// </summary>
40 40
         public static List<Model_Video> VideoList = null;
41
+        /// <summary>
42
+        /// 画板模型
43
+        /// </summary>
41 44
         public static List<Model_DrawData> PageDrawList = null;
42 45
         /// <summary>
43 46
         /// 录屏工具
@@ -65,6 +68,7 @@ namespace XHWK.WKTool
65 68
         /// 页码IP
66 69
         /// </summary>
67 70
         public static string[] OutPut = new string[] { };
71
+        public static string CameraPosition = string.Empty;
68 72
         #region 点阵笔
69 73
         /// <summary>
70 74
         /// 点阵笔
@@ -108,6 +112,7 @@ namespace XHWK.WKTool
108 112
         /// 批注
109 113
         /// </summary>
110 114
         public static PracticeWindow W_PracticeWindow = null;
115
+        public static PrintWindow W_PrintWindow = null;
111 116
         #endregion
112 117
         #endregion
113 118
 

+ 1
- 1
XHWK.WKTool/CreateAMicroLessonWindow.xaml Ver fichero

@@ -19,7 +19,7 @@
19 19
                 <RowDefinition Height="*"/>
20 20
             </Grid.RowDefinitions>
21 21
             <!--第一行 标题-->
22
-            <Border Grid.Row="0" Background="#2D8CF0">
22
+            <Border Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
23 23
                 <Grid>
24 24
                     <TextBlock Text="创建微课" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
25 25
                     <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>

+ 2
- 1
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs Ver fichero

@@ -119,8 +119,9 @@ namespace XHWK.WKTool
119 119
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
120 120
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
121 121
             }
122
-            APP.W_XHMicroLessonSystemWindow.ShowDialog();
123 122
             this.Hide();
123
+            APP.W_XHMicroLessonSystemWindow.ShowDialog();
124
+          
124 125
         }
125 126
         /// <summary>
126 127
         /// 窗体移动

+ 2
- 2
XHWK.WKTool/PracticeWindow.xaml.cs Ver fichero

@@ -76,8 +76,8 @@ namespace XHWK.WKTool
76 76
             //blackboard_canvas.Cursor = Cursors.Pen;
77 77
 
78 78
 
79
-            //Cursor cus = new Cursor(@"G:\Icon.cur");
80
-            
79
+            //Cursor cus = new Cursor(@"G:\06.cur");
80
+
81 81
             //blackboard_canvas.Cursor = cus;
82 82
 
83 83
             viewModel = new ViewModel

+ 20
- 13
XHWK.WKTool/PrintWindow.xaml Ver fichero

@@ -11,26 +11,34 @@
11 11
     WindowStyle="None">
12 12
     <Grid>
13 13
         <Grid.RowDefinitions>
14
-            <RowDefinition Height="102"/>
14
+            <RowDefinition Height="120"/>
15 15
             <RowDefinition Height="*"/>
16 16
             <RowDefinition Height="80"/>
17 17
         </Grid.RowDefinitions>
18
-        <Grid Grid.Row="0" Background="#E6EAF0">
18
+        <Grid Grid.Row="0" Background="#E6EAF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
19 19
             <Grid.RowDefinitions>
20 20
                 <RowDefinition Height="auto"/>
21
-                <RowDefinition Height="auto"/>
22
-                <RowDefinition Height="auto"/>
21
+                <RowDefinition Height="*"/>
22
+                <RowDefinition Height="50"/>
23 23
             </Grid.RowDefinitions>
24 24
             <TextBlock Grid.Row="0" Text="打印预览" Background="#2E8CF0" Foreground="#FFFFFF" Width="50" HorizontalAlignment="Left" Margin="10,5,0,0"/>
25 25
             <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
26 26
                 <TextBlock  Text="打印机:" Width="210" FontSize="20"/>
27 27
                 <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0"/>
28
-                <TextBox Width="100"/>
28
+                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" Padding="50,10,0,0" Background="White" />
29
+                <Grid>
30
+                    <Grid.RowDefinitions>
31
+                        <RowDefinition Height="auto"/>
32
+                        <RowDefinition Height="auto"/>
33
+                    </Grid.RowDefinitions>
34
+                    <Button Grid.Row="0" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
35
+                    <Button Grid.Row="1" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
36
+                </Grid>
29 37
             </StackPanel>
30
-            <Button Grid.Row="1" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0">
38
+            <Button Grid.Row="1" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">
31 39
 
32 40
             </Button>
33
-            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
41
+            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0">
34 42
                 <ComboBox Cursor="Hand" Width="210"
35 43
                                 x:Name="cmbClass"
36 44
                                 Padding="10,0,10,0"
@@ -38,14 +46,13 @@
38 46
                                 BorderThickness="0"
39 47
                                 DisplayMemberPath="Value"
40 48
                                 FontSize="14"
41
-                                ItemsSource="{Binding bookList}"
42 49
                                 SelectedValuePath="Key"
43
-                                SelectionChanged="cmbClass_SelectionChanged" />
44
-                <TextBlock Text="点型:" FontSize="20"  Margin="120,0,0,0"/>
45
-                <RadioButton Content="方点" FontSize="16" IsChecked="True" Margin="0,5,0,0"/>
46
-                <RadioButton Content="圆点" FontSize="16" IsChecked="True" Margin="0,5,0,0"/>
50
+                                />
51
+                <TextBlock Text="点型:" FontSize="20"  Margin="120,10,0,0"/>
52
+                <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16"  Margin="0,15,0,0" IsChecked="True"/>
53
+                <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16"  Margin="0,15,0,0"/>
47 54
             </StackPanel>
48
-            <TextBlock Grid.Row="2" Text="关闭" HorizontalAlignment="Right" Margin="0,10,20,0"  Width="30" Height="30"/>
55
+            <TextBlock Grid.Row="2" Text="关闭" HorizontalAlignment="Right" Margin="0,2,20,0"  Width="30" Height="30"/>
49 56
         </Grid>
50 57
         <Grid Grid.Row="1">
51 58
             <Image x:Name="imgPri"/>

+ 93
- 16
XHWK.WKTool/PrintWindow.xaml.cs Ver fichero

@@ -9,6 +9,7 @@ using System.Windows;
9 9
 using System.Windows.Controls;
10 10
 using System.Windows.Data;
11 11
 using System.Windows.Documents;
12
+using System.Windows.Forms;
12 13
 using System.Windows.Input;
13 14
 using System.Windows.Media;
14 15
 using System.Windows.Media.Imaging;
@@ -25,6 +26,7 @@ namespace XHWK.WKTool
25 26
         /// 下拉框数据源
26 27
         /// </summary>
27 28
         public DataTable data = new DataTable();
29
+        private DataTable dtComponentsUniqueNo;
28 30
         public PrintWindow()
29 31
         {
30 32
             InitializeComponent();
@@ -43,23 +45,17 @@ namespace XHWK.WKTool
43 45
                     data.Rows[i]["Value"] = defaList[i];
44 46
                     data.Rows[i]["Key"] = i.ToString();
45 47
                 }
46
-                //dtComponentsUniqueNo = data.DefaultView.ToTable();
47
-                //cmbClass.ItemsSource = dtComponentsUniqueNo.DefaultView;
48
+                dtComponentsUniqueNo = data.DefaultView.ToTable();
49
+                cmbClass.ItemsSource = dtComponentsUniqueNo.DefaultView;
48 50
                 cmbClass.SelectedIndex = 0;
49 51
             }
50 52
         }
51 53
         public void Initialize(string _imgPath)
52 54
         {
53
-         
54
-        }
55
-        /// <summary>
56
-        /// 打印机下拉框改变事件
57
-        /// </summary>
58
-        /// <param name="sender"></param>
59
-        /// <param name="e"></param>
60
-        private void cmbClass_SelectionChanged(object sender, SelectionChangedEventArgs e)
61
-        {
62
-
55
+         if(!string.IsNullOrWhiteSpace(_imgPath))
56
+            {
57
+                imgPri.Source = new BitmapImage(new Uri(_imgPath));
58
+            }
63 59
         }
64 60
         /// <summary>
65 61
         /// 打印
@@ -68,21 +64,102 @@ namespace XHWK.WKTool
68 64
         /// <param name="e"></param>
69 65
         private void BtnPrint_Click(object sender, RoutedEventArgs e)
70 66
         {
67
+            if(string.IsNullOrWhiteSpace(cmbClass.Text))
68
+            {
69
+                //MessageBox.Show("打印机不能为空!");
70
+                System.Windows.Forms.MessageBox.Show("打印机不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
71
+                return;
72
+            }
71 73
             int pr = 1;
72 74
             string msg = string.Empty;
73 75
             string outPut = string.Empty;
74
-            LatticeFileHelper.GeneratingPDF(@"G:\101.pdf", @"G:\102.TPF", out pr, out msg, out outPut);
76
+            int pyte = 0; //0为方点 1为圆点
77
+            if(rbnSquarePoint.IsChecked==false)
78
+            {
79
+                pyte = 1;
80
+            }
81
+            LatticeFileHelper.GeneratingPDF(@"G:\101.pdf", @"G:\102.TPF", out pr, out msg, out outPut, pyte);
75 82
             if (pr == 0)
76 83
             {
77 84
                 outPut = outPut.Replace("[", "").Replace("]", "").Replace("\"", "").Trim();
78 85
                 APP.OutPut = outPut.Split(',');
79
-                string defa = string.Empty;
80
-                List<string> defaList = LatticeFileHelper.GetPrinterList(out defa);
86
+                string []page= outPut.Split(',');
87
+                for(int i=0;i<page.Length;i++) //增加页码编号
88
+                {
89
+                    APP.PageDrawList[i].PageCode = page[i];
90
+                }
91
+              
92
+                //string defa = string.Empty;
93
+                //List<string> defaList = LatticeFileHelper.GetPrinterList(out defa);
81 94
 
82 95
                 int printResult = 1;
83 96
                 string standardError = string.Empty;
84 97
                 string standardOutput = string.Empty;
85
-                LatticeFileHelper.PrinterTPFFile(@"G:\102.TPF", 1, /*defa*/"导出为WPS PDF", out printResult, out standardError, out standardOutput);
98
+                int frequency = Convert.ToInt32(txbNumberOfCopies.Text);
99
+                for (int i=0;i< frequency;i++)
100
+                {
101
+                    LatticeFileHelper.PrinterTPFFile(@"G:\102.TPF", 1, cmbClass.Text, out printResult, out standardError, out standardOutput);
102
+                }
103
+                if(printResult==0)// 0为成功
104
+                {
105
+                    //MessageBox.Show("打印成功!");
106
+                    System.Windows.Forms.MessageBox.Show("打印成功", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
107
+                }
108
+                else
109
+                {
110
+                    System.Windows.Forms.MessageBox.Show(standardError, "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
111
+                    //MessageBox.Show(standardError);
112
+                }
113
+            }
114
+            else
115
+            {
116
+                System.Windows.Forms.MessageBox.Show(msg, "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
117
+            }
118
+        }
119
+        /// <summary>
120
+        /// 窗口移动
121
+        /// </summary>
122
+        /// <param name="sender"></param>
123
+        /// <param name="e"></param>
124
+        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
125
+        {
126
+            DragMove();
127
+        }
128
+        /// <summary>
129
+        /// 关闭
130
+        /// </summary>
131
+        /// <param name="sender"></param>
132
+        /// <param name="e"></param>
133
+        private void BtnClose_Click(object sender, RoutedEventArgs e)
134
+        {
135
+            this.Hide();
136
+        }
137
+        /// <summary>
138
+        /// 减
139
+        /// </summary>
140
+        /// <param name="sender"></param>
141
+        /// <param name="e"></param>
142
+        private void BtnLess_Click(object sender, RoutedEventArgs e)
143
+        {
144
+            int num = Convert.ToInt32(txbNumberOfCopies.Text);
145
+            if(num>1)
146
+            {
147
+                num = num - 1;
148
+                txbNumberOfCopies.Text = num.ToString();
149
+            }
150
+        }
151
+        /// <summary>
152
+        /// 新增
153
+        /// </summary>
154
+        /// <param name="sender"></param>
155
+        /// <param name="e"></param>
156
+        private void BtnAdd_Click(object sender, RoutedEventArgs e)
157
+        {
158
+            int num = Convert.ToInt32(txbNumberOfCopies.Text);
159
+            if (num > 0)
160
+            {
161
+                num = num + 1;
162
+                txbNumberOfCopies.Text = num.ToString();
86 163
             }
87 164
         }
88 165
     }

+ 1
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml Ver fichero

@@ -73,7 +73,7 @@
73 73
             </Grid>
74 74
 
75 75
             <Image Grid.Row="1"  Source="./Images/Toobar0.png"/>
76
-            <TextBlock Grid.Row="1" Text="01:35" FontSize="23" Foreground="#FFFFFF" Margin="30,50,0,0"/>
76
+            <TextBlock Grid.Row="1" x:Name="txbTime" Text="00:00" FontSize="23" Foreground="#FFFFFF" Margin="30,50,0,0"/>
77 77
             <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
78 78
                 <Button x:Name="BtnRecordingScreen"  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnRecordingScreen_Click">
79 79
                     <Image x:Name="ImgRecordingScreen" Source="./Images/Toobar25.png"/>

+ 157
- 36
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Ver fichero

@@ -8,6 +8,7 @@ using System.Windows;
8 8
 using System.Windows.Ink;
9 9
 using System.Windows.Media;
10 10
 using System.Windows.Media.Imaging;
11
+using System.Windows.Threading;
11 12
 using XHWK.Model;
12 13
 
13 14
 namespace XHWK.WKTool
@@ -40,6 +41,24 @@ namespace XHWK.WKTool
40 41
         Model_Video VideoInfo = null;
41 42
         //声明一个 DrawingAttributes 类型的变量  
42 43
         DrawingAttributes drawingAttributes;
44
+        private DispatcherTimer t = null;
45
+        /// <summary>
46
+        /// 计时器状态
47
+        /// </summary>
48
+        private enum State
49
+        {
50
+            Start,
51
+            Pause,
52
+            End
53
+        }
54
+        /// <summary>
55
+        /// 状态
56
+        /// </summary>
57
+        private State _state = State.End;
58
+        /// <summary>
59
+        /// 计时用
60
+        /// </summary>
61
+        private TimeSpan _timeSpan = new TimeSpan(0, 0, 0, 0, 0);
43 62
         #endregion
44 63
 
45 64
         #region 初始化
@@ -66,10 +85,79 @@ namespace XHWK.WKTool
66 85
             gridToolbar.Visibility = Visibility.Hidden;
67 86
             gridColour.Visibility = Visibility.Hidden;
68 87
             gridThickness.Visibility = Visibility.Hidden;
88
+            if (t == null)
89
+            {
90
+                t = new DispatcherTimer();
91
+                t.Tick += OnTimer;
92
+                t.Interval = new TimeSpan(0, 0, 0, 1);
93
+                t.IsEnabled = true;
94
+                t.Start();
95
+            }
96
+            t.Interval = new TimeSpan(0, 0, 0, 1);
97
+            Stack();
98
+            ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
99
+            BtnRecordingScreen_Click(null, null);
69 100
         }
70 101
         #endregion
71 102
 
72 103
         #region 事件
104
+        /// <summary>
105
+        /// 时钟回调
106
+        /// </summary>
107
+        /// <param name="sender"></param>
108
+        /// <param name="e"></param>
109
+        private void OnTimer(object sender, EventArgs e)
110
+        {
111
+            switch (_state)
112
+            {
113
+                case State.Start:
114
+                    {
115
+                        _timeSpan += new TimeSpan(0, 0, 0, 1);
116
+                    }
117
+                    break;
118
+
119
+                case State.Pause:
120
+                    {
121
+                    }
122
+                    break;
123
+
124
+                case State.End:
125
+                    {
126
+                        _timeSpan = new TimeSpan();
127
+                        //_timeSpan = new TimeSpan(0, 23, 12, 45, 54);
128
+                    }
129
+                    break;
130
+            }
131
+
132
+            string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
133
+            //char[] times = time.ToCharArray();
134
+            txbTime.Text = time;
135
+        }
136
+        /// <summary>
137
+        /// 开始
138
+        /// </summary>
139
+        /// <param name="sender"></param>
140
+        /// <param name="e"></param>
141
+        private void Stack()
142
+        {
143
+            _state = State.Start;
144
+        }
145
+        /// <summary>
146
+        /// 暂停
147
+        /// </summary>
148
+        private void TimeOut()
149
+        {
150
+            _state = State.Pause;
151
+        }
152
+        /// <summary>
153
+        /// 结束
154
+        /// </summary>
155
+        /// <param name="sender"></param>
156
+        /// <param name="e"></param>
157
+        private void End()
158
+        {
159
+            _state = State.End;
160
+        }
73 161
         #region 录制
74 162
         /// <summary>
75 163
         /// 开始或暂停录制
@@ -80,6 +168,7 @@ namespace XHWK.WKTool
80 168
         {
81 169
             if (IsSuspend)
82 170
             {
171
+                Stack();
83 172
                 if (IsFirstRS)
84 173
                 {
85 174
                     VideoInfo = new Model_Video();
@@ -113,19 +202,19 @@ namespace XHWK.WKTool
113 202
                 }
114 203
                 IsSuspend = false;
115 204
 
116
-                #region 录像倒计时
117
-                if (APP.W_CountdownWindow == null)
118
-                {
119
-                    APP.W_CountdownWindow = new CountdownWindow();
120
-                    //APP.W_CountdownWindow.Topmost = true;
121
-                }
122
-                else
123
-                {
124
-                    APP.W_CountdownWindow.Initialize();
125
-                    //APP.W_CountdownWindow.Topmost = true;
126
-                }
127
-                APP.W_CountdownWindow.Show();
128
-                #endregion
205
+                //#region 录像倒计时
206
+                //if (APP.W_CountdownWindow == null)
207
+                //{
208
+                //    APP.W_CountdownWindow = new CountdownWindow();
209
+                //    //APP.W_CountdownWindow.Topmost = true;
210
+                //}
211
+                //else
212
+                //{
213
+                //    APP.W_CountdownWindow.Initialize();
214
+                //    //APP.W_CountdownWindow.Topmost = true;
215
+                //}
216
+                //APP.W_CountdownWindow.Show();
217
+                //#endregion
129 218
 
130 219
                 ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
131 220
                 try
@@ -139,8 +228,9 @@ namespace XHWK.WKTool
139 228
             }
140 229
             else
141 230
             {
231
+                TimeOut();
142 232
                 IsSuspend = true;
143
-                ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
233
+                ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
144 234
                 try
145 235
                 {
146 236
                     APP.FFmpeg.SuspendFFmpeg();
@@ -158,6 +248,17 @@ namespace XHWK.WKTool
158 248
         /// <param name="e"></param>
159 249
         private void BtnStopRecordingScreen_Click(object sender, RoutedEventArgs e)
160 250
         {
251
+            IsSuspend = true;
252
+            txbTime.Text = "00:00";
253
+            End();
254
+            ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
255
+            if (gridToolbar.Visibility==Visibility.Visible)
256
+            {
257
+                gridToolbar.Visibility = Visibility.Hidden;
258
+                gridColour.Visibility = Visibility.Hidden;
259
+                gridThickness.Visibility = Visibility.Hidden;
260
+                APP.W_PracticeWindow.Hide();
261
+            }
161 262
             if (APP.W_XHMicroLessonSystemWindow == null)
162 263
             {
163 264
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
@@ -242,27 +343,28 @@ namespace XHWK.WKTool
242 343
             else
243 344
             {
244 345
                 gridToolbar.Visibility = Visibility.Visible;
245
-            }
246
-            //imgCanvas.Source = new BitmapImage(new Uri(imagePath));
247
-            try
248
-            {
249
-                if (APP.W_PracticeWindow == null)
346
+                try
250 347
                 {
251
-                    APP.W_PracticeWindow = new PracticeWindow();
252
-                    //APP.W_PracticeWindow.Topmost = true;
253
-                    APP.W_PracticeWindow.Width = pwidth;
254
-                    APP.W_PracticeWindow.Height = pHeight;
255
-                    APP.W_PracticeWindow.Left = 0;
256
-                    APP.W_PracticeWindow.Top = 0;
257
-                    //practiceWin.Owner = this;
348
+                    if (APP.W_PracticeWindow == null)
349
+                    {
350
+                        APP.W_PracticeWindow = new PracticeWindow();
351
+                        //APP.W_PracticeWindow.Topmost = true;
352
+                        APP.W_PracticeWindow.Width = pwidth;
353
+                        APP.W_PracticeWindow.Height = pHeight;
354
+                        APP.W_PracticeWindow.Left = 0;
355
+                        APP.W_PracticeWindow.Top = 0;
356
+                        //practiceWin.Owner = this;
357
+                    }
358
+                    APP.W_PracticeWindow.Initialize(imagePath);
359
+                    APP.W_PracticeWindow.Show();
360
+                }
361
+                catch (Exception ex)
362
+                {
363
+                    LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
258 364
                 }
259
-                APP.W_PracticeWindow.Initialize(imagePath);
260
-                APP.W_PracticeWindow.Show();
261
-            }
262
-            catch (Exception ex)
263
-            {
264
-                LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
265 365
             }
366
+            //imgCanvas.Source = new BitmapImage(new Uri(imagePath));
367
+         
266 368
         }
267 369
         /// <summary>
268 370
         /// 屏幕宽
@@ -310,6 +412,8 @@ namespace XHWK.WKTool
310 412
         {
311 413
             //drawingAttributes.Color = Colors.White;
312 414
             APP.W_PracticeWindow.White();
415
+            gridColour.Visibility = Visibility.Collapsed;
416
+            gridThickness.Visibility = Visibility.Collapsed;
313 417
         }
314 418
         /// <summary>
315 419
         /// 红色
@@ -320,6 +424,8 @@ namespace XHWK.WKTool
320 424
         {
321 425
             //drawingAttributes.Color = Colors.Red;
322 426
             APP.W_PracticeWindow.Red();
427
+            gridColour.Visibility = Visibility.Collapsed;
428
+            gridThickness.Visibility = Visibility.Collapsed;
323 429
         }
324 430
         /// <summary>
325 431
         /// 黄色
@@ -330,6 +436,8 @@ namespace XHWK.WKTool
330 436
         {
331 437
             //drawingAttributes.Color = Colors.Gold;
332 438
             APP.W_PracticeWindow.Yellow();
439
+            gridColour.Visibility = Visibility.Collapsed;
440
+            gridThickness.Visibility = Visibility.Collapsed;
333 441
         }
334 442
         /// <summary>
335 443
         /// 青色
@@ -340,6 +448,8 @@ namespace XHWK.WKTool
340 448
         {
341 449
             //drawingAttributes.Color = Colors.LimeGreen;
342 450
             APP.W_PracticeWindow.CyanBlue();
451
+            gridColour.Visibility = Visibility.Collapsed;
452
+            gridThickness.Visibility = Visibility.Collapsed;
343 453
         }
344 454
         /// <summary>
345 455
         /// 灰色
@@ -350,6 +460,8 @@ namespace XHWK.WKTool
350 460
         {
351 461
             //drawingAttributes.Color = Colors.Gray;
352 462
             APP.W_PracticeWindow.Gray();
463
+            gridColour.Visibility = Visibility.Collapsed;
464
+            gridThickness.Visibility = Visibility.Collapsed;
353 465
         }
354 466
         /// <summary>
355 467
         /// 蓝色
@@ -360,6 +472,8 @@ namespace XHWK.WKTool
360 472
         {
361 473
             //drawingAttributes.Color = Colors.DeepSkyBlue;
362 474
             APP.W_PracticeWindow.Blue();
475
+            gridColour.Visibility = Visibility.Collapsed;
476
+            gridThickness.Visibility = Visibility.Collapsed;
363 477
         }
364 478
         /// <summary>
365 479
         /// 画笔 细
@@ -369,6 +483,8 @@ namespace XHWK.WKTool
369 483
         private void BtnFine_Click(object sender, RoutedEventArgs e)
370 484
         {
371 485
             APP.W_PracticeWindow.Fine();
486
+            gridColour.Visibility = Visibility.Collapsed;
487
+            gridThickness.Visibility = Visibility.Collapsed;
372 488
         }
373 489
         /// <summary>
374 490
         /// 画笔 中
@@ -378,6 +494,8 @@ namespace XHWK.WKTool
378 494
         private void BtnIn_Click(object sender, RoutedEventArgs e)
379 495
         {
380 496
             APP.W_PracticeWindow.In();
497
+            gridColour.Visibility = Visibility.Collapsed;
498
+            gridThickness.Visibility = Visibility.Collapsed;
381 499
         }
382 500
         /// <summary>
383 501
         /// 画笔粗
@@ -387,6 +505,8 @@ namespace XHWK.WKTool
387 505
         private void BtnCrude_Click(object sender, RoutedEventArgs e)
388 506
         {
389 507
             APP.W_PracticeWindow.Crude();
508
+            gridColour.Visibility = Visibility.Collapsed;
509
+            gridThickness.Visibility = Visibility.Collapsed;
390 510
         }
391 511
         /// <summary>
392 512
         /// 橡皮
@@ -397,9 +517,6 @@ namespace XHWK.WKTool
397 517
         {
398 518
             APP.W_PracticeWindow.Eraser();
399 519
         }
400
-        #endregion
401
-
402
-        #endregion
403 520
         /// <summary>
404 521
         /// 🖊
405 522
         /// </summary>
@@ -414,7 +531,7 @@ namespace XHWK.WKTool
414 531
         /// </summary>
415 532
         /// <param name="sender"></param>
416 533
         /// <param name="e"></param>
417
-        private void BtnRound_Click(object sender, RoutedEventArgs e) 
534
+        private void BtnRound_Click(object sender, RoutedEventArgs e)
418 535
         {
419 536
             APP.W_PracticeWindow.Round();
420 537
         }
@@ -427,5 +544,9 @@ namespace XHWK.WKTool
427 544
         {
428 545
             APP.W_PracticeWindow.Rectangle();
429 546
         }
547
+        #endregion
548
+        #endregion
549
+
550
+
430 551
     }
431 552
 }

+ 22
- 17
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Ver fichero

@@ -36,13 +36,13 @@
36 36
                             <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
37 37
                         </StackPanel>
38 38
                     </Button>
39
-                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click">
39
+                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click" Margin="8,0,8,0">
40 40
                         <Image Source="./Images/microLessonSystem_19.png"/>
41 41
                     </Button>
42
-                    <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
42
+                    <!--<Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
43 43
                         <Image Source="./Images/microLessonSystem_8.png"/>
44
-                    </Button>
45
-                    <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click">
44
+                    </Button>-->
45
+                    <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click" >
46 46
                         <Image Source="./Images/microLessonSystem_10.png"/>
47 47
                     </Button>
48 48
                 </StackPanel>
@@ -87,7 +87,7 @@
87 87
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
88 88
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click">
89 89
                         <StackPanel Orientation="Vertical">
90
-                            <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png"/>
90
+                            <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png" Visibility="Visible"/>
91 91
                             <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
92 92
                             <TextBlock Text="增加" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
93 93
                         </StackPanel>
@@ -101,21 +101,21 @@
101 101
                     </Button>
102 102
                     <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click">
103 103
                         <StackPanel Orientation="Vertical">
104
-                            <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_16.png"/>
105
-                            <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
104
+                            <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
105
+                            <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_16.png" Visibility="Visible"/>
106 106
                             <TextBlock Text="上传" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
107 107
                         </StackPanel>
108 108
                     </Button>
109 109
                     <Button Cursor="Hand" x:Name="btnMyMine" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0" Click="BtnMyMine_Click">
110 110
                         <StackPanel Orientation="Vertical">
111
-                            <Image x:Name="ImgMyMine" Source="./Images/microLessonSystem_1.png"/>
112
-                            <Image x:Name="ImgMyMineTwo" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
111
+                            <Image x:Name="ImgMyMine" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
112
+                            <Image x:Name="ImgMyMineTwo" Source="./Images/microLessonSystem_1.png" Visibility="Visible"/>
113 113
                             <TextBlock Text="我的" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
114 114
                         </StackPanel>
115 115
                     </Button>
116 116
                     <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnSetUp_Click">
117 117
                         <StackPanel Orientation="Vertical">
118
-                            <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png"/>
118
+                            <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png" Visibility="Visible"/>
119 119
                             <Image x:Name="ImgSetUpTwo" Source="./Images/microLessonSystem_17.png" Visibility="Collapsed"/>
120 120
                             <TextBlock Text="设置" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
121 121
                         </StackPanel>
@@ -141,19 +141,24 @@
141 141
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
142 142
                              MouseMove="IMG1_MouseMove"
143 143
                              MouseWheel="IMG1_MouseWheel" >
144
-                                    <Image Name="imgCanvas" Width="800" Height="600" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}"  RenderOptions.BitmapScalingMode="NearestNeighbor">
144
+                                    <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
145 145
                                     </Image>
146 146
                                 </ContentControl>
147 147
                             </ScrollViewer>
148 148
                         </Grid>
149 149
                     </Border>
150 150
                 </Grid>
151
-                <InkCanvas Grid.Row="0" x:Name="blackboard_canvas" Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
151
+                <Image x:Name="imgDocumentation"/>
152
+                <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
153
+                <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
152 154
                 <!--摄像头-->
153 155
                 <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
154 156
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
155 157
                 </wfi:WindowsFormsHost>-->
156
-                <Image x:Name="imgPlayer" Width="172" Height="124"  HorizontalAlignment="Right" Margin="0,7,10,0" VerticalAlignment="Top" Visibility="Collapsed"/>
158
+                <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
159
+                <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
160
+                <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
161
+                <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
157 162
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Right"
158 163
             Height="58" Margin="0,830,20,0" Grid.Column="1">
159 164
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
@@ -226,10 +231,10 @@
226 231
                 </StackPanel>
227 232
                 <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left">
228 233
                     <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0"/>
229
-                    <RadioButton Cursor="Hand" Content="左上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
230
-                    <RadioButton Cursor="Hand" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
231
-                    <RadioButton Cursor="Hand" Content="右上" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
232
-                    <RadioButton Cursor="Hand" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
234
+                    <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
235
+                    <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
236
+                    <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
237
+                    <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
233 238
                 </StackPanel>
234 239
                 <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left">
235 240
                     <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0"/>

+ 531
- 81
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 7
- 0
XHWK.WKTool/XHWK.WKTool.csproj Ver fichero

@@ -135,6 +135,9 @@
135 135
     <Compile Include="PracticeWindow.xaml.cs">
136 136
       <DependentUpon>PracticeWindow.xaml</DependentUpon>
137 137
     </Compile>
138
+    <Compile Include="PrintWindow.xaml.cs">
139
+      <DependentUpon>PrintWindow.xaml</DependentUpon>
140
+    </Compile>
138 141
     <Compile Include="ScreenRecordingToolbarWindow.xaml.cs">
139 142
       <DependentUpon>ScreenRecordingToolbarWindow.xaml</DependentUpon>
140 143
     </Compile>
@@ -165,6 +168,10 @@
165 168
       <SubType>Designer</SubType>
166 169
       <Generator>MSBuild:Compile</Generator>
167 170
     </Page>
171
+    <Page Include="PrintWindow.xaml">
172
+      <SubType>Designer</SubType>
173
+      <Generator>MSBuild:Compile</Generator>
174
+    </Page>
168 175
     <Page Include="Themes\Generic.xaml">
169 176
       <Generator>MSBuild:Compile</Generator>
170 177
       <SubType>Designer</SubType>

Loading…
Cancelar
Guardar