Example #1
0
 public void ShowHighscores()
 {
     using (var highscoresDialog = new HighscoresForm())
     {
         highscoresDialog.ShowDialog();
     }
 }
Example #2
0
 private void OnGameWon(object sender, GameWonEventArgs e)
 {
     using (var dialog = new GameWonForm())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             Settings.Default.Highscores.Add(new HighscoreEntry
             {
                 Nickname  = dialog.Nickname,
                 Time      = e.Time,
                 BoardSize = mainView.Rows + "x" + mainView.Columns
             });
             Settings.Default.Save();
         }
     }
     using (HighscoresForm highscoresDialog = new HighscoresForm())
     {
         highscoresDialog.ShowDialog();
     }
 }