示例#1
0
        public MainWindow()
        {
            InitializeComponent();
            chkBoxes = new CheckBox[] { chkA, chkB, chkC, chkD };
            QuestionManagement qm = new QuestionManagement();

            questionSet = qm.getQuestionSet();
            SetQuiz(0);
        }
示例#2
0
        public void QuestionManagement_QuestionSet_ReturnValues()
        {
            QuestionManagement qManager = new QuestionManagement();

            List <Question> qList       = qManager.getQuestionSet();
            List <Question> qBeforeList = new List <Question>();

            foreach (Question q in qList)
            {
                Assert.IsFalse(qBeforeList.Contains(q));
                Assert.AreNotEqual(q.question, "");
                Assert.AreNotEqual(q.question, null);
                qBeforeList.Add(q);
            }
        }
示例#3
0
        private void Reset()
        {
            lblFrage.Visibility    = Visibility.Visible;
            brdHeadline.Visibility = Visibility.Visible;
            foreach (CheckBox chk in chkBoxes)
            {
                chk.Visibility = Visibility.Visible;
            }
            lblScore.Visibility = Visibility.Hidden;
            lblScore.Content    = "";
            btnWeiter.Content   = "Prüfen";
            QuestionManagement qm = new QuestionManagement();

            questionSet   = qm.getQuestionSet();
            score         = 0;
            questionIndex = 1;
            SetQuiz(questionIndex);
        }