예제 #1
0
 private void Button_Shennon_Practice_Next_Click(object sender, RoutedEventArgs e)
 {
     if (ShennonFanoService.isCalculatedCorrectly(ShennonMessages))
     {
         MessageBox.Show("Правильно!");
     }
     else
     {
         MessageBox.Show("Не правильно!.");
     }
     GenerateShennonPractice();
 }
예제 #2
0
        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();
            }
        }
예제 #3
0
        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();
            }
        }