Пример #1
0
        private void menuItem7_Click(object sender, System.EventArgs e)
        {
            Highscores highscores = new Highscores();

            highscores.Show();
            highscores.updateHighscores();
        }
Пример #2
0
        private void gameCompleted()
        {
            disableTimers();
            Highscores highscores = new Highscores();

            for (int i = 0; i < 4; i++)
            {
                int n = wordFiles[i].LastIndexOf('\\');
                wordFiles[i] = wordFiles[i].Substring(n + 1);
            }
            string wordFilesUsed = wordFiles[0] + ", " +
                                   wordFiles[1] + ", " +
                                   wordFiles[2] + ", " +
                                   wordFiles[3];

            highscores.calculate(totalPopped, MainTimer.Interval, wordFilesUsed);
            highscores.Show();
            pictureBox1.Invalidate();
        }
Пример #3
0
        private void gameOver()
        {
            disableTimers();
            for (int i = 0; i < balloons.Length; i++)
            {
                if (balloons[i] != null)
                {
                    balloons[i] = null;
                }
            }
            pictureBox1.Invalidate();
            youLoose = false;
            totalPopped--;
            Highscores highscores = new Highscores();

            for (int i = 0; i < 4; i++)
            {
                int n = wordFiles[i].LastIndexOf('\\');
                wordFiles[i] = wordFiles[i].Substring(n + 1);
            }
            string wordFilesUsed;

            if (wordFiles[0] == "default**1")
            {
                wordFilesUsed = "default**1";
            }
            else
            {
                wordFilesUsed = wordFiles[0] + ", " +
                                wordFiles[1] + ", " +
                                wordFiles[2] + ", " +
                                wordFiles[3];
            }
            highscores.calculate(totalPopped, MainTimer.Interval, wordFilesUsed);
            highscores.Show();
        }