AppStore.Templates.WordInfoPage.Enter_Click C# (CSharp) Method

Enter_Click() private method

Executed when the Enter button is tapped/pressed. It checks the correct word with the spelling entered by the user.
private Enter_Click ( object sender, RoutedEventArgs e ) : void
sender object Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event.
e Windows.UI.Xaml.RoutedEventArgs RoutedEventArgs e is a parameter called e that contains the event data, see the RoutedEventArgs MSDN page for more information.
return void
        private void Enter_Click(object sender, RoutedEventArgs e)
        {
            Enter.IsEnabled = false;
            Back.IsEnabled = false;
            Answer.Visibility = Visibility.Visible;
            string yourWord = Word.Text;
            string originalWord = puzzle.getSpellingsList().ElementAt(puzzle.getActiveCount()).getWord();
            if (string.Equals(yourWord,originalWord, StringComparison.OrdinalIgnoreCase))
            {
                puzzle.setTotalCorrect(puzzle.getTotalCorrect() + 1);
                Response.Text = "You got the right word !";
            }
            else {
                puzzle.setTotalWrong(puzzle.getTotalWrong() + 1);
                Response.Text = "Sorry, the word you entered is wrong!";
            }
        }