private void CheckForCompletion() { var isAllBonusValuesFalse = _totalEnabledRegularFieldsDictionary.Values.All(x => x.Equals(false)); var isAllSpecialValuesFalse = _totalEnabledSpecialFieldsDictionary.Values.All(x => x.Equals(false)); if (isAllBonusValuesFalse == true && isAllSpecialValuesFalse == true) { MessageBox.Show($"You got a score of {SumTotal}!", "Congratulations!"); RollEnabled = false; Highscores.SaveScore(SumTotal); return; } }
public HighscoreWindow() { WindowStartupLocation = WindowStartupLocation.CenterScreen; InitializeComponent(); DataContext = this; var highscores = Highscores.GetHighscoreList(); Highscore1 = highscores[0]; Highscore2 = highscores[1]; Highscore3 = highscores[2]; Highscore4 = highscores[3]; Highscore5 = highscores[4]; Highscore6 = highscores[5]; Highscore7 = highscores[6]; Highscore8 = highscores[7]; Highscore9 = highscores[8]; Highscore10 = highscores[9]; }