private void button6_Click(object sender, EventArgs e) { this.Hide(); var form = new Form(); form.Closed += (s, args) => this.Close(); Form10 f10 = new Form10(); f10.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { if (numericUpDown1.Value == 1) { Program.Global.test = 1; string temp = Program.Global.test.ToString(); } if (numericUpDown1.Value == 2) { Program.Global.test = 2; string temp = Program.Global.test.ToString(); } if (numericUpDown1.Value == 3) { Program.Global.test = 3; string temp = Program.Global.test.ToString(); } if (numericUpDown1.Value == 4) { Program.Global.test = 4; string temp = Program.Global.test.ToString(); } if (Program.Global.test == Program.Global.y) { if (Program.Global.Player == true) { Program.Global.score1++; } else { Program.Global.score2++; } timer1.Stop(); this.Hide(); var form = new Form(); form.Closed += (s, args) => this.Close(); Form10 f10 = new Form10(); f10.ShowDialog(); } else { if (Program.Global.Player == true) { Program.Global.Player = false; timer1.Stop(); this.Hide(); var form = new Form(); form.Closed += (s, args) => this.Close(); Form4 f4 = new Form4(); f4.ShowDialog(); // Shows Form4; } else { Program.Global.Player = true; timer1.Stop(); this.Hide(); var form = new Form(); form.Closed += (s, args) => this.Close(); Form4 f4 = new Form4(); f4.ShowDialog(); // Shows Form4; } } }