/*******************************************************************/ /*Le bouton valider*/ private void Ok_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); //son du bouton Ok.Visibility = Visibility.Hidden; //le btn valider indisponible.on ne valide qu'une seule fois. /*Si le nombre de question <nombre de question total:le btn aller a la question suivante est disponible*/ if (nbQuest < 8) { Next.Visibility = Visibility.Visible; } /******************************************************/ /*Reinitialiser les boutons radios*/ for (int nb = 1; nb <= 3; nb++) { RadioButton r = this.FindName("r" + nb) as RadioButton; r.IsEnabled = false; } /************************************/ /*Reccupération de la raponse de la question courante du fichier*/ rep = monFichier.SelectSingleNode(path + "/R"); /************************************************************/ /*Affichage de la correction*/ CorrectionQcm(int.Parse(rep.InnerText), repEleve); /*******************************/ nbQuest++;//nombre de questions deja faites est incrementé. }
private void ClickHelp(object sender, System.Windows.RoutedEventArgs e) //méthode pour l'affichage du help { Animations.AddSound(1); //le son HelpExo l = new HelpExo(2); //afficher le help l.Show(); }
private void Bonus_MouseDown(object sender, MouseButtonEventArgs e) { Animations.AddSound(1); InterfaceBonus win = new InterfaceBonus(); App.mainWindow.Opacity = 0.5f; win.Show(); }
/***********************************/ /*Aller a la correction de l'exo1*/ private void CorrectionExo1_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1);//Son du bouton. description = " تصحيح التمرين 1 : اجب بصحيح ام خطا."; path = "TestFinal/Exo1/CorrigeExerciceVraiOuFaux.xaml"; MettreAJourPageCorrection(path, description); ExoFrame.NavigationService.Navigate(new Uri(path, UriKind.Relative)); }
private void HelpButton_Click(object sender, RoutedEventArgs e) //on affiche le Help { Animations.AddSound(1); FenetreHelp fenetreHelp = new FenetreHelp(); fenetreHelp.Show(); }
public FenetreDeDialogueCours(string nomChapitre, int id_cours) { this.nomChapitre = nomChapitre; this.id_cours = id_cours; SetOpacityChapterWindow(0.5f); InitializeComponent(); Animations.AddSound(2); }
/************************************/ /*Aller a la correction de l'exo2*/ private void CorrectionExo2_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1);//Son du bouton. description = " تصحيح التمرين 2 : خريطة الموارد الطبيعية"; path = "TestFinal/Exo2/CorrigerExercice2.xaml"; MettreAJourPageCorrection(path, description); ExoFrame.NavigationService.Navigate(new Uri(path, UriKind.Relative)); }
/***********************************/ /*Aller a la correction de l'exo4*/ private void CorrectionExo4_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1);//Son du bouton. description = " تصحيح التمرين 4 : الربط بين الكلمات"; path = "TestFinal/Exo4/CorrigerRelier.xaml"; MettreAJourPageCorrection(path, description); ExoFrame.NavigationService.Navigate(new Uri(path, UriKind.Relative)); }
/**********************************/ /*Aller a la correction de l'exo5*/ private void CorrectionExo5_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1);//Son du bouton. description = " تصحيح التمرين 5 : اختر الصورة المناسبة"; path = "TestFinal/Exo5/EnigmesCorrection.xaml"; MettreAJourPageCorrection(path, description); ExoFrame.NavigationService.Navigate(new Uri(path, UriKind.Relative)); }
private void button_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); FenetreDeDialogueCours fenetreDeDialogueCours = new FenetreDeDialogueCours("Chapitre1", 1); fenetreDeDialogueCours.Show(); }
private void btnEquation_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); InterfaceExo1TestFinal game = new InterfaceExo1TestFinal(); App.mainWindow.Opacity = 1; game.Show(); this.Close(); }
private void btnCreerCompte_Click(object sender, RoutedEventArgs e) // Lorsque on clique sur le bouton pour creer un compte { Animations.AddSound(1); InterfaceCreateAccount interfaceCreateAccount = new InterfaceCreateAccount(); interfaceCreateAccount.Show(); }
/* Instructions relatif au click sur le button de navigation aller a la page d'acceuil */ private void Accueil_Click(object sender, RoutedEventArgs e) { //Rajout d'un son lors du click Animations.AddSound(1); //Mettre a jour la page courante en la sauvgardant dans la base de donnée SetCurrentPageToBase(currentPage); //Passer a la page d'acceuil this.NavigationService.Navigate(new InterfaceHomePage()); }
private void btnMemoryGame_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); MemoryGame w = new MemoryGame(); w.Show(); App.mainWindow.Opacity = 1; App.mainWindow.Hide(); this.Close(); }
private void btnMap_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); WilayaInforamation w = new WilayaInforamation(); App.mainWindow.Opacity = 1; App.mainWindow.Hide(); w.Show(); this.Close(); }
private void button_Click(object sender, RoutedEventArgs e) { /*InterfaceCours interfaceCours = new InterfaceCours("Chapitre3"); * interfaceCours.Show(); * this.Close();*/ Animations.AddSound(1); FenetreDeDialogueCours fenetreDeDialogueCours = new FenetreDeDialogueCours("Chapitre3", 3); fenetreDeDialogueCours.Show(); }
private void btnPainting_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); Coloriage game = new Coloriage(); App.mainWindow.Opacity = 1; App.mainWindow.Hide(); game.Show(); this.Close(); }
/***************************************************/ /*Bouton Aller a la prochaine question*/ private void Next_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); //Ajout de son Ok.Visibility = Visibility.Hidden; //bouton valider indisponible Next.Visibility = Visibility.Hidden; //bouton Aller a la prochaine question indisponible /*Si la fin du fichier est atieinte et le nombre de question deja faites < 8 alors on revient au debut du fichier*/ if (i == totalQuestion) { i = 1; } /***********************************/ /*Sinon on continu*/ else { i++; } /*****************/ /*Reccuperation de la question et de ces choix*/ path = "//Chapitre" + numChapitre + "/Probleme" + i; GetQuestionFromFile(path); /********************************************/ /*Affichage du score actuel ainsi que le nombre de la question actuel*/ ScoreTB.Inlines.Clear(); ScoreTB.Inlines.Add(new Run("السؤال : " + nbQuest + " /8")); /*******************************************/ for (int nb = 1; nb <= 3; nb++) { /*Reinitialisation des boutons radios*/ RadioButton r = this.FindName("r" + nb) as RadioButton; r.IsEnabled = true; r.IsChecked = false; /**************************************/ /*Reinitialisation des images commentaires*/ Image comment = this.FindName("comment" + nb) as Image; comment.Source = null; /********************************************/ } /*Changement de couleurs du background est des conteneurs des la question et de ces choix*/ QcmGrid.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(colorBrushesBackground[j])); QuestionRtb.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(colorBrushesRTB[k])); Choix1Rtb.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(colorBrushesRTB[k])); Choix2Rtb.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(colorBrushesRTB[k])); Choix3Rtb.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom(colorBrushesRTB[k])); image.Source = Animations.GetImage(@"Images/image" + k + ".png"); /*************************************************************************************/ k++; //parcours de la premiere liste de couleurs. j++; //parcours de la deuxieme liste de couleurs. if (k == colorBrushesRTB.Count) { k = 0; } //reinialiser si fin de liste if (j == colorBrushesBackground.Count) { j = 0; } //reinialiser si fin de liste }
private void Quitter_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); SetCurrentPageToFile(currentPage); if (homePage) { InterfaceHomePage interfacehomePage = new InterfaceHomePage(); //interfacehomePage.Show(); } this.Close(); }
/*Retourner a la page de correction des exercices.*/ private void GoToCorrectionMenu_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1);//Son du bouton. /*Reinitialisation de l'interface de la page*/ ExoFrame.Content = null; GoToCorrectionMenu.Visibility = Visibility.Hidden; corrigemMenuGrid.Visibility = Visibility.Visible; imageCorrectionMenuGrid.Visibility = Visibility.Visible; CommentTB.Visibility = Visibility.Hidden; /*******************************************/ }
private void StartFirstPage_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); /*InterfaceCours interfaceCours = new InterfaceCours(nomChapitre, false,id_cours); * interfaceCours.Show();*/ this.Close(); SetOpacityChapterWindow(1); App.interfaceCours = new InterfaceCours(nomChapitre, false, id_cours); App.mainWindow.mainFrame.NavigationService.Navigate(App.interfaceCours); }
/* Instructions relatif au click sur le button de navigation aller a la page suivante*/ private void Next_Click(object sender, RoutedEventArgs e) { //Rajout d'un son lors du click Animations.AddSound(1); if (currentPage < nombrePage) { //Incrémenter le numéro de la page courante currentPage++; //Passer a la page suivante GoToPage(currentPage); } }
/* Instructions relatif au click sur le button de navigation aller a la premiere page du cours*/ private void FirstPage_Click(object sender, RoutedEventArgs e) { //Rajout d'un son lors du click Animations.AddSound(1); //Recuperer le chemin de la première page du chapitre courant string path = nomChapitre + "/Cours/Page1.xaml"; //Passer a la premiere page GoToPage(currentPage); //Mettre a jour le numéro de la page courante currentPage = 1; }
/* Instructions relatif au click sur le button de navigation aller a la page précedente*/ private void Previous_Click(object sender, RoutedEventArgs e) { //Rajout d'un son lors du click Animations.AddSound(1); if (currentPage > 1) { //Décrementer le numéro de la page courante currentPage--; //Passer a la page precendente GoToPage(currentPage); } }
public InterfaceBonus() { InitializeComponent(); Animations.AddSound(2); if (exercice.RecupererScore(13) >= 20) { btnMemoryGame.IsEnabled = true; } else { btnMemoryGame.IsEnabled = false; } }
private void relier(object sender, RoutedEventArgs e) { Animations.AddSound(1); switch (numChapitre) { case 1: { idExercice = 4; break; } case 2: { idExercice = 8; break; } case 3: { idExercice = 12; break; } } StartExoWindow startExoWindow = new StartExoWindow(numChapitre, 4, idExercice); startExoWindow.Show(); }
/* Exercice Remplir Tableau */ private void RemplirTableau_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); switch (numChapitre) { case 1: { idExercice = 3; break; } case 2: { idExercice = 7; break; } case 3: { idExercice = 11; break; } } StartExoWindow startExoWindow = new StartExoWindow(numChapitre, 3, idExercice); startExoWindow.Show(); }
/* Exercice Remplir les champs */ private void RemplirLesChamps_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); switch (numChapitre) { case 1: { idExercice = 2; break; } case 2: { idExercice = 6; break; } case 3: { idExercice = 10; break; } } StartExoWindow startExoWindow = new StartExoWindow(numChapitre, 2, idExercice); startExoWindow.Show(); }
/* exercice Qcm */ private void Qcm_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); switch (numChapitre) { case 1: { idExercice = 1; break; } case 2: { idExercice = 5; break; } case 3: { idExercice = 9; break; } } StartExoWindow startExoWindow = new StartExoWindow(numChapitre, 1, idExercice); startExoWindow.Show(); }
private void btnCreateAccount_Click(object sender, RoutedEventArgs e) { Animations.AddSound(1); if (id_eleve.Text == "" || nom.Text == "" || prenom.Text == "" || password.Text == "") { InterfaceMessageBox interfaceMessageBox = new InterfaceMessageBox("عليك بملئ جميع الخانات"); interfaceMessageBox.Show(); } else { //Instancier un nouveau eleve et on le sauvegarde Eleve eleve = new Eleve(); eleve.CreerCompte(id_eleve.Text.Trim(), password.Text.Trim(), nom.Text.Trim(), prenom.Text.Trim()); this.Close(); } }