private void Lose() { ImageBrush answerBrush = new ImageBrush(); answerBrush.ImageSource = new BitmapImage(new Uri(BaseUriHelper.GetBaseUri(this), "images2/叉叉.png")); wrongAnswer.Background = answerBrush; stopAnimation(); gameover = true; if (score >= Name1.highScoreGame2) { Name1.highScoreGame2 = score; if (System.Windows.MessageBox.Show("Congratulations! You get the highest score : " + score.ToString(), "GameOver", MessageBoxButton.OK, MessageBoxImage.Question) == MessageBoxResult.OK) { Name1 child = new Name1(); child.Owner = this; child.Show(); highScoreLbl.Content = Name1.highScoreGame2; } } else if (System.Windows.MessageBox.Show("Your score is : " + score.ToString() + "\n The highest score is : " + Name1.highScoreNameGame2 + " , " + Name1.highScoreGame2, "GameOver", MessageBoxButton.OK, MessageBoxImage.Question) == MessageBoxResult.OK) { ; } }
private void Lose() { stopAnimation(); gameover = true; if (scoreTimeCounter >= Name1.highScoreGame3) { Name1.highScoreGame3 = scoreTimeCounter; if (System.Windows.MessageBox.Show("Congratulations! You get the highest score : " + scoreTimeCounter.ToString(), "GameOver", MessageBoxButton.OK, MessageBoxImage.Question) == MessageBoxResult.OK) { Name1 child = new Name1(); child.Owner = this; child.Show(); highScoreLbl.Content = Name1.highScoreGame3; } } else if (System.Windows.MessageBox.Show("Your score is : " + scoreTimeCounter.ToString() + "\n The highest score is : " + Name1.highScoreNameGame3 + " , " + Name1.highScoreGame3, "GameOver", MessageBoxButton.OK, MessageBoxImage.Question) == MessageBoxResult.OK) { ; } }