// Affichage de la réponse selon si elle est juste ou non private void AfficherReponse(string reponseJoueur) { Objet_PictureBox.Hide(); Zone_PictureBox.Hide(); Bouton1_Button.Hide(); Bouton2_Button.Hide(); Bouton3_Button.Hide(); List <string> erreurJoueur = this.test.VerifierReponse(reponseJoueur, this.compteurSerie * 5 + this.compteurQuestion); // Cas où le joueur n’a pas commis d’erreur if (erreurJoueur.Count == 0) { TestResultat_Form resultat = new TestResultat_Form("OK ! Vous avez choisi le bon bouton !"); if (resultat.ShowDialog() == DialogResult.OK) { resultat.Close(); this.PasserQuestionSuivante(); } } // Cas où le joueur a fait une erreur else { TestResultat_Form resultat = new TestResultat_Form(this.test.AfficherErreur(erreurJoueur)); if (resultat.ShowDialog() == DialogResult.OK) { resultat.Close(); this.PasserQuestionSuivante(); } } }
// Affichage du message disant si la réponse est correcte ou non private void AfficherReponse(string reponseJoueur) { List <string> erreurJoueur = this.test.VerifierReponse(reponseJoueur, this.compteurQuestion); // Cas où le joueur n’a pas commis d’erreur if (erreurJoueur.Count == 0) { TestResultat_Form resultat = new TestResultat_Form("Bravo ! Votre calcul est correct !"); if (resultat.ShowDialog() == DialogResult.OK) { resultat.Close(); this.PasserQuestionSuivante(); } } // Cas où le joueur a fait une erreur else { TestResultat_Form resultat = new TestResultat_Form(this.test.AfficherErreur(erreurJoueur)); if (resultat.ShowDialog() == DialogResult.OK) { resultat.Close(); this.PasserQuestionSuivante(); } } }