protected override bool ProcessDialogKey(Keys keyData) { // MessageBox.Show("222"); RunPro runPro = new RunPro(); Boolean movedFlg = false; if (keyData == Keys.Up) { movedFlg = runPro.move(Program.num44, 1); } else if (keyData == Keys.Down) { movedFlg = runPro.move(Program.num44, 3); } else if (keyData == Keys.Left) { movedFlg = runPro.move(Program.num44, 4); } else if (keyData == Keys.Right) { movedFlg = runPro.move(Program.num44, 2); } if (movedFlg) { // System.Windows.Forms.MessageBox.Show("aaa", "aaa"); runPro.lose1(Program.num44); runPro.newDataAppear(Program.num44); this.drawForm(Program.num44); } return(base.ProcessDialogKey(keyData)); }
public Form1() { InitializeComponent(); runPro = new RunPro(); runPro.newDataAppear(Program.num44); this.drawForm(Program.num44); }
private void reStart_Click(object sender, EventArgs e) { runPro.reSetNum(Program.num44); runPro.newDataAppear(Program.num44); this.drawForm(Program.num44); }