Ejemplo n.º 1
0
 // Cacher le chronomètre
 private void CacherChrono()
 {
     AfficherQuestion_Timer.Stop();
     Decompte_Timer.Stop();
     Chrono_Panel.Hide();
     Decompte_Label.Hide();
 }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
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");
        }
Ejemplo n.º 4
0
        // Fermeture du formulaire
        private void TestAttention_Form_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.test.difficulte)
            {
                AfficherQuestion_Timer.Stop();
                Decompte_Timer.Stop();
            }

            this.DialogResult = DialogResult.OK;
        }
Ejemplo n.º 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);
        }