Esempio n. 1
0
        public async void Handle(guessResponseEvent message)
        {
            guessFeedbackBox.Visibility = Visibility.Visible;
            if (!message._isGoodGuess)
            {
                Storyboard sb = MarginGrid.FindResource("shakeAnimation") as Storyboard;
                sb.Begin();
            }
            else
            {
                sendMessage.IsEnabled = false;
                sendGuess.IsEnabled   = false;
            }
            await Task.Delay(1000);

            guessFeedbackBox.Visibility = Visibility.Hidden;
        }
Esempio n. 2
0
 public void Handle(guessResponseEvent message)
 {
     if (message._isGoodGuess)
     {
         guessFeedBackText   = "Good Guess !";
         guessFeedBackSource = "/Resources/good guess.png";
     }
     else
     {
         if (this.guessesLeft.isVisible)
         {
             this.guessesLeft.guess--;
         }
         this.NotifyOfPropertyChange(() => this.GuessesLeft);
         guessFeedBackText   = "Bad Guess !";
         guessFeedBackSource = "/Resources/bad guess.png";
     }
 }