private void quit_Click(object sender, EventArgs e) { mission m = (mission)this.Owner; m.Show(); this.Close(); }
public void direct(object sender, System.EventArgs e) { Button btn = (Button)sender; String[] missions = { "四宫格", "六宫格", "九宫格", "挑战赛" }; int[] gnum = { 4, 6, 9, 9 }; int k; for (k = 0; k < 4; k++) { if (btn.Text.CompareTo(missions[k]) == 0) { break; } } GameInfo.m = k; GameInfo.gnum = gnum[k]; if (gnum[k] == 4) { GameInfo.i = GameInfo.j = 2; } else if (gnum[k] == 6) { GameInfo.i = 2; GameInfo.j = 3; } else { GameInfo.i = GameInfo.j = 3; } if (GameInfo.m == 3) { IntroView t = new IntroView(); t.Show(); this.Hide(); } else { mission mis = new mission(); mis.Show(); this.Hide(); } }