|
@@ -397,38 +397,48 @@ namespace Common.system
|
397
|
397
|
|
398
|
398
|
|
399
|
399
|
|
400
|
|
- public void changepages(double _x, double _y, bool _new, Color _color, int _size)
|
|
400
|
+ public void changepages(double _x, double _y, bool _new, Color _color, int _size,int i)
|
401
|
401
|
{
|
402
|
|
- if (_new)
|
|
402
|
+ try
|
403
|
403
|
{
|
404
|
|
- if (stroke != null && stroke.StylusPoints.Count > 1)
|
|
404
|
+ if (_new)
|
405
|
405
|
{
|
406
|
|
- drawingAttributes = new DrawingAttributes();
|
407
|
|
- //m_canvas.DefaultDrawingAttributes = drawingAttributes;
|
408
|
|
- drawingAttributes.Color = _color;
|
409
|
|
- drawingAttributes.Width = _size * 5;
|
410
|
|
- drawingAttributes.Height = _size * 5;
|
411
|
|
- drawingAttributes.FitToCurve = true;
|
412
|
|
- drawingAttributes.IgnorePressure = false;
|
413
|
|
-
|
414
|
|
- stroke.DrawingAttributes = drawingAttributes;
|
415
|
|
- //m_canvas.DefaultDrawingAttributes= drawingAttributes;
|
416
|
|
- m_canvas.Strokes.Add(stroke);
|
417
|
|
- }
|
|
406
|
+ if (stroke != null && stroke.StylusPoints.Count > 1)
|
|
407
|
+ {
|
|
408
|
+ drawingAttributes = new DrawingAttributes();
|
|
409
|
+ //m_canvas.DefaultDrawingAttributes = drawingAttributes;
|
|
410
|
+ drawingAttributes.Color = _color;
|
|
411
|
+ drawingAttributes.Width = _size * 5;
|
|
412
|
+ drawingAttributes.Height = _size * 5;
|
|
413
|
+ drawingAttributes.FitToCurve = true;
|
|
414
|
+ drawingAttributes.IgnorePressure = false;
|
|
415
|
+
|
|
416
|
+ stroke.DrawingAttributes = drawingAttributes;
|
|
417
|
+ //m_canvas.DefaultDrawingAttributes= drawingAttributes;
|
|
418
|
+
|
|
419
|
+ m_canvas.Strokes.Add(stroke);
|
|
420
|
+ strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
|
|
421
|
+ stroke = null;
|
|
422
|
+ }
|
418
|
423
|
|
419
|
|
- stylusPoints = new StylusPointCollection();
|
420
|
|
- stylusPoint = new StylusPoint();
|
421
|
|
- //stroke = new Stroke(stylusPoints);
|
422
|
|
- //stroke = null;
|
|
424
|
+ stylusPoints = new StylusPointCollection();
|
|
425
|
+ stylusPoint = new StylusPoint();
|
|
426
|
+ //stroke = new Stroke(stylusPoints);
|
|
427
|
+ //stroke = null;
|
|
428
|
+ }
|
|
429
|
+ else
|
|
430
|
+ {
|
|
431
|
+ //stylusPoints = new StylusPointCollection();
|
|
432
|
+ //stylusPoint = new StylusPoint();
|
|
433
|
+ stylusPoint.X = _x;
|
|
434
|
+ stylusPoint.Y = _y;
|
|
435
|
+ stylusPoints.Add(stylusPoint);
|
|
436
|
+ stroke = new Stroke(stylusPoints);
|
|
437
|
+ }
|
423
|
438
|
}
|
424
|
|
- else
|
|
439
|
+ catch (Exception ex)
|
425
|
440
|
{
|
426
|
|
- //stylusPoints = new StylusPointCollection();
|
427
|
|
- //stylusPoint = new StylusPoint();
|
428
|
|
- stylusPoint.X = _x;
|
429
|
|
- stylusPoint.Y = _y;
|
430
|
|
- stylusPoints.Add(stylusPoint);
|
431
|
|
- stroke = new Stroke(stylusPoints);
|
|
441
|
+ LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(changepages)点阵比书写报错:" + ex.Message, ex);
|
432
|
442
|
}
|
433
|
443
|
}
|
434
|
444
|
|