예제 #1
0
 public ChangeColorCommand(Shape shape, Color newColor)
 {
     this.shape = shape;
     this.originalColor = shape.ShapeColor;
     this.newColor = newColor;
 }
예제 #2
0
 public MoveCommand(Shape shape, MoveType moveType, float param)
 {
     this.shape = shape;
     this.moveType = moveType;
     this.param = param;
 }
예제 #3
0
 private void addShape(Graphics imgGra, Shape shape)
 {
     this.tscbShapes.Items.Add(shape);
     this.editor.drawShape(imgGra, shape);
 }
예제 #4
0
 public void moveShape(Graphics imgGra, Shape shape, MoveType moveType, float param)
 {
     this.history.addCommand(imgGra, new MoveCommand(shape, moveType, param));
 }
예제 #5
0
 public void drawShape(Graphics imgGra, Shape shape)
 {
     this.history.addCommand(imgGra, new DrawCommand(shape));
 }
예제 #6
0
 public void changeColor(Graphics imgGra, Shape shape, Color newColor)
 {
     this.history.addCommand(imgGra, new ChangeColorCommand(shape, newColor));
 }