public void ToolMouseUp(object sender, MouseEventArgs e) { if (ellipse != null) { if (e.Button == MouseButtons.Left) { this.ellipse.ChangeState(EditState.GetInstance()); if (this.ellipse.Width > 0 && this.ellipse.Height > 0) { canvas.initUndoRedo(); } } } }
public void ToolMouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && canvas != null) { if (selectedObject != null) { if (canvas.SelectObjectOnCorner(xInitial, yInitial)) { selectedObject.ChangeState(EditState.GetInstance()); selectedObject.Resize(e.X, e.Y); } if (this.xAmount > 0 || this.yAmount > 0) { canvas.initUndoRedo(); } } } }
public void ToolMouseUp(object sender, MouseEventArgs e) { lineSegment.ChangeState(EditState.GetInstance()); if (this.lineSegment.Startpoint != this.lineSegment.Endpoint) { canvas.initUndoRedo(); } if (this.lineSegment != null) { lineSegment.Endpoint = new System.Drawing.Point(e.X, e.Y); lineSegment.Select(); } else if (e.Button == MouseButtons.Right) { canvas.RemoveDrawingObject(this.lineSegment); } }
public override void Select(ObjectShape obj) { obj.ChangeState(EditState.GetInstance()); }
public void ToolMouseUp(object sender, MouseEventArgs e) { actor.ChangeState(EditState.GetInstance()); canvas.initUndoRedo(); }