コード例 #1
0
        protected void LB_Click(object sender, EventArgs e)
        {
            Label         lbl   = sender as Label;
            List <String> Item2 = new List <String>();

            string dt = DateTime.Today.ToShortDateString();

            if (lbl.Text == Destination[0].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetCalculatrice FPC = new FormsCompetence.FormProjetCalculatrice();
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[1].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetBarreProgCirculaire FPC = new FormsCompetence.FormProjetBarreProgCirculaire();
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[2].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetBoutonAnime FPC = new FormsCompetence.FormProjetBoutonAnime("arborescence");
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[3].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetCodeSourceSiteWeb FPC = new FormsCompetence.FormProjetCodeSourceSiteWeb("arborescence");
                FPC.MdiParent = form;
                FPC.Show();
            }
            if (lbl.Text == Destination[4].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetFormulaireContactPersonnalise FPC = new FormsCompetence.FormProjetFormulaireContactPersonnalise();
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[5].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetImageFlottante FPC = new FormsCompetence.FormProjetImageFlottante();
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[6].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetInfoBulle FPC = new FormsCompetence.FormProjetInfoBulle();
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[7].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                DialogResult DR = MessageBox.Show(LangueElement[175] + "\n" + LangueElement[176], LangueElement[177], MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (DR == DialogResult.Yes)
                {
                    System.Diagnostics.Process p = new System.Diagnostics.Process();
                    p.StartInfo.FileName = "http://dimitryrobin.fr/Portfolio/AddFindPlayer.php";
                    p.Start();
                }
            }

            if (lbl.Text == Destination[8].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetMorpion FPC = new FormsCompetence.FormProjetMorpion("arborescence");
                FormIndex form = (FormIndex)this.MdiParent;
                FPC.MdiParent = form;
                FPC.Show();
            }

            if (lbl.Text == Destination[9].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

recommence:

                string value = "Pseudonyme";
                bool check = false;

                if (Fonction.InputBoxLogin("Pendu", LangueElement[172], ref value, ref check) == DialogResult.OK)
                {
                    if (check == false)
                    {
                        if (value != "Pseudonyme" && value != "" && value != " " && value != "  " && value != "   " && value != "    " && value != "     ")
                        {
                            nouvJoueur = new Joueur(value);
                            lesJoueurs.Add(nouvJoueur);
                            nouvJoueur.ModifNbPartie();

                            nouvJoueur.AfficherJoueur();

                            FormIndex form = (FormIndex)this.MdiParent;
                            FormsCompetence.FormProjetPendu FPC = new FormsCompetence.FormProjetPendu(value, nouvJoueur, lesJoueurs, "arborescence");
                            FPC.MdiParent = form;
                            FPC.Show();
                        }
                        else
                        {
                            MessageBox.Show(LangueElement[174], LangueElement[173], MessageBoxButtons.OK, MessageBoxIcon.Warning);

                            goto recommence;
                        }
                    }
                    else
                    {
                        nouvJoueur = new Joueur("Guest");
                        lesJoueurs.Add(nouvJoueur);
                        nouvJoueur.ModifNbPartie();

                        nouvJoueur.AfficherJoueur();

                        FormIndex form = (FormIndex)this.MdiParent;
                        FormsCompetence.FormProjetPendu FPC = new FormsCompetence.FormProjetPendu("Guest", nouvJoueur, lesJoueurs, "arborescence");
                        FPC.MdiParent = form;
                        FPC.Show();
                    }
                }
            }

            if (lbl.Text == Destination[10].ToString())
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormIndex form = (FormIndex)this.MdiParent;
                FormsCompetence.FormProjetSnake FPC = new FormsCompetence.FormProjetSnake();
                FPC.MdiParent = form;
                FPC.Show();
            }
        }
コード例 #2
0
ファイル: FormIndex.cs プロジェクト: Dimy49/Skill-project
        private void lblACNom1_Click(object sender, EventArgs e)
        {
            List <String> Item2       = new List <String>();
            List <String> ListeProjet = new List <String>();

            ListeProjet = Fonction.LectureProjet();

            Label lbl = sender as Label;

            string dt = DateTime.Today.ToShortDateString();

            foreach (var item in ListeProjet)
            {
                // string[] nomProjet = item.Split(new[] { " /// " }, StringSplitOptions.None);

                string[] result = Regex.Split(item, @"\-\-\-");

                Item2.Add(result[0]);
            }

            if (lbl.Text == Item2[0])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetCalculatrice FPC = new FormsCompetence.FormProjetCalculatrice();
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[7])
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                DialogResult DR = MessageBox.Show(LangueElement[175] + "\n" + LangueElement[176], LangueElement[177], MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (DR == DialogResult.Yes)
                {
                    System.Diagnostics.Process p = new System.Diagnostics.Process();
                    p.StartInfo.FileName = "http://dimitryrobin.fr/Portfolio/AddFindPlayer.php";
                    p.Start();
                }
            }

            if (lbl.Text == Item2[1])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetBarreProgCirculaire FPC = new FormsCompetence.FormProjetBarreProgCirculaire();
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[2])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetBoutonAnime FPC = new FormsCompetence.FormProjetBoutonAnime("index");
                FPC.MdiParent = this;
                FPC.Show();
            }
            if (lbl.Text == Item2[3])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetCodeSourceSiteWeb FPC = new FormsCompetence.FormProjetCodeSourceSiteWeb("index");
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[4])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetFormulaireContactPersonnalise FPC = new FormsCompetence.FormProjetFormulaireContactPersonnalise();
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[5])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetImageFlottante FPC = new FormsCompetence.FormProjetImageFlottante();
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[6])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetInfoBulle FPC = new FormsCompetence.FormProjetInfoBulle();
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[8])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetMorpion FPC = new FormsCompetence.FormProjetMorpion("index");
                FPC.MdiParent = this;
                FPC.Show();
            }

            if (lbl.Text == Item2[9])
            {
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

recommence:

                string value = "Pseudonyme";
                bool check = false;

                if (Fonction.InputBoxLogin("Pendu", LangueElement[172], ref value, ref check) == DialogResult.OK)
                {
                    if (check == false)
                    {
                        if (value != "Pseudonyme" && value != "" && value != " " && value != "  " && value != "   " && value != "    " && value != "     ")
                        {
                            pictureBox1.Visible = false;

                            nouvJoueur = new Joueur(value);
                            lesJoueurs.Add(nouvJoueur);
                            nouvJoueur.ModifNbPartie();

                            nouvJoueur.AfficherJoueur();

                            FormsCompetence.FormProjetPendu FPC = new FormsCompetence.FormProjetPendu(value, nouvJoueur, lesJoueurs, "index");
                            FPC.MdiParent = this;
                            FPC.Show();
                        }
                        else
                        {
                            MessageBox.Show(LangueElement[174], LangueElement[173], MessageBoxButtons.OK, MessageBoxIcon.Warning);

                            goto recommence;
                        }
                    }
                    else
                    {
                        pictureBox1.Visible = false;

                        nouvJoueur = new Joueur("Guest");
                        lesJoueurs.Add(nouvJoueur);
                        nouvJoueur.ModifNbPartie();

                        nouvJoueur.AfficherJoueur();

                        FormsCompetence.FormProjetPendu FPC = new FormsCompetence.FormProjetPendu("Guest", nouvJoueur, lesJoueurs, "index");
                        FPC.MdiParent = this;
                        FPC.Show();
                    }
                }
            }

            if (lbl.Text == Item2[10])
            {
                pictureBox1.Visible = false;
                Fonction.ecrireFichier("", "", "", "", "", "", lbl.Text, dt);

                FormsCompetence.FormProjetSnake FPC = new FormsCompetence.FormProjetSnake();
                FPC.MdiParent = this;
                FPC.Show();
            }
        }