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; } } } } }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { #region Mot de passe Admin string value = ""; string mdp = "8g78HyETNq2g"; #endregion if (nb8 != 0) { FormAjout FA = new FormAjout(indice13, indice14, indice15, indice16, indice17, indice18, indice19); FA.MdiParent = this; FA.Show(); //MyMenu.Enabled = false; MyMenu.Items[0].Enabled = false; MyMenu.Items[1].Enabled = false; MyMenu.Items[2].Enabled = false; } else { if (toolStripMenuItem1.Text == "Ajouter") { 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 = this; FM.Show(); //MyMenu.Enabled = false; MyMenu.Items[0].Enabled = false; MyMenu.Items[1].Enabled = false; MyMenu.Items[2].Enabled = false; } else if (test == DialogResult.OK) { if (value == mdp) { FormAjout FA = new FormAjout(indice13, indice14, indice15, indice16, indice17, indice18, indice19); FA.MdiParent = this; FA.Show(); //MyMenu.Enabled = false; MyMenu.Items[0].Enabled = false; MyMenu.Items[1].Enabled = false; MyMenu.Items[2].Enabled = false; nb8 = 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.\n\n/!/ Utilisez les bons caractères spéciaux des tags de guilde et joueurs svp. /!/", "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 (toolStripMenuItem1.Text == "Add") { 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.\n\n/!/ Use the right special characters guild tags and players please. /!/", "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; } } } } }