Ejemplo n.º 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!";
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieves a new set of notes for the question, and displays the question
 /// </summary>
 private void PoseNoteGuessQuestion()
 {
     questionArray       = IntervalTrainer.GetQuestionNotes();
     questionPrompt.Text = "What is the " + IntervalTrainer.GetIntervalName(questionArray[1]).ToLower() + " of " + notes[questionArray[0]] + "?";
 }
Ejemplo n.º 3
0
 private void PoseIntervalGuessQuestion()
 {
     questionArray       = IntervalTrainer.GetQuestionNotes();
     questionPrompt.Text = "What is the interval between " + notes[questionArray[0]] + " and " + notes[questionArray[2]] + "?";
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes the window, runs the first question.
 /// </summary>
 public MainWindow()
 {
     IntervalTrainer.GetRomanNumeralQuestionData();
     InitializeComponent();
     PoseNoteGuessQuestion();
 }