Пример #1
0
 protected virtual void OnMoving(MovingEventArgs e)
 {
     if (Moving != null)
     {
         Moving(this, e);
     }
 }
Пример #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());
        }
Пример #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));
        }
Пример #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());
        }