Przeglądaj źródła

优化工具栏

tags/录制修改前
zhangxueyang 4 lat temu
rodzic
commit
6bccf4ac21
1 zmienionych plików z 17 dodań i 22 usunięć
  1. 17
    22
      XHWK.WKTool/PracticeWindow.xaml.cs

+ 17
- 22
XHWK.WKTool/PracticeWindow.xaml.cs Wyświetl plik

@@ -30,6 +30,10 @@ namespace XHWK.WKTool
30 30
         /// 0 画笔 1 矩形 2 圆形 
31 31
         /// </summary>
32 32
         private int flg = 0;
33
+        /// <summary>
34
+        /// 
35
+        /// </summary>
36
+        Color Colour=Colors.Black;
33 37
         public PracticeWindow()
34 38
         {
35 39
             InitializeComponent();
@@ -46,18 +50,7 @@ namespace XHWK.WKTool
46 50
             }
47 51
 
48 52
 
49
-            drawingAttributes = new DrawingAttributes
50
-            {
51
-                Color = Colors.Red,
52
-                Width = 2,
53
-                Height = 2,
54
-                StylusTip = StylusTip.Rectangle,
55
-                //FitToCurve = true,
56
-                IsHighlighter = false,
57
-                IgnorePressure = true,
58
-
59
-            };
60
-            blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
53
+        
61 54
 
62 55
 
63 56
 
@@ -89,9 +82,6 @@ namespace XHWK.WKTool
89 82
 
90 83
             DataContext = viewModel;
91 84
         }
92
-
93
-
94
-
95 85
         /// <summary>
96 86
         /// 画笔颜色事件 白色
97 87
         /// </summary>
@@ -210,14 +200,24 @@ namespace XHWK.WKTool
210 200
         
211 201
             blackboard_canvas.Cursor = Cursors.Pen;
212 202
         }
213
-        private bool IsRound = false;
214
-        StrokeCollection StrokeCollectionRound; 
215 203
         /// <summary>
216 204
         /// 圆
217 205
         /// </summary>
218 206
         public void Round()
219 207
         {
220 208
             flg = 2;
209
+            drawingAttributes = new DrawingAttributes
210
+            {
211
+                Color = Colors.Red,
212
+                Width = 2,
213
+                Height = 2,
214
+                StylusTip = StylusTip.Rectangle,
215
+                //FitToCurve = true,
216
+                IsHighlighter = false,
217
+                IgnorePressure = true,
218
+
219
+            };
220
+            blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
221 221
             blackboard_canvas.EditingMode = InkCanvasEditingMode.None;
222 222
         }
223 223
         /// <summary>
@@ -305,11 +305,6 @@ namespace XHWK.WKTool
305 305
             }
306 306
             return pointList;
307 307
         }
308
-
309
-        private void blackboard_canvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
310
-        {
311
-
312
-        }
313 308
         /// <summary>
314 309
         /// 鼠标松开时
315 310
         /// </summary>

Ładowanie…
Anuluj
Zapisz