示例#1
0
        private void последнийРезультатToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LastScore lastScore = new LastScore();

            lastScore.Show();
            lastScore.LastScoreUpdate();
        }
示例#2
0
        public void GameEnd()
        {
            GameStatusLabel.Visible = true;
            GameStatusLabel.Text    = $"Game Finished\nHit: {Properties.Settings.Default.HitScore}\nMiss: {Properties.Settings.Default.MissScore}";
            закончитьИгруToolStripMenuItem.Enabled = false;
            TimerLabel.Visible = false;
            timer1.Enabled     = false;
            GameStatus         = false;
            BoxButton.Enabled  = false;
            Properties.Settings.Default.nicknameLast  = Properties.Settings.Default.nickname;
            Properties.Settings.Default.TimeUse       = 0;
            Properties.Settings.Default.HitScoreLast  = Properties.Settings.Default.HitScore;
            Properties.Settings.Default.HitScore      = 0;
            Properties.Settings.Default.MissScoreLast = Properties.Settings.Default.MissScore;
            Properties.Settings.Default.MissScore     = 0;

            LastScore lastScore = new LastScore();

            lastScore.LastScoreUpdate();

            Properties.Settings.Default.Accuracy     = Accuracy(Properties.Settings.Default.HitScore, Properties.Settings.Default.MissScore);
            Properties.Settings.Default.AccuracyLast = Properties.Settings.Default.Accuracy;
            if (Properties.Settings.Default.AccuracyLast > Properties.Settings.Default.AccuracyBest)
            {
                Properties.Settings.Default.AccuracyBest = Properties.Settings.Default.AccuracyLast;
            }
            Properties.Settings.Default.Save();
            ScoreUpdate();
            TimeUpdate();
            BoxButton.Location = new Point((ClientSize.Width / 2) - BoxButton.Width / 2, (ClientSize.Height / 2) - BoxButton.Height / 2);
        }