public void ToolMouseUp(object Sender, MouseEventArgs Event) { if (EllipseShape != null) { if (Event.Button == MouseButtons.Left) { Command = new DrawEllipseCommand(ActiveCanvas, LineColor.Info, FillColor.Info, XPoint, YPoint, this.EllipseShape.Width, this.EllipseShape.Height); ActiveCanvas.RemoveDrawnShape(this.EllipseShape); ActiveCanvas.AddCommandtoStack(Command); Command.Execute(); } } }
public void ToolMouseUp(object Sender, MouseEventArgs Event) { if (Event.Button == MouseButtons.Left) { Debug.WriteLine("{0} {1} {2} {3}", XPoint, YPoint, Event.X - XPoint, Event.Y - YPoint); if (SelectionArea != null) { ActiveCanvas.DeselectAllShapes(); SelectedShapes = ActiveCanvas.SelectShapeAt(XPoint, YPoint, SelectionArea.Width, SelectionArea.Height); ActiveCanvas.RemoveDrawnShape(SelectionArea); } } else if (Event.Button == MouseButtons.Right) { ActiveCanvas.RemoveDrawnShape(MovementTrace); this.xAmount = Event.X - XPoint; this.yAmount = Event.Y - YPoint; Command = new MoveShapeCommand(SelectedShapes, XPoint, YPoint, xAmount, yAmount); Command.Execute(); ActiveCanvas.AddCommandtoStack(Command); } }
public void ToolMouseUp(object Sender, MouseEventArgs Event) { if (this.LineShape != null) { if (Event.Button == MouseButtons.Left) { ActiveCanvas.RemoveDrawnShape(this.LineShape); LineShape = null; Command = new DrawLineCommand(ActiveCanvas, LineColor.Info, XPoint, YPoint, Event.X, Event.Y); Command.Execute(); ActiveCanvas.AddCommandtoStack(Command); } } }
public void ToolMouseUp(object Sender, MouseEventArgs Event) { if (Event.Button == MouseButtons.Left) { int XPoint = Event.X; int YPoint = Event.Y; Shape SelectedShape = ActiveCanvas.GetShapeAt(XPoint, YPoint); if (SelectedShape != null) { Command = new ChangeFillColorCommand(ActiveCanvas, FillColor.Info, XPoint, YPoint); Command.Execute(); ActiveCanvas.AddCommandtoStack(Command); } } }