private void Button_Shennon_Practice_Next_Click(object sender, RoutedEventArgs e) { if (ShennonFanoService.isCalculatedCorrectly(ShennonMessages)) { MessageBox.Show("Правильно!"); } else { MessageBox.Show("Не правильно!."); } GenerateShennonPractice(); }
private void Button_Shennon_Test_Next_Click(object sender, RoutedEventArgs e) { Result result = results[TestType.ShennonFano]; if (result.currentTestNumber <= 3) { if (ShennonFanoService.isCalculatedCorrectly(ShennonMessages)) { MessageBox.Show("Правильно!"); result.CorrectAnswer(); } else { MessageBox.Show("Не правильно."); result.WrongAnswer(); } GenerateShennonTest(); } }
private void Button_Shennon_Next_Click(object sender, RoutedEventArgs e) { Result result = results["Shennon-Fano"]; if (result.currentTestNumber <= 3) { //TODO collect info and check if correct if (ShennonFanoService.isCalculatedCorrectly(null, null)) { MessageBox.Show("Congrats!"); result.correctTests += 1; result.currentTestNumber += 1; } else { MessageBox.Show("Wrong answer."); result.currentTestNumber += 1; } GenerateShennon(); } }