Example #1
0
        // Affichage de l’image et des boutons
        private void AfficherQuestion()
        {
            Progression_Label.Text = "Série : " + (this.compteurSerie + 1) + "    –    Question : " + (this.compteurQuestion + 1);

            Objet_PictureBox.ImageLocation = "..\\..\\..\\EMACApp\\AppImages\\Test_2\\" + this.test.imagesSeries[this.compteurSerie][this.compteurQuestion];
            Objet_PictureBox.Show();
            Zone_PictureBox.Show();
            Bouton3_Button.Show();

            if (compteurQuestion != 0)
            {
                Bouton2_Button.Show();
                Bouton1_Button.Show();
            }

            // Démarrage et affichage du chronomètre en mode difficile
            if (this.test.difficulte)
            {
                this.decompte       = this.test.intervalle;
                Decompte_Label.Text = this.decompte.ToString();
                Chrono_Panel.Show();
                Decompte_Label.Show();
                Decompte_Timer.Start();
                AfficherQuestion_Timer.Start();
            }
        }
Example #2
0
 // Cacher le chronomètre
 private void CacherChrono()
 {
     AfficherQuestion_Timer.Stop();
     Decompte_Timer.Stop();
     Chrono_Panel.Hide();
     Decompte_Label.Hide();
 }
Example #3
0
        // Affichage du formulaire pour répondre à la question
        public void AfficherImage_Timer_Tick(object sender, EventArgs e)
        {
            // Arrêt et masquage du chronomètre
            Decompte_Timer.Stop();
            AfficherImage_Timer.Stop();
            Chrono_Panel.Hide();
            Decompte_Label.Hide();

            // Récupération des lettres pour lesquelles on attend une réponse
            Lettre1_Label.Text = this.test.lettres[this.compteur][0] + " :";
            Lettre2_Label.Text = this.test.lettres[this.compteur][1] + " :";
            Lettre3_Label.Text = this.test.lettres[this.compteur][2] + " :";

            // Masquage de l’image
            Image_PictureBox.Hide();

            // Affichage des lettres et des champs de saisie
            Lettre1_Label.Show();
            Lettre1_TextBox.Show();
            Lettre2_Label.Show();
            Lettre2_TextBox.Show();
            Lettre3_Label.Show();
            Lettre3_TextBox.Show();

            if (this.test.reponses[this.compteur].Length == 4)
            {
                Lettre4_Label.Text = this.test.lettres[this.compteur][3] + " :";
                Lettre4_Label.Show();
                Lettre4_TextBox.Show();
            }

            Valider_Button.Show();
        }
Example #4
0
        // Affichage de la réponse dans le cas où on n’a pas répondu à temps
        public void AfficherQuestion_Timer_Tick(object sender, EventArgs e)
        {
            Decompte_Timer.Stop();
            Chrono_Panel.Hide();
            Decompte_Label.Hide();

            AfficherQuestion_Timer.Stop();
            this.AfficherReponse("0");
        }
Example #5
0
        // Appel de la fonction affichant la réponse
        private void Valider_Button_Click(object sender, EventArgs e)
        {
            // Masquage et arrêt du chronomètre
            if (this.test.difficulte)
            {
                Decompte_Timer.Stop();
                Chrono_Panel.Hide();
                Decompte_Label.Hide();

                AfficherQuestion_Timer.Stop();
            }

            this.AfficherReponse(Reponse_TextBox.Text);
        }
Example #6
0
        // Affichage de la question
        private void AfficherQuestion()
        {
            Progression_Label.Text = "Question " + (this.compteurQuestion + 1) + " sur " + this.test.questions.Count;
            Operation_Label.Text   = this.test.questions[this.compteurQuestion];
            Reponse_TextBox.Clear();

            // Démarrage et affichage du chronomètre en mode difficile
            if (this.test.difficulte)
            {
                this.decompte       = this.test.intervalle;
                Decompte_Label.Text = this.decompte.ToString();
                Chrono_Panel.Show();
                Decompte_Label.Show();
                Decompte_Timer.Start();
                AfficherQuestion_Timer.Start();
            }
        }
Example #7
0
        // Affichage de l’image pendant 2 ou 4 secondes avec décompte
        private void Suivant_Button_Click(object sender, EventArgs e)
        {
            // Masquage de l’écran de règle
            Regle_Label.Hide();
            Suivant_Button.Hide();

            // Affichage de la première image
            Image_PictureBox.ImageLocation = "..\\..\\..\\EMACApp\\AppImages\\Test_1\\" + this.test.imagesQuestion[this.compteur];
            Image_PictureBox.Show();

            // Affichage et démarrage du chronomètre
            this.decompte       = this.test.intervalle;
            Decompte_Label.Text = this.decompte.ToString();
            Chrono_Panel.Show();
            Decompte_Label.Show();
            Decompte_Timer.Start();
            AfficherImage_Timer.Start();
        }