Example #1
0
        /// <summary>
        /// Checks if the user's answer is correct. If it is, the display is updated accordingly and the next question is loaded. If not, the display is updated and the user can attempt another answer.
        /// </summary>
        private void CheckUserNoteGuess()
        {
            int userAnswerIndex = IntervalTrainer.GetNoteIndexFromNote(userNoteGuess.Text);

            if (questionArray[2] == userAnswerIndex)
            {
                userGuessResult.Text = "That's right! the " + IntervalTrainer.GetIntervalName(questionArray[1]).ToLower() + " of " + notes[questionArray[0]] + " is " + userNoteGuess.Text + "!";
                PoseNoteGuessQuestion();
            }
            else
            {
                userGuessResult.Text = "Not quite, try again!";
            }
        }