private int _yOffset; //移動前後Y差值

        #endregion Fields

        #region Constructors

        //建構元
        public MoveShapeCommand(Model model, Shape shape,int xOffset,int yOffset)
        {
            this._model = model;
            this._targetShape = shape;
            this._xOffset = xOffset;
            this._yOffset = yOffset;
        }
        Point _oldPoint; //舊點

        #endregion Fields

        #region Constructors

        //建構元
        public ResizeShapeCommand(Model model, Shape shape, Shape.ChangePoint changePoint, Point newPoint,Point oldPoint)
        {
            _model = model;
            _targetShape = shape;
            _changePoint = changePoint;
            _newPoint = newPoint;
            _oldPoint = oldPoint;
        }
Beispiel #3
0
        Timer _timer = new Timer(); //計數器

        #endregion Fields

        #region Constructors

        //建構元
        public PointerState(Model modle)
        {
            this._model = modle;
            _timer.Interval = TWO_HUNDERDS_MINISECOND_PEER_MINISECOND;
            _timer.Tick += TimerEventProcessor;
        }
        Model _model; // Model

        #endregion Fields

        #region Constructors

        //建構元
        public CommandManager(Model model)
        {
            this._model = model;
        }
        private Model _model; // Model

        #endregion Fields

        #region Constructors

        //建構元
        public DeleteShapeCommand(Model model,Shape shape,int shapeIndex)
        {
            this._model = model;
            this._shapeIndex = shapeIndex;
            this._targetShape = shape;
        }
        private Model _model; //Model

        #endregion Fields

        #region Constructors

        //建構元
        public AddShapeCommand(Model model, Shape targetShape, int shapeIndex)
        {
            this._model = model;
            this._targetShape = targetShape;
            this._shapeIndex = shapeIndex;
        }
Beispiel #7
0
        private bool _isPressing = false; //是否滑鼠左鍵被壓下

        #endregion Fields

        #region Constructors

        //建構元
        public DrawingState(Model model)
        {
            this._model = model;
        }