Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
        Model _model; // Model

        #endregion Fields

        #region Constructors

        //建構元
        public CommandManager(Model model)
        {
            this._model = model;
        }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        private bool _isPressing = false; //是否滑鼠左鍵被壓下

        #endregion Fields

        #region Constructors

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