private void dtTicker(object sender, EventArgs e) { incrememt++; if (incrememt > 10) { incrememt = 10; dispatcher.Stop(); } else { ChangeDrill drill = new ChangeDrill(tboxUser.Text); txtQuestion.Text = $"Question {incrememt}:\nHello {drill.customerName}! If a customer buys goods worth {drill.expense} and gives you {drill.income}, how much change needs to be given?"; difference = drill.difference; score_changed = false; } }
private void BtnNext_Click(object sender, RoutedEventArgs e) { updateScores(); incrememt++; if (incrememt > 10) { incrememt = 10; return; } else { ChangeDrill drill = new ChangeDrill(tboxUser.Text); txtQuestion.Text = $"Question {incrememt}:\nHello {drill.customerName}! If a customer buys goods worth {drill.expense} and gives you {drill.income}, how much change needs to be given?"; difference = drill.difference; score_changed = false; doDrill(); } txtAnswer.Focus(); txtAnswer.SelectAll(); }
private void BtnStart_Click(object sender, RoutedEventArgs e) { incrememt = 1; score = 0; tblockDirections.Text = ""; lblScore.Content = "..."; lblCorrectAnswer.Content = ""; ChangeDrill drill = new ChangeDrill(tboxUser.Text); txtQuestion.Text = $"Question {incrememt}:\nHello {drill.customerName}! If a customer buys goods worth {drill.expense} and gives you {drill.income}, how much change needs to be given?"; difference = drill.difference; score_changed = false; doDrill(); txtAnswer.Focus(); txtAnswer.SelectAll(); btnStart.IsEnabled = false; btnEnd.IsEnabled = true; }