Exemple #1
0
 private void QuestionAddForm_Load(object sender, EventArgs e)
 {
     cbSubjects.DataSource   = controller.GetSubjects();
     cbSubjects.SelectedItem = controller.GetSubjects().Where(x => x.ID == selectedSubject).First();
     if (q != null)
     {
         tbText.Text        = q.Text;
         rbVeryEz.Checked   = q.Complexity == 1;
         rbEz.Checked       = q.Complexity == 2;
         rbMiddle.Checked   = q.Complexity == 3;
         rbHard.Checked     = q.Complexity == 4;
         rbHardcore.Checked = q.Complexity == 5;
         if (q is TestQuestion)
         {
             foreach (var i in (q as TestQuestion).options)
             {
                 lbOptions.Items.Add(i);
             }
         }
         if (updateMode)
         {
             bAdd.Text = "Обновить";
         }
     }
 }
Exemple #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     lbSubjects.DataSource = controller.GetSubjects();
     //dgvQuestions.DataSource = controller.GetQuestions();
 }