Пример #1
0
        private void topLeft_Click(object sender, EventArgs e)
        {
            MovableButton B = new MovableButton(btn);

            B.Distance = (int)nudMovement.Value;

            MovingButton M = B.MoveHome;

            B.MoveHome(0);
        }
Пример #2
0
        private void currentPos_Click(object sender, EventArgs e)
        {
            MovableButton B = new MovableButton(btn);

            B.Distance = (int)nudMovement.Value;

            MovingButton M = B.MoveDown;

            M += B.MoveRight;
            B.Move(M);
        }
Пример #3
0
        private void btnRight_Click(object sender, EventArgs e)
        {
            // move the button down
            MovableButton b = new MovableButton(btn);

            b.Distance = (int)nudRight.Value;

            MovingButton iWantToMoveItMoveIt = null;

            iWantToMoveItMoveIt += b.MoveDown;
            iWantToMoveItMoveIt += b.MoveRight;

            b.Move(iWantToMoveItMoveIt);
        }
Пример #4
0
 public void Move(MovingButton _button)
 {
     _button(distance);
 }