Beispiel #1
0
        private void btnajouter_Click(object sender, EventArgs e)
        {
            FormMenu FM = new FormMenu();

            //FFID.MdiParent = this;
            this.Hide();
            FM.Show();

            // menuStrip1.Enabled = false;
        }
Beispiel #2
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();
        }
Beispiel #3
0
        private void boutonmodifier_Click(object sender, EventArgs e)
        {
            #region Mot de passe Admin
            string value = "";
            string mdp   = "8g78HyETNq2g";
            #endregion

            FormMenu te = (FormMenu)this.MdiParent;

            if (te.nb8 != 0)
            {
                FormAjout FA = new FormAjout(indice13, indice14, indice15, indice16, indice17, indice18, indice19);
                FA.MdiParent = (FormMenu)this.MdiParent;
                FA.Show();
                this.Close();
            }
            else
            {
                if (lblid.Text == "Veuillez entrer l'ID du joueur :")
                {
                    DialogResult test = InputBox("Vérification", "Entrez le mot de passe :", ref value);

                    if (test == DialogResult.Abort)
                    {
                        FormMail FM = new FormMail(indice29, indice30, indice31, indice32, indice33, indice34);
                        FM.MdiParent = (FormMenu)this.MdiParent;
                        FM.Show();
                        this.Close();
                    }
                    else if (test == DialogResult.OK)
                    {
                        if (value == mdp)
                        {
                            FormAjout FA = new FormAjout(indice13, indice14, indice15, indice16, indice17, indice18, indice19);
                            FA.MdiParent = (FormMenu)this.MdiParent;
                            FA.Show();
                            this.Close();

                            te.nb8 = te.nb8 + 1;

                            MessageBox.Show("Pour les joueurs ayant plusieurs pseudonymes et/ou tag, veuillez les ajouter du plus ancien au plus récent svp, merci.", "Instruction", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        }
                        else
                        {
                            MessageBox.Show("Vous n'avez pas la permission d'ajouter ou de modifier un joueur. \r\nSi vous souhaitez acquérir cette permission : \r\n\r\nDemander directement le mot de passe, si vous me connaissez. \r\n\r\nOU\r\n\r\nDemander par mail, je vous enverrai votre mot de passe.", "Erreur !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }
                    }
                }
                else if (lblid.Text == "Please enter the Player ID :")
                {
                    DialogResult test = InputBox2("Checking", "Enter password :"******"For players with many pseudonyms and / or tag, please add them from oldest to most recent please, thank you.", "Instruction", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        }
                        else
                        {
                            MessageBox.Show("You do not have permission to add or modify a player. \r\nIf you want to have this permission : \r\n\r\nRequest the password directly, if you know me. \r\n\r\nOR\r\n\r\nRequest by email, I will send you your password.", "Erreur !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }
                    }
                }
            }
        }