예제 #1
0
        private void Retourbutton_Click(object sender, EventArgs e)
        {
            Accueil accueil = new Accueil();

            accueil.Show();
            this.Hide();
        }
예제 #2
0
 private void validerIdentifiantButton_Click(object sender, EventArgs e)
 {
     if (pseudoTextBox.Text == "professeur" && mdpTextBox.Text == "secret")
     {
         Accueil accueil1 = new Accueil(true);
         accueil1.Show();
         this.Hide();
     }
     else
     {
         msgErreurLabel.Visible = true;
     }
 }
예제 #3
0
 private void envoyerbutton_Click(object sender, EventArgs e)
 {
     if (questiontextBox.Text != "" && reponse1textBox.Text != "" && reponse2textBox.Text != "" && reponse3textBox.Text != "" && reponse4textBox.Text != "" && bonnereponsetextBox.Text != "" && explicationBonneReponsetextBox.Text != "")
     {
         DeserializeFromXml("test_question.xml");
         Serialisation(listeQuestionsCours, questiontextBox.Text, reponse1textBox.Text, reponse2textBox.Text, reponse3textBox.Text, reponse4textBox.Text, int.Parse(bonnereponsetextBox.Text), explicationBonneReponsetextBox.Text);
         MessageBox.Show("Votre question a bien été ajoutée");
         Accueil accueil = new Accueil(true);
         accueil.Show();
         this.Hide();
     }
     else
     {
         erreurlabel.Visible = true;
     }
 }
예제 #4
0
 private void buttonNext_Click(object sender, EventArgs e)
 {
     if (compteur < 17)
     {
         defaultBackColor();
         newQuestion();
         labelScore.Text = "SCORE :" + score + "/" + scoreMax;
     }
     else
     {
         MessageBox.Show("Votre score final est :" + score + "/" + scoreMax);
         Accueil accueil = new Accueil();
         accueil.Show();
         this.Hide();
     }
 }
예제 #5
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     if (quizz == false)
     {
         Accueil accueil = new Accueil();
         accueil.Show();
         this.Hide();
     }
     else
     {
         if (question1 == 2 && compteurQuestion2 == treeViewSolution.Nodes.Count)
         {
             Quizz quizz = new Quizz(3);
             quizz.Show();
             this.Hide();
         }
         else if (question1 != 2 && compteurQuestion2 != 0 && compteurQuestion2 == treeViewSolution.GetNodeCount(true))
         {
             Quizz quizz = new Quizz(1);
             quizz.Show();
             this.Hide();
         }
         else if (question1 == 2 && compteurQuestion2 != treeViewSolution.Nodes.Count)
         {
             Quizz quizz = new Quizz(2);
             quizz.Show();
             this.Hide();
         }
         else
         {
             Quizz quizz = new Quizz(0);
             quizz.Show();
             this.Hide();
         }
     }
 }