Exemple #1
0
        private void TopMenuGameBestTimes_Click(object sender, EventArgs e)
        {
            BestTimesForm bestTimesForm = new BestTimesForm(baseInfo.BestTimes, PointToScreen(new Point(0, 0)));

            bestTimesForm.ShowDialog();
            bestTimesForm.Dispose();
        }
Exemple #2
0
        private void GameBestTimes_Click(object sender, EventArgs e)
        {
            BestTimesForm dialog = new BestTimesForm();

            if (dialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
        }
Exemple #3
0
        private void CheckRecord()
        {
            string   level;
            BestTime best;

            switch (baseInfo.Level)
            {
            case BaseInfo.Levels.Beginner:
                level = "beginner";
                best  = baseInfo.BestTimes.Beginner;
                break;

            case BaseInfo.Levels.Intermediate:
                level = "intermediate";
                best  = baseInfo.BestTimes.Intermediate;
                break;

            case BaseInfo.Levels.Expert:
                level = "expert";
                best  = baseInfo.BestTimes.Expert;
                break;

            default:
                return;
            }

            if (timeSpent < best.Time)
            {
                RecordForm recordForm = new RecordForm(level, best.Player);
                recordForm.ShowDialog();
                best.Player = recordForm.player;
                best.Time   = timeSpent;
                recordForm.Dispose();

                BestTimesForm bestTimesForm = new BestTimesForm(baseInfo.BestTimes, PointToScreen(new Point(0, 0)));
                bestTimesForm.ShowDialog();
                bestTimesForm.Dispose();
            }
        }