コード例 #1
0
ファイル: frmMovableButtons.cs プロジェクト: Rati1324/C-Sharp
        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
ファイル: frmMovableButtons.cs プロジェクト: Rati1324/C-Sharp
        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);
 }