示例#1
0
        private void winGame()
        {
            Properties.Settings.Default.GameWins += 1;
            Properties.Settings.Default.Save();
            EndDialog winDialog = new EndDialog();

            winDialog.Text = "Well done!";
            winDialog.setText("Congratulations, You won!");
            winDialog.ShowDialog();
            if (winDialog.DialogResult == DialogResult.Retry)
            {
                newGame(); //You have to clear the existing clickempties and sweeptiles first
            }
            else if (winDialog.DialogResult == DialogResult.OK)
            {
                inGame = false;
            }
        }
示例#2
0
        private void loseGame()
        {
            Properties.Settings.Default.GameLosses += 1;
            Properties.Settings.Default.Save();
            EndDialog loseDialog = new EndDialog();

            loseDialog.Text = "Bad luck!";
            loseDialog.setText("You lost! Better luck next time.");
            loseDialog.ShowDialog();
            if (loseDialog.DialogResult == DialogResult.Retry)
            {
                newGame();
            }
            else if (loseDialog.DialogResult == DialogResult.OK)
            {
                inGame = false;
            }
        }