protected virtual void OnMoving(MovingEventArgs e) { if (Moving != null) { Moving(this, e); } }
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()); }
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)); }
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()); }