private void Form1_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); label1.Text = "meilleur Score : " + dr[0]["Clock"]; label1.Visible = true; Random r1 = new Random(); clock = new PictureBox(); { a = r1.Next(0, 20); clock.Name = "piz3"; clock.Size = new Size(300, 300); clock.BringToFront(); clock.Location = new Point(28, 30); clock.Visible = true; clock.Image = imageList1.Images[a]; clock.BackColor = Color.Transparent; clock.SizeMode = PictureBoxSizeMode.StretchImage; }; panel1.Controls.Add(clock); clock.Image.Tag = a; }
private void Exercice1ReconaissanceDeSons_Load(object sender, EventArgs e)//load { c = 0; z = 0; k = 0; label4.Hide(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); w = int.Parse(dr[0]["Prononciation"].ToString()); if (w != 0) { label7.Visible = true; label6.Visible = true; label6.Text = w + " / 10"; } else { label7.Visible = false; label6.Visible = false; } pictureBox1.Visible = true; pictureBox2.Visible = true; pictureBox3.Visible = true; pictureBox4.Visible = true; pictureBox5.Visible = true; pictureBox6.Visible = true; button2.Visible = true; ou.Visible = button1.Visible = false; label8.Visible = false; label11.Visible = false; button3.Visible = false; s = RandomPhotoExercice1ConnaissanceDeSons(); s1 = RandomPhotoLettresConnaissance(c); pictureBox1.ImageLocation = s[k + 1]; p1.URL = s[k]; pictureBox2.ImageLocation = s1[0]; pictureBox3.ImageLocation = s1[1]; pictureBox4.ImageLocation = s1[2]; pictureBox5.ImageLocation = s1[3]; pictureBox6.ImageLocation = s1[4]; }
public Périmetre() { InitializeComponent(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); imageName = new List <string> { Application.StartupPath + "\\Pics\\permCarre01.png", Application.StartupPath + "\\Pics\\permREC02.png", Application.StartupPath + "\\Pics\\permLOS0.png", Application.StartupPath + "\\Pics\\tri.png", Application.StartupPath + "\\Pics\\permCERCLE0.png" }; label3.Visible = true; label4.Visible = true; label5.Visible = true; label2.Visible = true; this.pi.Visible = false; }
private void pictureBox3_Click(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); dr[0]["orthographe"] = score; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); this.Close(); hom.Show(); }
private void SuitesNbGame_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Suitenb"].ToString()) != 0) { label3.Text = "meilleur temps : " + dr[0]["Suitenb"] + " s"; } }
private void Form1_Load(object sender, EventArgs e) { CryptageEtHachage.CombineUsersElements(CryptageEtHachage.HashPasswordsAndScores(Variables.UserNom), CryptageEtHachage.HashPasswordsAndScores(Variables.UserPass), Application.StartupPath + "\\users.xml"); // Audio manzu3 hek wahdu prof.Load(Application.StartupPath + "\\Prof.xml"); if (Variables.ExisteMessage(Variables.UserNom)) { pictureBox2.Image = Properties.Resources.newMsg; } for (lecons lcs = lecons.Conjugaison1; lcs < lecons.Clock; lcs++) { prof.Load(Application.StartupPath + "\\Prof.xml"); if ((int)lcs < 5) { if (Variables.exSup[i] != prof.SelectSingleNode("Prof/Francais/" + lcs + " / Questions").InnerText.Split(',').Length.ToString()) { Suppex.Image = Properties.Resources.newASsignment; break; } ; i++; } else if ((int)lcs < 16) { if (Variables.exSup[i] != prof.SelectSingleNode("Prof/Maths/" + lcs + "/Questions").InnerText.Split(',').Length.ToString()) { Suppex.Image = Properties.Resources.newASsignment; break; } ; i++; } else { if (Variables.exSup[i] != prof.SelectSingleNode("Prof/Sciences/" + lcs + "/Questions").InnerText.Split(',').Length.ToString()) { Suppex.Image = Properties.Resources.newASsignment; break; } ; i++; } } dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); Variables.exSup = dr[0]["exSupp"].ToString().Split(','); if ((string)dr[0]["Type"] == "Prof") { Suppex.Visible = false; addFile.Visible = true; } else { addFile.Visible = false; Suppex.Visible = true; } mediaplayer.CreateControl(); mediaplayer.URL = Application.StartupPath + "\\Sounds\\Intro0.m4a"; mediaplayer.Ctlcontrols.play(); }
private void NumbersGame_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Nombres"].ToString()) != 0) { HighScore.Text = "meilleur Score : " + dr[0]["Nombres"]; HighScore.Visible = true; } Play(); }
public jeux_de_heure() { InitializeComponent(); score = 0; for (int i = 0; i < 20; i++) { imageList1.Images[i].Tag = i.ToString(); } dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); }
public jeux_verbes() { InitializeComponent(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); XmlDocument conjugaison = new XmlDocument(); conjugaison.Load(Application.StartupPath + @"\francais.xml"); CryptageEtHachage.DeCrypNode(conjugaison.DocumentElement); presentt = conjugaison.GetElementsByTagName("present"); passeCompose = conjugaison.GetElementsByTagName("passeCompose"); passesimple = conjugaison.GetElementsByTagName("passeSimple"); futursimple = conjugaison.GetElementsByTagName("futureSimple"); imparfait = conjugaison.GetElementsByTagName("imparfait"); }
private void PrioritéGame_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Priorite"].ToString()) != 0) { HighScore.Text = "meilleur score : " + dr[0]["Priorite"]; HighScore.Visible = true; } LVL_1(); }
private void picBack_Click(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Ecriture"].ToString()) < acquis) { dr[0]["Ecriture"] = acquis; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } this.Close(); Variables.matiere.Show(); Variables.matiere.ShowInTaskbar = true; }
private void ComparaisonGame_Load(object sender, EventArgs e) { // Bitmap bitmap = new Bitmap(Application.StartupPath + "\\Pics\\Quest.png"); // Quest.Image = bitmap; dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Comparaison"].ToString()) != 0) { HighScore.Text = "meilleur Score : " + dr[0]["Comparaison"]; HighScore.Visible = true; } Play(); }
private void pictureBox4_Click(object sender, EventArgs e) { if (int.Parse(dr[0]["Comparaison"].ToString()) < score) { dr[0]["Comparaison"] = score; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } this.Close(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); this.ShowInTaskbar = false; Variables.matiere.ShowInTaskbar = true; }
private void Flappy_Bird_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["FlappyBird"].ToString()) != 0) { scoreText.Text = "meilleur Score : " + dr[0]["FlappyBird"]; scoreText.Visible = true; } if (debut == 0) { gameTimer.Stop(); } }
private void Form1_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); for (int i = 1; i < 7; i++) { if (panel1.Controls["label" + i.ToString()].Location.Y > 232) { MakeQuestion((Label)panel1.Controls["label" + i.ToString()]); MessageBox.Show("yoy"); } } }
private void CalcGame_Load(object sender, EventArgs e) { GenerateNumbers(); lblTarget.Text = rnd.Next(6, 10).ToString(); timerGame.Start(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["PlusMoins"].ToString()) != 0) { HGNB.Text = "Score élevé : " + dr[0]["PlusMoins"]; HGNB.Visible = true; } }
public void pictureBox1_Click(object sender, EventArgs e) { dic1.texts(); if (a == 1) { { for (int i = 0; i < Repponses.Length; i++) { remarques += i + ")" + test(dic1.Texte[i], Repponses[i], out float Current) + "\n";//dic1.vn.URL = @"Voix/Dic" + t[i] + 1; noteLevel += Current; } { string message; if (noteLevel > 22) { message = "Ton Note est" + noteLevel.ToString() + "/50 .\n Courage Champ! \n Voulez vous repeter?"; DialogResult rep = MessageBox.Show(message, "Dictee", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rep == DialogResult.Yes) { dic1.newEx(); remarques = ""; noteLevel = 0; Repponses = Reponses(); } else { this.Close(); } } else { message = "Ton Note est" + noteLevel.ToString() + "/50 . \n :( Ressayer"; MessageBox.Show(message + remarques); Repponses = Reponses(); dic1.newEx(); remarques = ""; noteLevel = 0; } // if (noteLevel > 0) { a++; dic1.Dispose(); dic2.Visible = true; noteLevel = 0; remarques = null; return; } } } //{ if (dic1.Texte[i] == Reponses(a)[i]) { score += 20; MessageBox.Show(score.ToString()); dic1.Dispose(); dic2.Visible = true; } else { dic1.Controls[i].BackColor = Color.Red; } } } } //else if (a == 2) //{ // { for (int i = 0; i < Reponses(a).Length; i++) { remarques += i + 1 + ")" + test(dic2.Texte[i], Reponses(a)[i], out float Current) + "\n"; noteLevel += Current; } { string message; if (noteLevel > 0) message = "Ton Note est" + noteLevel.ToString() + ".\n Courage Champ!"; else message = "Ton Note est" + noteLevel.ToString() + ". \n :( Ressayer"; MessageBox.Show(message + remarques); if (noteLevel > 10) { a++; remarques = null; dic2.Dispose(); dic3.Visible = true; return; } } }//{ if (dic2.Texte[i] == Reponses(a)[i]) { score += 30; MessageBox.Show(score.ToString()); dic2.Dispose(); dic3.Visible = true; } else { dic1.Controls[i].BackColor = Color.Red; } } } //} //else if (a == 3) //{ // for (int i = 0; i < Reponses(a).Length; i++) { remarques += i + 1 + ")" + test(dic3.Texte[i], Reponses(a)[i], out float Current); noteLevel = Current * 2; } // if (dic3.Texte[i] == Reponses(a)[i]) { score += 20; MessageBox.Show(score.ToString()); this.Close(); } // if (noteLevel > 0) { a++; score = 0; } else MessageBox.Show("Ressayer."); //} //else if (a == 4) { MessageBox.Show("Ton Note est" + noteLevel.ToString() + "Courage!"); this.Close(); } } dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Dictee"].ToString()) < noteLevel) { dr[0]["Dictee"] = noteLevel; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } }
private void PermCours_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (int.Parse(dr[0]["Perim"].ToString()) != 0) { meilleur.Text = "meilleur Score : " + dr[0]["Perim"]; meilleur.Visible = true; } var image = Image.FromFile(imageName[0]); PermForm.Image = image; nbrd1 = 1; permpic.Image = bitmaps[0]; vraiounon = false; }
private void Form1_Load(object sender, EventArgs e) { gram = new XmlDocument(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); gram.Load(Application.StartupPath + @"\Gramm.xml"); if (gram2) { panel2.Visible = true; } if (!cours) { button11.Click += lvl1_grams ; button3.Click += lvl1_grams; button4.Click += lvl1_grams; button7.Click += lvl1_grams; button6.Click += lvl1_grams; button9.Click += lvl1_grams; } CryptageEtHachage.DeCrypNode(gram.DocumentElement); }
public MatiereStart() { InitializeComponent(); dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); Variables.counter = 0; }
private void BtnNext_Click(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); if (Variables.counter > 2) { Variables.counter = 2; } Variables.counter = Variables.counter + 1; if (Variables.counter == 1) { if (Variables.MatiereNomPublic == "MT") { lvlFrancais.Visible = false; lvlMaths.Visible = true; if (int.Parse(dr[0]["Nombres"].ToString()) + int.Parse(dr[0]["Suitenb"].ToString()) + int.Parse(dr[0]["Comparaison"].ToString()) + int.Parse(dr[0]["PlusMoins"].ToString()) < 250) { lockmt1.Visible = lockmt2.Visible = lockmt3.Visible = lockmt4.Visible = true; PicmtEX1.Enabled = PicmtEX2.Enabled = PicmtEX3.Enabled = PicmtCours4.Enabled = PicmtEX4.Enabled = PicmtCours1.Enabled = PicmtCours2.Enabled = PicmtCours3.Enabled = false; } else { lockmt1.Visible = lockmt2.Visible = lockmt3.Visible = lockmt4.Visible = false; lvlMaths.Image = Properties.Resources.crown2; PicmtEX1.Enabled = PicmtEX2.Enabled = PicmtEX3.Enabled = PicmtCours4.Enabled = PicmtEX4.Enabled = PicmtCours1.Enabled = PicmtCours2.Enabled = PicmtCours3.Enabled = true; if (Variables.levelmt == 1) { Variables.levelmt = 2; dr[0]["lvlmt"] = 2; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } } PanelMaths.Visible = true; PanelFrancais.Visible = false; toolTip1.SetToolTip(Picmt1, "Foix et divisé"); toolTip1.SetToolTip(Picmt2, "Les formes géométeriques"); toolTip1.SetToolTip(Picmt3, "Double et moitié"); toolTip1.SetToolTip(Picmt4, "Fraction"); lbl.Text = "Intermediaire"; Picmt1.Name = "Picmt5"; Picmt2.Name = "Picmt6"; Picmt3.Name = "Picmt7"; Picmt4.Name = "Picmt8"; for (int i = 5; i < 9; i++) { Image image = Image.FromFile(Application.StartupPath + "\\Pics\\mathsLvl" + i + ".png"); PanelMaths.Controls["Picmt" + i.ToString()].BackgroundImage = image; PanelMaths.Controls["Picmt" + i.ToString()].BackgroundImageLayout = ImageLayout.Stretch; } } else if (Variables.MatiereNomPublic == "FR") { lvlMaths.Visible = false; lvlFrancais.Visible = true; PanelMaths.Visible = false; PanelFrancais.Visible = true; if (int.Parse(dr[0]["prononciation"].ToString()) + int.Parse(dr[0]["Ecriture"].ToString()) < 2) { lock1.Visible = lock2.Visible = lock3.Visible = true; lvlFrancais.Image = Properties.Resources.crown2; PicfrEX1.Enabled = PicfrEX2.Enabled = PicfrEX3.Enabled = PicfrCours1.Enabled = PicfrCours2.Enabled = PicfrCours3.Enabled = false; } else { lock1.Visible = lock2.Visible = lock3.Visible = false; lvlFrancais.Image = Properties.Resources.crown2; PicfrEX1.Enabled = PicfrEX2.Enabled = PicfrEX3.Enabled = PicfrCours1.Enabled = PicfrCours2.Enabled = PicfrCours3.Enabled = true; if (Variables.levelfr == 1) { Variables.levelfr = 2; dr[0]["lvlfr"] = 2; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } } Picfr3.Visible = true; PicfrCours3.Visible = true; PicfrEX3.Visible = true; PicfrCours1.Visible = true; toolTip1.SetToolTip(Picfr1, "Orthographe"); toolTip1.SetToolTip(Picfr2, "Grammaire 1"); toolTip1.SetToolTip(Picfr3, "Conjugaison 1"); //Picfr3.Name = "Picfr5"; Picfr1.Name = "Picfr3"; Picfr2.Name = "Picfr4"; Picfr3.Name = "Picfr5"; lbl.Text = "Intermediaire"; for (int i = 3; i < 6; i++) { Image image = Image.FromFile(Application.StartupPath + "\\Pics\\frns" + i + ".png"); PanelFrancais.Controls["Picfr" + i.ToString()].BackgroundImage = image; PanelFrancais.Controls["Picfr" + i.ToString()].BackgroundImageLayout = ImageLayout.Stretch; } } } else if (Variables.counter == 2) { if (Variables.MatiereNomPublic == "MT") { if (int.Parse(dr[0]["MultiDiv"].ToString()) + int.Parse(dr[0]["FormesGeo"].ToString()) + int.Parse(dr[0]["MoitieEtDouble"].ToString()) + int.Parse(dr[0]["Fractions"].ToString()) < 250) { lockmt1.Visible = lockmt2.Visible = lockmt3.Visible = lockmt4.Visible = lockmt5.Visible = true; PicmtEX1.Enabled = PicmtEX2.Enabled = PicmtEX3.Enabled = PicmtCours4.Enabled = PicmtEX4.Enabled = PicmtEX5.Enabled = PicmtCours5.Enabled = PicmtCours1.Enabled = PicmtCours2.Enabled = PicmtCours3.Enabled = false; } else { lvlMaths.Image = Properties.Resources.crown3; lockmt1.Visible = lockmt2.Visible = lockmt3.Visible = lockmt4.Visible = false; PicmtEX1.Enabled = PicmtEX2.Enabled = PicmtEX3.Enabled = PicmtCours4.Enabled = PicmtEX4.Enabled = PicmtCours1.Enabled = PicmtCours2.Enabled = PicmtCours3.Enabled = true; Variables.levelmt = 3; dr[0]["lvlmt"] = 3; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } PanelMaths.Visible = true; PanelFrancais.Visible = false; toolTip1.SetToolTip(Picmt1, "L'heure"); toolTip1.SetToolTip(Picmt2, "Ordre croissante et décroissante"); toolTip1.SetToolTip(Picmt3, "Périmètre"); toolTip1.SetToolTip(Picmt4, "Complèment à 10"); toolTip1.SetToolTip(Picmt13, "Calcule avec priorité"); Picmt1.Name = "Picmt9"; Picmt2.Name = "Picmt10"; Picmt3.Name = "Picmt11"; Picmt4.Name = "Picmt12"; Picmt13.Visible = true; PicmtCours5.Visible = true; PicmtEX5.Visible = true; lbl.Text = "Champions"; for (int i = 9; i < 14; i++) { Image image = Image.FromFile(Application.StartupPath + "\\Pics\\mathsLvl" + i + ".png"); PanelMaths.Controls["Picmt" + i.ToString()].BackgroundImage = image; PanelMaths.Controls["Picmt" + i.ToString()].BackgroundImageLayout = ImageLayout.Stretch; } } else if (Variables.MatiereNomPublic == "FR") { if (int.Parse(dr[0]["orthographe"].ToString()) + int.Parse(dr[0]["conjugaison1"].ToString()) + int.Parse(dr[0]["SingulierOuPluriel"].ToString()) < 10) { lock1.Visible = lock2.Visible = lock3.Visible = true; PicfrEX1.Enabled = PicfrEX2.Enabled = PicfrEX3.Enabled = PicfrCours1.Enabled = PicfrCours2.Enabled = PicfrCours3.Enabled = false; } else { lock1.Visible = lock2.Visible = lock3.Visible = false; lvlFrancais.Image = Properties.Resources.crown3; PicfrEX1.Enabled = PicfrEX2.Enabled = PicfrEX3.Enabled = PicfrCours1.Enabled = PicfrCours2.Enabled = PicfrCours3.Enabled = true; Variables.levelfr = 3; dr[0]["lvlfr"] = 3; Variables.XmlWriter(Application.StartupPath + "\\users.xml"); } //PanelMaths.Visible = false; //PanelFrancais.Visible = true; toolTip1.SetToolTip(Picfr1, "Dictée"); toolTip1.SetToolTip(Picfr2, "Grammaire 2"); toolTip1.SetToolTip(Picfr3, "Conjugaison 2"); PicfrCours1.Visible = false; Picfr1.Name = "Picfr6"; Picfr2.Name = "Picfr7"; Picfr3.Name = "Picfr8"; lbl.Text = "Champions"; for (int i = 6; i < 9; i++) { Image image = Image.FromFile(Application.StartupPath + "\\Pics\\frns" + i + ".png"); PanelFrancais.Controls["Picfr" + i.ToString()].BackgroundImage = image; PanelFrancais.Controls["Picfr" + i.ToString()].BackgroundImageLayout = ImageLayout.Stretch; } } } }
private void addEx_Load(object sender, EventArgs e) { dr = Variables.XmlReader(Application.StartupPath + "\\users.xml"); }