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 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();
            }
        }
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);
        }
Ejemplo n.º 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();
            }
        }