Ejemplo n.º 1
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            frmPlayConundrum play = new frmPlayConundrum(playerName);

            play.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            time         = time - 1;
            lblTime.Text = time.ToString();

            if (time <= 10)
            {
                lblTime.ForeColor = System.Drawing.Color.Red;
            }

            if (time == 0)
            {
                timer1.Enabled = false;
                MessageBox.Show("You have run out of time", "Game Over");

                var playerChoice = MessageBox.Show("Congratulations " + playerName + " you scored " + score + "\nWould you like to play again?", "Game Over", MessageBoxButtons.YesNo);

                if (playerChoice == DialogResult.Yes)
                {
                    frmPlayConundrum pCon = new frmPlayConundrum(playerName);
                    pCon.Show();
                    this.Hide();
                }
                else
                {
                    frmGameChoice gameC = new frmGameChoice(playerName);
                    gameC.Show();
                    this.Hide();
                }
            }
        }
Ejemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            time = time - 1;
            lblTime.Text = time.ToString();

            if (time <= 10)
            {
                lblTime.ForeColor = System.Drawing.Color.Red;
            }

            if (time == 0)
            {
                timer1.Enabled = false;
                MessageBox.Show("You have run out of time", "Game Over");

                var playerChoice = MessageBox.Show("Congratulations " + playerName + " you scored " + score + "\nWould you like to play again?", "Game Over", MessageBoxButtons.YesNo);

                if (playerChoice == DialogResult.Yes)
                {
                    frmPlayConundrum pCon = new frmPlayConundrum(playerName);
                    pCon.Show();
                    this.Hide();
                }
                else
                {
                    frmGameChoice gameC = new frmGameChoice(playerName);
                    gameC.Show();
                    this.Hide();
                }
            }
        }
Ejemplo n.º 4
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     frmPlayConundrum play = new frmPlayConundrum(playerName);
     play.Show();
     this.Hide();
 }