Exemplo n.º 1
0
        private void FormChiffre_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                if (lblchiffre1.Text == "Des chiffres ?")
                {
                    MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                }
                else if (lblchiffre1.Text == "Numbers ?")
                {
                    MessageBox.Show("Error in the connection to the database.");
                }
                this.Close();
            }

            FormMenu form = (FormMenu)this.MdiParent;

            //MyMenu.Enabled = false;
            form.MyMenu.Items[0].Enabled = false;
            form.MyMenu.Items[1].Enabled = false;
            form.MyMenu.Items[2].Enabled = false;

            charger(DA1, DT1, "SELECT DISTINCT id_player as 'nombre2' FROM player;");

            nbjoueur.Text = DT1.Rows.Count.ToString();

            charger(DA0, DT0, "SELECT id as 'nombre1' FROM player;");

            nbpseudo.Text = DT0.Rows.Count.ToString();
        }
Exemplo n.º 2
0
        private void FormAjout_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                if (lblajoutid.Text == "Ajout/Modification du joueur ID :")
                {
                    MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                }
                else if (lblajoutid.Text == "Add / Change Player ID :")
                {
                    MessageBox.Show("Error in the connection to the database.");
                }
                this.Close();
            }
            if (lblajoutid.Text == "Ajout/Modification du joueur ID :")
            {
                labelerreur.Text = "En cas d'erreur dans l'ajout, cochez la case :";
            }
            else if (lblajoutid.Text == "Add / Change Player ID :")
            {
                labelerreur.Text = "In case of error in the addition, check the box :";
            }

            buttonenvoyer.Enabled = false;
        }
Exemplo n.º 3
0
        private void btnaccueil_Click(object sender, EventArgs e)
        {
            ClassMySQL.sedeconnecter();
            FormMenu form = (FormMenu)this.MdiParent;

            form.MyMenu.Items[0].Enabled = true;
            form.MyMenu.Items[1].Enabled = true;
            form.MyMenu.Items[2].Enabled = true;
            this.Close();
        }
Exemplo n.º 4
0
        public void FormTrouverID_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                if (lblid.Text == "Veuillez entrer l'ID du joueur :")
                {
                    MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                }
                else if (lblid.Text == "Please enter the Player ID :")
                {
                    MessageBox.Show("Error in the connection to the database.");
                }
                this.Close();
            }

            //form ajouter
            if (boutonmodifier.Text == "Modifier ↻")
            {
                indice13 = "Ajout/Modification du joueur ID :";
                indice14 = "Pseudonyme :";
                indice15 = "Tag :";
                indice16 = "Ajouté avec succès √";
                indice17 = "Sans guilde : laisser vide";
                indice18 = "Ajouter";
                indice19 = "Accueil ⇒";

                indice29 = "Entrez votre prénom :";
                indice30 = "Votre adresse mail :";
                indice31 = "Envoyer";
                indice32 = "Envoyé avec succès √";
                indice33 = "Vérifiez votre boîte de récéption.";
                indice34 = "Accueil ⇒";
            }
            else if (boutonmodifier.Text == "Edit ↻")
            {
                indice13 = "Add / Change Player ID :";
                indice14 = "Pseudonym :";
                indice15 = "Tag :";
                indice16 = "Added successfully √";
                indice17 = "Without Guild : leave empty";
                indice18 = "Add";
                indice19 = "Home ⇒";

                indice29 = "Enter your first name :";
                indice30 = "Your email address :";
                indice31 = "Send";
                indice32 = "Successfully sent √";
                indice33 = "Check your mailbox.";
                indice34 = "Home ⇒";
            }
        }
Exemplo n.º 5
0
        private void FormAccueil_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                this.Close();
            }

            charger(DA1, DT1, "SELECT date_maj as 'DateMaj' FROM maj WHERE date_maj = (SELECT MAX(date_maj) FROM maj);");

            // labelmaj.Text = "DateMaj";
            labeldatemaj.Text = DT1.Rows[0]["DateMaj"].ToString();
        }
Exemplo n.º 6
0
        private void FormMail_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                if (lblprenom.Text == "Entrez votre prénom :")
                {
                    MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                }
                else if (lblprenom.Text == "Enter your first name :")
                {
                    MessageBox.Show("Error in the connection to the database.");
                }
                this.Close();
            }


            textBoxprenom.Enabled  = true;
            textBoxmail.Enabled    = true;
            btnenvoyermail.Visible = true;
        }
Exemplo n.º 7
0
        private void quitterToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            DialogResult lol;

            if (quitterToolStripMenuItem1.Text == "Quitter")
            {
                lol = MessageBox.Show("Etes-vous sûr de vouloir quitter ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (lol == DialogResult.Yes)
                {
                    // ecrire_xml();
                    ClassMySQL.sedeconnecter();
                    this.Close();
                    Application.Exit();
                }
                else
                {
                    return;
                }
            }
            else if (quitterToolStripMenuItem1.Text == "Leave")
            {
                lol = MessageBox.Show("Are you sure you want to quit?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (lol == DialogResult.Yes)
                {
                    // ecrire_xml();
                    ClassMySQL.sedeconnecter();
                    this.Close();
                }
                else
                {
                    return;
                }
            }
        }
Exemplo n.º 8
0
 private void btnretour_Click(object sender, EventArgs e)
 {
     ClassMySQL.sedeconnecter();
     this.Close();
 }
Exemplo n.º 9
0
 private void FormAccueil_FormClosed(object sender, FormClosedEventArgs e)
 {
     ClassMySQL.sedeconnecter();
 }
Exemplo n.º 10
0
        private void FormTrouverTag_Load(object sender, EventArgs e)
        {
            ClassMySQL.seconnecter();

            if (ClassMySQL.connopen == false)
            {
                if (lbltag.Text == "Veuillez entrer le Tag du joueur :")
                {
                    MessageBox.Show("Erreur dans la connexion à la base de donnée.");
                }
                else if (lbltag.Text == "Please enter the Player Tag :")
                {
                    MessageBox.Show("Error in the connection to the database.");
                }
                this.Close();
            }

            //form ajouter
            if (boutonmodifier.Text == "Modifier ↻")
            {
                indice13 = "Ajout/Modification du joueur ID :";
                indice14 = "Pseudonyme :";
                indice15 = "Tag :";
                indice16 = "Ajouté avec succès √";
                indice17 = "Sans guilde : laisser vide";
                indice18 = "Ajouter";
                indice19 = "Accueil ⇒";

                indice29 = "Entrez votre prénom :";
                indice30 = "Votre adresse mail :";
                indice31 = "Envoyer";
                indice32 = "Envoyé avec succès √";
                indice33 = "Vérifiez votre boîte de récéption.";
                indice34 = "Accueil ⇒";
            }
            else if (boutonmodifier.Text == "Edit ↻")
            {
                indice13 = "Add / Change Player ID :";
                indice14 = "Pseudonym :";
                indice15 = "Tag :";
                indice16 = "Added successfully √";
                indice17 = "Without Guild : leave empty";
                indice18 = "Add";
                indice19 = "Home ⇒";

                indice29 = "Enter your first name :";
                indice30 = "Your email address :";
                indice31 = "Send";
                indice32 = "Successfully sent √";
                indice33 = "Check your mailbox.";
                indice34 = "Home ⇒";
            }



            // test


            dataGridViewTag.Visible = false;

            comboBoxTag.Items.Clear();

            charger(DA0, DT0, "SELECT DISTINCT tag_player FROM player order by tag_player ASC"); // order by tag_player ASC

            for (int i = 0; i < DT0.Rows.Count; i++)
            {
                comboBoxTag.Items.Add(DT0.Rows[i]["tag_player"].ToString());
            }
        }