Esempio n. 1
0
 private void UpdateScore()
 {
     ScoreLeftTextBlock.Text  = leftScore.ToString();
     ScoreRightTextBlock.Text = rightScore.ToString();
     if (currentGamemode.CountScoreGap)
     {
         if (leftScore >= rightScore + currentGamemode.MaxScoreGap)
         {
             Right.Background = Brushes.Black;
         }
         else if (rightScore >= leftScore + currentGamemode.MaxScoreGap)
         {
             Left.Background = Brushes.Black;
         }
         else
         {
             Left.Background  = Brushes.Transparent;
             Right.Background = Brushes.Transparent;
         }
     }
     else
     {
         Left.Background  = Brushes.Transparent;
         Right.Background = Brushes.Transparent;
     }
     if (showWindow != null)
     {
         showWindow.UpdateScore();
     }
 }
Esempio n. 2
0
 private void SecondWindow()
 {
     if (showWindow != null)
     {
         showWindow.Close();
     }
     showWindow = new ShowWindow
     {
         Owner = this
     };
     showWindow.Show();
     showWindow.UpdateColor();
     showWindow.UpdateScore();
     showWindow.UpdateTimer();
 }