示例#1
0
 public ShapeModel()
 {
     _shapeList = new ShapeList();
     _currentState = new PointerState(this);
     _commandManager = new CommandManager();
 }
示例#2
0
 //更換State
 private void ChangeState()
 {
     if (_shapeType == DrawingType.Pointer)
     {
         _state = new PointerState(this);
     }
     else
     {
         _state = new DrawingState(this);
     }
     NotifyObserver();
 }