public ChangeColorCommand(Shape shape, Color newColor) { this.shape = shape; this.originalColor = shape.ShapeColor; this.newColor = newColor; }
public MoveCommand(Shape shape, MoveType moveType, float param) { this.shape = shape; this.moveType = moveType; this.param = param; }
private void addShape(Graphics imgGra, Shape shape) { this.tscbShapes.Items.Add(shape); this.editor.drawShape(imgGra, shape); }
public void moveShape(Graphics imgGra, Shape shape, MoveType moveType, float param) { this.history.addCommand(imgGra, new MoveCommand(shape, moveType, param)); }
public void drawShape(Graphics imgGra, Shape shape) { this.history.addCommand(imgGra, new DrawCommand(shape)); }
public void changeColor(Graphics imgGra, Shape shape, Color newColor) { this.history.addCommand(imgGra, new ChangeColorCommand(shape, newColor)); }