Пример #1
0
 /// <summary>
 /// Left nouse button is pressed
 /// </summary>
 /// <param name="drawArea"></param>
 /// <param name="e"></param>
 public override void OnMouseDown(IToolDrawArea drawArea, MouseEventArgs e)
 {
     var property = new PencilProperty();
     property.InitProperty();
     property.AddPoint(new Point(e.X, e.Y));
     property.AddPoint(new Point(e.X + 1, e.Y + 1));
     draw = new DrawPencil(property);
     drawArea.AddNewDrawObject(draw);
     lastX = e.X;
     lastY = e.Y;
 }
Пример #2
0
 public override void OnMouseUp(IToolDrawArea drawArea, MouseEventArgs e)
 {
     draw = null;
     base.OnMouseUp(drawArea, e);
 }