예제 #1
0
        private void GenerateShennon()
        {
            Result result = results["Shennon-Fano"];

            if (result.currentTestNumber <= 3)
            {
                Dictionary <int, double> messages = ShennonFanoService.generateMessages();
                foreach (var message in messages)
                {
                    //TODO display messages
                }
            }
            else
            {
                MessageBox.Show("You've already completed this test!");
            }
        }
예제 #2
0
        private void GenerateShennonTest()
        {
            Result result = results[TestType.ShennonFano];

            if (result.currentTestNumber <= 3)
            {
                ShennonMessages          = ShennonFanoService.generateMessages();
                Resources["ShennonTask"] = ShennonMessages;
            }
            else
            {
                if (MessageBox.Show("Вы закончили этот тест! Ваш балл: " + result.mark + ". Хотите попробовать ещё?", "Тест окончен", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                {
                    result.Reset();
                    GenerateShennonTest();
                }
            }
        }
예제 #3
0
 private void GenerateShennonPractice()
 {
     ShennonMessages = ShennonFanoService.generateMessages();
     Resources[TestType.ShennonFano] = ShennonMessages;
 }