public FrmAdminPanelQuizEdit()
 {
     id = -1;
     InitializeComponent();
     rep = new MyQuizRepository();
     cmb = new List <int>();
     List();
     comboBox1.DataSource = cmb;
 }
Exemple #2
0
 public FrmQuiz()
 {
     id = 0;
     InitializeComponent();
     rep     = new MyQuizRepository();
     quiz    = new MyQuiz();
     cikis   = new DialogResult();
     wait    = new SoundPlayer("wait.wav");
     correct = new SoundPlayer("correct.wav");
     wrong   = new SoundPlayer("wrong.wav");
     wait.Play();
     zaman          = 30;
     timer1.Enabled = true;
     refresh();
 }
 public FrmAdminPanelQuizEdit(MyQuiz entity)
 {
     InitializeComponent();
     rep = new MyQuizRepository();
     cmb = new List <int>();
     List();
     comboBox1.DataSource   = cmb;
     comboBox1.SelectedItem = entity.level;
     txtQuestion.Text       = entity.question;
     txtA.Text          = entity.A;
     txtB.Text          = entity.B;
     txtC.Text          = entity.C;
     txtD.Text          = entity.D;
     txtTrueAnswer.Text = entity.trueAnswer;
     id = entity.Id;
 }
 public void refreshQuiz()
 {
     rep = new MyQuizRepository();
     dtgvQuiz.DataSource = rep.List();
 }