Example #1
0
        private void FormSuggestion_Load(object sender, EventArgs e)
        {
            LangueElement             = Fonction.LangageAppli();
            this.Text                 = LangueElement[22];
            lblTitreSuggestion.Text   = LangueElement[23];
            lblInfoSuggesstion.Text   = LangueElement[24];
            lblInfo2Suggestion.Text   = LangueElement[25];
            lblInfo3Suggestion.Text   = LangueElement[26];
            tbNom.Text                = LangueElement[27];
            tbPrénom.Text             = LangueElement[28];
            tbMail.Text               = LangueElement[29];
            lblAge.Text               = LangueElement[30];
            lblSexe.Text              = LangueElement[31];
            rtbSuggestion.Text        = LangueElement[32];
            btnRetourSuggestion.Text  = LangueElement[33];
            lblDate2.Text             = LangueElement[34];
            lblDate.Text              = LangueElement[35];
            btnEnvoyerSuggestion.Text = LangueElement[36];

            toolTip1.ToolTipTitle = LangueElement[37];
            toolTip3.ToolTipTitle = LangueElement[38];
            toolTip4.ToolTipTitle = LangueElement[39];


            Fonction.policeTexte(this); // Gestion police
            timer1.Start();
        }
Example #2
0
        private void FormQuiSuisJe_Load(object sender, EventArgs e)
        {
            LangueElement     = Fonction.LangageAppli();
            this.Text         = LangueElement[46];
            lblTitreQSJ.Text  = LangueElement[46];
            label3.Text       = LangueElement[47];
            label4.Text       = LangueElement[48];
            label6.Text       = LangueElement[49];
            label5.Text       = LangueElement[50];
            label7.Text       = LangueElement[51];
            label8.Text       = LangueElement[52];
            label9.Text       = LangueElement[53];
            label10.Text      = LangueElement[54];
            label11.Text      = LangueElement[55];
            label2.Text       = LangueElement[56];
            label18.Text      = LangueElement[57];
            label19.Text      = LangueElement[58];
            label20.Text      = LangueElement[59];
            label17.Text      = LangueElement[60];
            label12.Text      = LangueElement[61];
            btnRetourQSJ.Text = LangueElement[62];

            label1.Text = LangueElement[63] + GetAge() + LangueElement[64] + "\n" + LangueElement[65] + "\n" + LangueElement[66] + "\n" + LangueElement[67] + "\n" + LangueElement[68] + "\n" + LangueElement[69] + "\n";

            radioButton1.Select();

            Fonction.policeTexte(this); // Gestion police
        }
Example #3
0
        public void accesRapide()
        {
            List <string> Preference = new List <string>();

            string police;
            string dateRecent1, Recent1, dateRecent2, Recent2, dateRecent3, Recent3;

            Preference  = Fonction.Preference();
            police      = Preference[2];
            dateRecent1 = Preference[7];
            Recent1     = Preference[6];
            dateRecent2 = Preference[9];
            Recent2     = Preference[8];
            dateRecent3 = Preference[11];
            Recent3     = Preference[10];

            if (Recent1 != "Aucun")
            {
                lblAccesRapide.Visible = true;
                lblACDate1.Text        = dateRecent1;
                lblACNom1.Text         = Recent1;
                lblACDate1.Visible     = true;
                lblACNom1.Visible      = true;
            }
            else
            {
                lblAccesRapide.Visible = false;
                lblACDate1.Visible     = false;
                lblACNom1.Visible      = false;
            }

            if (Recent2 != "Aucun")
            {
                lblACDate2.Text    = dateRecent2;
                lblACNom2.Text     = Recent2;
                lblACDate2.Visible = true;
                lblACNom2.Visible  = true;
            }
            else
            {
                lblACDate2.Visible = false;
                lblACNom2.Visible  = false;
            }

            if (Recent3 != "Aucun")
            {
                lblACDate3.Text    = dateRecent3;
                lblACNom3.Text     = Recent3;
                lblACDate3.Visible = true;
                lblACNom3.Visible  = true;
            }
            else
            {
                lblACDate3.Visible = false;
                lblACNom3.Visible  = false;
            }
        }
Example #4
0
 public FormArborescence()
 {
     InitializeComponent();
     Preference  = Fonction.Preference();
     ListeProjet = Fonction.LectureProjet();
     police      = Preference[2];
     dateRecent1 = Preference[7];
     Recent1     = Preference[6];
     dateRecent2 = Preference[9];
     Recent2     = Preference[8];
     dateRecent3 = Preference[11];
     Recent3     = Preference[10];
 }
Example #5
0
        private void FormAPropos_Load(object sender, EventArgs e)
        {
            LangueElement    = Fonction.LangageAppli();
            this.Text        = LangueElement[73];
            lblTitreAP.Text  = LangueElement[73];
            btnRetourAP.Text = LangueElement[74];

            Fonction.policeTexte(this); // Gestion police

            radioButton1.Select();
            label1.Text = LangueElement[75] + "\n" + LangueElement[76] + "\n" + LangueElement[77] + "\n\n" +
                          LangueElement[78] + "\n\n" + LangueElement[79] + "\n" + LangueElement[80] + "\n" + LangueElement[81] + "\n\n" +
                          LangueElement[82] + "\n\n" + LangueElement[83] + "\n" + LangueElement[84] + "\n" + LangueElement[85] + "\n\n" +
                          LangueElement[86] + "\n" + LangueElement[87] + "\n" + LangueElement[88] + "\n\n" + LangueElement[89] + "\n" +
                          LangueElement[90] + "\n" + LangueElement[91] + "\n" + LangueElement[92] + "\n" + LangueElement[93];
        }
Example #6
0
        private void Form1_Load(object sender, EventArgs e)
        {
            timerHHmm.Start();

            string curFile = @"C:\SkillProject\Preferences_SkillProject.txt";

            if (File.Exists(curFile))
            {
                string[] lines = Fonction.lireFichier();

                test    = lines[0].ToString();
                Opacity = Convert.ToDouble(test);
            }
            else
            {
                Fonction.creationFichier();
            }

            para = 0;
            accesRapide();

            Fonction.policeTexte(this); // Gestion police

            LangueElement = Fonction.LangageAppli();
            affichageToolStripMenuItem.Text       = LangueElement[2];
            listeToolStripMenuItem.Text           = LangueElement[3];
            miniaturesToolStripMenuItem.Text      = LangueElement[4];
            ArborescenceToolStripMenuItem.Text    = LangueElement[5];
            suggestionToolStripMenuItem.Text      = LangueElement[6];
            QuiSommesNousToolStripMenuItem.Text   = LangueElement[7];
            commentÇaMarcheToolStripMenuItem.Text = LangueElement[8];
            AfficToolStripMenuItem.Text           = LangueElement[9];
            paramètreToolStripMenuItem.Text       = LangueElement[10];
            QuitterToolStripMenuItem.Text         = LangueElement[11];
            lblAccesRapide.Text = LangueElement[15];

            if (quitterToolStripMenuItem.Text == "Exit ➬")
            {
                quitterToolStripMenuItem.Margin         = new System.Windows.Forms.Padding(20, 0, 2, 0);
                paramètreToolStripMenuItem.Margin       = new System.Windows.Forms.Padding(20, 0, 2, 0);
                AfficToolStripMenuItem.Margin           = new System.Windows.Forms.Padding(20, 0, 2, 0);
                commentÇaMarcheToolStripMenuItem.Margin = new System.Windows.Forms.Padding(20, 0, 2, 0);
                QuiSommesNousToolStripMenuItem.Margin   = new System.Windows.Forms.Padding(20, 0, 2, 0);
                suggestionToolStripMenuItem.Margin      = new System.Windows.Forms.Padding(20, 0, 2, 0);
            }
        }
Example #7
0
        private void FormFaireUnDon_Load(object sender, EventArgs e)
        {
            LangueElement         = Fonction.LangageAppli();
            this.Text             = LangueElement[97];
            lblTitreFUD.Text      = LangueElement[97];
            label3.Text           = LangueElement[98];
            label2.Text           = LangueElement[99];
            btnRetourFUD.Text     = LangueElement[100];
            toolTip2.ToolTipTitle = LangueElement[101];

            Fonction.policeTexte(this); // Gestion police

            label1.Text = LangueElement[102] + "\n" + LangueElement[103] + "\n" + LangueElement[104];
            radioButton1.Select();

            panel1.AutoScroll        = false;
            panel1.AutoScrollMinSize = new Size(0, 0);
            btnRetourFUD.Location    = new Point(430, 470);
            webBrowser1.Visible      = false;

            webBrowser1.Navigate("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XW7DWPCENB2C8");
        }
Example #8
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();
            }
        }
Example #9
0
        private void FormArborescence_Load(object sender, EventArgs e)
        {
            LangueElement    = Fonction.LangageAppli();
            this.Text        = LangueElement[129];
            gbTri.Text       = LangueElement[130];
            rbDateAjout.Text = LangueElement[131];
            gbRecent.Text    = LangueElement[135];

            Fonction.policeTexte(this); // Gestion police

            lblDate1.Text = dateRecent1;
            lblDate2.Text = dateRecent2;
            lblDate3.Text = dateRecent3;
            recent1.Text  = Recent1;
            recent2.Text  = Recent2;
            recent3.Text  = Recent3;

            if (Recent1 != "Aucun")
            {
                lblDate1.Text    = dateRecent1;
                recent1.Text     = Recent1;
                lblDate1.Visible = true;
                recent1.Visible  = true;
            }
            else
            {
                lblDate1.Visible = false;
                recent1.Visible  = false;
            }

            if (Recent2 != "Aucun")
            {
                lblDate2.Text    = dateRecent2;
                recent2.Text     = Recent2;
                lblDate2.Visible = true;
                recent2.Visible  = true;
            }
            else
            {
                lblDate2.Visible = false;
                recent2.Visible  = false;
            }

            if (Recent3 != "Aucun")
            {
                lblDate3.Text    = dateRecent3;
                recent3.Text     = Recent3;
                lblDate3.Visible = true;
                recent3.Visible  = true;
            }
            else
            {
                lblDate3.Visible = false;
                recent3.Visible  = false;
            }

            if (Recent1 == "Aucun" && Recent2 == "Aucun" && Recent3 == "Aucun")
            {
                gbRecent.Visible = false;
            }
            else
            {
                gbRecent.Visible = true;
            }


            treeView1.Nodes.Add(LangueElement[139]);

            if (LangueElement[139] == "Accessoires")
            {
                treeView1.Nodes[0].Nodes.Add("Calculatrice");
            }
            else
            {
                treeView1.Nodes[0].Nodes.Add("Calculator");
            }

            treeView1.Nodes.Add(LangueElement[140]);

            if (LangueElement[140] == "Compétences")
            {
                treeView1.Nodes[1].Nodes.Add("Barre de progression circulaire");
                treeView1.Nodes[1].Nodes.Add("Bouton animé");
                treeView1.Nodes[1].Nodes.Add("Code source site web");
                treeView1.Nodes[1].Nodes.Add("Formulaire de contact");
                treeView1.Nodes[1].Nodes.Add("Image flottante");
                treeView1.Nodes[1].Nodes.Add("InfoBulle");
            }
            else
            {
                treeView1.Nodes[1].Nodes.Add("Circular progress bar");
                treeView1.Nodes[1].Nodes.Add("Animated button");
                treeView1.Nodes[1].Nodes.Add("Source code website");
                treeView1.Nodes[1].Nodes.Add("Contact form");
                treeView1.Nodes[1].Nodes.Add("Floating image");
                treeView1.Nodes[1].Nodes.Add("Tooltip");
            }

            treeView1.Nodes.Add(LangueElement[141]);

            if (LangueElement[141] == "Jeux")
            {
                treeView1.Nodes[2].Nodes.Add("AddFindPlayer");
                treeView1.Nodes[2].Nodes.Add("Morpion");
                treeView1.Nodes[2].Nodes.Add("Pendu");
                treeView1.Nodes[2].Nodes.Add("Snake");
            }
            else
            {
                treeView1.Nodes[2].Nodes.Add("AddFindPlayer");
                treeView1.Nodes[2].Nodes.Add("Morpion");
                treeView1.Nodes[2].Nodes.Add("Pendu");
                treeView1.Nodes[2].Nodes.Add("Snake");
            }

            Chargement();

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

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

                Destination.Add(result[0]);
            }
        }
Example #10
0
        private void FormSkillProject_Load(object sender, EventArgs e)
        {
            LangueElement     = Fonction.LangageAppli();
            this.Text         = LangueElement[129];
            gbTri.Text        = LangueElement[130];
            rbDateAjout.Text  = LangueElement[131];
            gbRecherche.Text  = LangueElement[132];
            lblrecherche.Text = LangueElement[133];
            cbRecherche.Text  = LangueElement[134];
            gbRecent.Text     = LangueElement[135];

            Fonction.policeTexte(this); // Gestion police

            cbRecherche.Items.Clear();

            lblDate1.Text = dateRecent1;
            lblDate2.Text = dateRecent2;
            lblDate3.Text = dateRecent3;
            recent1.Text  = Recent1;
            recent2.Text  = Recent2;
            recent3.Text  = Recent3;

            if (Recent1 != "Aucun")
            {
                lblDate1.Text    = dateRecent1;
                recent1.Text     = Recent1;
                lblDate1.Visible = true;
                recent1.Visible  = true;
            }
            else
            {
                lblDate1.Visible = false;
                recent1.Visible  = false;
            }

            if (Recent2 != "Aucun")
            {
                lblDate2.Text    = dateRecent2;
                recent2.Text     = Recent2;
                lblDate2.Visible = true;
                recent2.Visible  = true;
            }
            else
            {
                lblDate2.Visible = false;
                recent2.Visible  = false;
            }

            if (Recent3 != "Aucun")
            {
                lblDate3.Text    = dateRecent3;
                recent3.Text     = Recent3;
                lblDate3.Visible = true;
                recent3.Visible  = true;
            }
            else
            {
                lblDate3.Visible = false;
                recent3.Visible  = false;
            }

            if (Recent1 == "Aucun" && Recent2 == "Aucun" && Recent3 == "Aucun")
            {
                gbRecent.Visible = false;
            }
            else
            {
                gbRecent.Visible = true;
            }

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

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

                if (result[0].Length > 25)
                {
                    string res = result[0].Substring(0, 25);
                    res = res + "..";
                    cbRecherche.Items.Add(res);
                }
                else
                {
                    cbRecherche.Items.Add(result[0]);
                }

                Destination.Add(result[0]);
            }
        }
Example #11
0
        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();
            }
        }
Example #12
0
        private void ecrireFichier()
        {
            if (cbBoiteMessagesOui.Checked == true)
            {
                BM = true;
            }
            else
            {
                BM = false;
            }

            if (cbInfoDefilantesOui.Checked == true)
            {
                ID = true;
            }
            else
            {
                ID = false;
            }

            if (cbTutorielOui.Checked == true)
            {
                Tuto = true;
            }
            else
            {
                Tuto = false;
            }

            if (combobLangue.Text == "Francais" || combobLangue.Text == "French")
            {
                langueApres = "Francais";
            }
            else if (combobLangue.Text == "Anglais" || combobLangue.Text == "English")
            {
                langueApres = "Anglais";
            }

            string[] lines = Fonction.lireFichier();


            Fonction.ecrireFichier(opa.ToString(), BM.ToString(), lblPolice.Text, ID.ToString(), langueApres, Tuto.ToString(), "", "");

            if (lines[0].ToString() != opa.ToString() || lines[1].ToString() != BM.ToString() || lines[2].ToString() != lblPolice.Text || lines[3].ToString() != ID.ToString() ||
                lines[4].ToString() != langueApres || lines[5].ToString() != Tuto.ToString())
            {
                DialogResult DR = MessageBox.Show(LangueElement[124], LangueElement[125], MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (DR == DialogResult.Yes)
                {
                    if (lines[4].ToString() != langueApres)
                    {
                        // Changement de langue --> On réinitialise les vues récemments

                        // On récupère tout
                        StreamReader reader = File.OpenText(@"C:\SkillProject\Preferences_SkillProject.txt");
                        string       ligne;

                        List <string> listeElement = new List <string>();
                        while (!reader.EndOfStream)
                        {
                            ligne = reader.ReadLine();
                            listeElement.Add(ligne);
                        }
                        reader.Close();

                        //// Debut MAJ \\\\

                        listeElement[6]  = "Aucun";
                        listeElement[7]  = "jj/mm/aaaa";
                        listeElement[8]  = "Aucun";
                        listeElement[9]  = "jj/mm/aaaa";
                        listeElement[10] = "Aucun";
                        listeElement[11] = "jj/mm/aaaa";

                        //// Fin MAJ \\\\

                        // on renvoie tout

                        StreamWriter writer = new StreamWriter(@"C:\SkillProject\Preferences_SkillProject.txt");

                        foreach (var item in listeElement)
                        {
                            writer.WriteLine(item);
                        }
                        writer.Close();
                    }

                    Application.Restart();
                }
            }
        }
Example #13
0
        private void FormParametre_Load(object sender, EventArgs e)
        {
            LangueElement            = Fonction.LangageAppli();
            this.Text                = LangueElement[108];
            lblTitreSuggestion.Text  = LangueElement[108];
            lblTransparence.Text     = LangueElement[109];
            label3.Text              = LangueElement[110];
            lblMessageBox.Text       = LangueElement[111];
            cbBoiteMessagesOui.Text  = LangueElement[112];
            cbBoiteMessagesNon.Text  = LangueElement[113];
            lblInfoPolice.Text       = LangueElement[114];
            lblRedemRequis3.Text     = LangueElement[115];
            label4.Text              = LangueElement[116];
            label5.Text              = LangueElement[117];
            label2.Text              = LangueElement[118];
            label1.Text              = LangueElement[119];
            cbTutorielOui.Text       = LangueElement[112];
            cbTutorielNon.Text       = LangueElement[113];
            cbInfoDefilantesOui.Text = LangueElement[112];
            cbInfoDefilantesNon.Text = LangueElement[113];


            string[] lines = Fonction.lireFichier();

            test           = lines[0].ToString();
            test1          = lines[1].ToString();
            lblPolice.Text = lines[2].ToString();
            test2          = lines[3].ToString();
            test4          = lines[4].ToString();
            test3          = lines[5].ToString();

            combobLangue.Items.Clear();

            if (test4 == "Francais")
            {
                combobLangue.Items.Add("Francais");
                combobLangue.Items.Add("Anglais");

                combobLangue.Text = test4;
            }
            else
            {
                combobLangue.Items.Add("French");
                combobLangue.Items.Add("English");

                combobLangue.Text = "English";
            }

            Opacity           = Convert.ToDouble(test);
            hScrollBar1.Value = Convert.ToInt32(Opacity * 100);

            if (test1.ToString() == "True")
            {
                cbBoiteMessagesNon.Checked = false;
                cbBoiteMessagesOui.Checked = true;
            }
            else
            {
                cbBoiteMessagesOui.Checked = false;
                cbBoiteMessagesNon.Checked = true;
            }

            if (test2.ToString() == "True")
            {
                cbInfoDefilantesNon.Checked = false;
                cbInfoDefilantesOui.Checked = true;
            }
            else
            {
                cbInfoDefilantesOui.Checked = false;
                cbInfoDefilantesNon.Checked = true;
            }

            if (test3.ToString() == "True")
            {
                CbTutorielNon.Checked = false;
                CbTutorielOui.Checked = true;
            }
            else
            {
                CbTutorielOui.Checked = false;
                CbTutorielNon.Checked = true;
            }

            Fonction.policeTexte(this); // Gestion police
        }