public void Initialization()
        {
            controller = new QuizController();
            controller.InitializeAllKeys();

            //Set the right values for this tests
            controller.RepeatAfterXExercise = 3;
            controller.TooSlowThreshold = 1;
        }
Exemple #2
0
        void InitializeQuizController()
        {
            ISharedPreferences preferences = GetSharedPreferences(MainActivity.PREFERENCE_FILE_NAME,FileCreationMode.Private);

            quizController = new QuizController();

            string selectedKey = preferences.GetString("selected_key", SettingsActivity.SPECIAL_KEY_ALL_KEYS);

            if (selectedKey == SettingsActivity.SPECIAL_KEY_ALL_KEYS)
            {
                quizController.InitializeAllKeys();
            }
            else
            {
                quizController.InitializeKey(selectedKey);
            }

            quizController.RepeatAfterXExercise = preferences.GetInt("repeat_exercises",3);
            quizController.TooSlowThreshold = preferences.GetInt("answer_too_slow",2);

            this.displayNoteButtons = preferences.GetBoolean("display_note_buttons",true);
        }