Beispiel #1
0
        public QuizModeViewModel(IWindowManager windowManager, ConnectionToDBModel db)
        {
            this._windowManager = windowManager;
            GUIstringsModel strings = new GUIstringsModel();

            this.DescriptionLabel           = strings.GetGUIstr("DescriptionLabel");
            this.AvailableTestsLabel        = strings.GetGUIstr("AvailableTestsLabel");
            this.NumberOfQuestionsLabel     = strings.GetGUIstr("NumberOfQuestionsLabel");
            this.StartQuizButton            = strings.GetGUIstr("StartQuizButton");
            this.QuestionNumberForQuizLabel = strings.GetGUIstr("QuestionNumberForQuizLabel");
            this.PercentToPassLabel         = strings.GetGUIstr("PercentToPassLabel");
            this.TimeLabel = strings.GetGUIstr("TimeLabel");

            Task.Run(() =>
            {
                this.Tests = db.GetTests();
                this.Refresh();
            });

            this.QuestionNumberForQuizFieldBackground = "White";
            this.PercentToPassFieldBackground         = "White";
            this.TimeFieldBackground = "White";
            this.StartQuizIsEnabled  = "False";

            this.QuestionNumberForQuizFieldIsEnabled = "False";
            this.PercentToPassFieldIsEnabled         = "False";
            this.TimeFieldIsEnabled = "False";
        }
Beispiel #2
0
        public LearnModeViewModel(IWindowManager windowManager, ConnectionToDBModel db)
        {
            this._windowManager = windowManager;
            GUIstringsModel strings = new GUIstringsModel();

            this.DescriptionLabel       = strings.GetGUIstr("DescriptionLabel");
            this.AvailableTestsLabel    = strings.GetGUIstr("AvailableTestsLabel");
            this.NumberOfQuestionsLabel = strings.GetGUIstr("NumberOfQuestionsLabel");
            this.StartLearningButton    = strings.GetGUIstr("StartLearningButton");

            Task.Run(() =>
            {
                this.Tests = db.GetTests();
                this.Refresh();
            });

            this.StartLearnButtonIsEnabled = "False";
        }