Exemplo n.º 1
0
 private void btLv4_Click(object sender, EventArgs e)
 {
     Level4 f2 = new Level4();
     this.Hide();
     f2.ShowDialog();
     this.Close();
 }
Exemplo n.º 2
0
        private void bt_Replay_Click(object sender, EventArgs e)
        {
            this.Hide();
            string level_restart = string.Empty;

            if (Variabile.nivel_actual == 1)
            {
                Level1 lv = new Level1(); lv.ShowDialog();
            }
            else if (Variabile.nivel_actual == 2)
            {
                Level2 lv = new Level2(); lv.ShowDialog();
            }
            else if (Variabile.nivel_actual == 3)
            {
                Level3 lv = new Level3(); lv.ShowDialog();
            }
            else if (Variabile.nivel_actual == 4)
            {
                Level4 lv = new Level4(); lv.ShowDialog();
            }
            else
            {
                Level5 lv = new Level5(); lv.ShowDialog();
            }
            this.Close();
        }
Exemplo n.º 3
0
        private void btReset_Click(object sender, EventArgs e)
        {
            timer1.Stop();
            Level4 f2 = new Level4();

            this.Hide();
            f2.ShowDialog();
            this.Close();
        }
Exemplo n.º 4
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (timeLeft > 0)
            {
                timeLeft         = timeLeft - 1;
                lbTimpRamas.Text = timeLeft + "";
            }
            else
            {
                timer1.Stop();
                lbTimpRamas.Text = "0";

                MessageBox.Show("Time is up, try again!");

                Level4 f2 = new Level4();
                this.Hide();
                f2.ShowDialog();
                this.Close();
            }
        }