Esempio n. 1
0
        public LoginPanelVM()
        {
            QuestionManager qm = new QuestionManager();

            Questions      = qm.GetAllQuestions();
            RegisterButton = new DelegateCommand(Register);
            LoginButton    = new DelegateCommand(Login);
        }
        public void GetAllQuestions()
        {
            // Act
            var questions = _manager.GetAllQuestions();

            // Assert
            Assert.IsNotNull(questions);
            Assert.AreEqual(5, questions.Count);
        }
Esempio n. 3
0
        private void F_Exam_Load(object sender, EventArgs e)
        {
            _questions         = _manager.GetAllQuestions(CategoryId);
            _numberOfQuestions = _questions.Count;

            while (_questions.Count > 0)
            {
                AddSelectedQuestion();
            }

            NextQuestion();
        }
Esempio n. 4
0
        private void PopulateListBoxQuestion()
        {
            questionManager = new QuestionManager();
            Questions       = questionManager.GetAllQuestions().ToArray();

            if (Questions.Length > 0)
            {
                listBoxQuestions.SelectedIndex = 0;
            }

            QuestionsView = CollectionViewSource.GetDefaultView(Questions);
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(QuestionsView)));

            SubscribeCheckBoxEvents();
        }
Esempio n. 5
0
 private void BindGrid()
 {
     DGV_Main.AutoGenerateColumns = false;
     DGV_Main.DataSource          = manager.GetAllQuestions(Guid.Empty);
 }