Esempio n. 1
0
 protected virtual void OnMoving(MovingEventArgs e)
 {
     if (Moving != null)
     {
         Moving(this, e);
     }
 }
Esempio n. 2
0
        public virtual void Move(double dx, double dy)
        {
            // Moving-Ereignis
            MovingEventArgs e = new MovingEventArgs();

            OnMoving(e);
            if (e.Cancel == true)
            {
                return;
            }
            XCoordinate += dx;
            YCoordinate += dy;
            // Moved-Ereignis
            OnMoved(new EventArgs());
        }
Esempio n. 3
0
        public virtual void MoveXY(int dx, int dy)
        {
            // Moving-Ereignis
            MovingEventArgs e = new MovingEventArgs();

            OnMoving(e);
            if (e.Cancel == true)
            {
                return;
            }

            XCoordinate += dx;
            YCoordinate += dy;

            // Moved-Ereignis
            OnMoved(new MovedEventArgs(XCoordinate, YCoordinate));
        }
Esempio n. 4
0
        public virtual void Move(double dx, double dy, int dWidth, int dLength)
        {
            MovingEventArgs e = new MovingEventArgs();

            // Moving-Ereignis
            OnMoving(e);
            if (e.Cancel == true)
            {
                return;
            }
            XCoordinate += dx;
            YCoordinate += dy;
            Width       += dWidth;
            Length      += dLength;
            // Moved-Ereignis
            OnMoved(new EventArgs());
        }