public TeacherForm(User user)
 {
     InitializeComponent();
     currentUser = user;
     group       = DBWork.getPupilGroup(currentUser.ClassId);
     this.Text  += " " + currentUser.ToString() + " " + group.ToString();
     results     = new Dictionary <User, List <Answer> >();
     totalTests  = 0;
     totalK      = 0;
     N           = 0;
     questions   = DBWork.getAllQuestions();
     statuses    = DBWork.getAllStatuses();
     countResults();
     fillTable();
     saveFileDialog        = new SaveFileDialog();
     saveFileDialog.Filter = "Text Files(*.txt)|*.txt";
 }
Esempio n. 2
0
        public QuestionForm(User user)
        {
            InitializeComponent();
            currentUser          = user;
            group                = DBWork.getPupilGroup(currentUser.ClassId);
            this.Text           += " " + currentUser.ToString() + " " + group.ToString();
            questions            = DBWork.getAllQuestions();
            answers              = new List <Answer>();
            currentQuestionIndex = 0;
            loadClassmates();

            TextQuestion.Text       = questions.ElementAt(currentQuestionIndex).ToString();
            comboBox1.SelectedIndex = 0;
            comboBox2.SelectedIndex = 0;
            comboBox3.SelectedIndex = 0;
            comboBox4.SelectedIndex = 0;
            comboBox5.SelectedIndex = 0;
        }