示例#1
0
        private void рекордыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            loadScoreInfo();
            RecordsTable table = new RecordsTable();

            table.ShowDialog();
        }
示例#2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (gameMode == GameMode.FROM_EXISTING)
     {
         if (checkIfSolved())
         {
             timer1.Enabled = false;
             новыйToolStripMenuItem.Visible  = true;
             решитьToolStripMenuItem.Visible = false;
             gameMode = GameMode.NO_GAME;
             loadScoreInfo();
             if (times[level] > seconds && times[level] == Constants.INF)
             {
                 MessageBox.Show(String.Format(Constants.SIMPLE_CONGRATULATION, seconds), Constants.MAIN_WINDOW_TITLE, MessageBoxButtons.OK);
                 names[level] = currentGameState.Substring(2, currentGameState.Length - 2);
                 times[level] = seconds;
                 saveScoreInfo();
                 loadScoreInfo();
                 RecordsTable table = new RecordsTable();
                 table.ShowDialog();
             }
             else
             if (times[level] > seconds && times[level] != Constants.INF)
             {
                 MessageBox.Show(String.Format(Constants.BEST_TIME_CONGRATULATION, seconds), Constants.MAIN_WINDOW_TITLE, MessageBoxButtons.OK);
                 names[level] = currentGameState.Substring(2, currentGameState.Length - 2);
                 times[level] = seconds;
                 saveScoreInfo();
                 loadScoreInfo();
                 RecordsTable table = new RecordsTable();
                 table.ShowDialog();
             }
             else
             {
                 MessageBox.Show(String.Format(Constants.SIMPLE_CONGRATULATION, seconds), Constants.MAIN_WINDOW_TITLE, MessageBoxButtons.OK);
             }
             toolStripStatusLabel1.Text = Constants.INVITATION;
             toolStripStatusLabel2.Text = "";
             seconds = 0;
             return;
         }
         ++seconds;
         toolStripStatusLabel2.Text = String.Format(Constants.CURRENT_TIME, seconds);
     }
 }