Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public void Move(MovingButton _button)
 {
     _button(distance);
 }