private void btn_yes_Click(object sender, EventArgs e) { switch (_level) { case "Form1": Form1 lvl1 = new Form1(); lvl1.Show(); break; case "Level2": Level2 lvl2 = new Level2(); lvl2.Show(); break; case "Level3": Level3 lvl3 = new Level3(); lvl3.Show(); break; case "Level4": Level4 lvl4 = new Level4(); lvl4.Show(); break; case "Level5": Level5 lvl5 = new Level5(); lvl5.Show(); break; } this.Close(); }
private void timer1_Tick(object sender, EventArgs e) { if (pictureBox_3.Visible == false && pictureBox_2.Visible == false && PictureBox_1.Visible == false) { pictureBox_3.Visible = true; } else if (pictureBox_3.Visible == true) { pictureBox_3.Visible = false; pictureBox_2.Visible = true; } else if (pictureBox_2.Visible == true) { pictureBox_2.Visible = false; PictureBox_1.Visible = true; } else if (PictureBox_1.Visible == true) { PictureBox_1.Visible = false; switch (_level) { case "Form1": Level2 lvl2 = new Level2(); lvl2.Show(); break; case "Level2": Level3 lvl3 = new Level3(); lvl3.Show(); break; case "Level3": Level4 lvl4 = new Level4(); lvl4.Show(); break; case "Level4": Level5 lvl5 = new Level5(); lvl5.Show(); break; } timer1.Stop(); timer2.Start(); return; } }