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