private void Form3_KeyPress(object sender, KeyPressEventArgs e) { if (gameOver) { project_with_menu.Form1 mainForm = new project_with_menu.Form1(); this.Hide(); mainForm.Show(); } else { timer1.Start(); timer2.Start(); } }
private void read() { intrebare.Text = f.ReadLine(); checkBox1.Text = f.ReadLine(); checkBox1.Checked = false; checkBox2.Text = f.ReadLine(); checkBox2.Checked = false; checkBox3.Text = f.ReadLine(); checkBox3.Checked = false; checkBox4.Text = f.ReadLine(); checkBox4.Checked = false; corentAnswar = Convert.ToInt32(f.ReadLine()); if (intrebare.Text.Length == 0) { project_with_menu.Form1 mainForm = new project_with_menu.Form1(); this.Hide(); mainForm.Show(); } }