private void quitterToolStripMenuItem_Click(object sender, EventArgs e) { string mdp = Serialization.deserializeMDPAdmin(); if (mdp == null) { MessageBox.Show("mot de passe administrateur introuvable.Veuillez en enregistrer un"); this.configFormThread = new Thread(new ThreadStart(this.initWaitForm)); this.configFormThread.Start(); this.initConfig(); } else { MDPAdminControl MDPAC = new MDPAdminControl(mdp); DialogResult result = MDPAC.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { Log.write("- " + DateTime.Now.ToShortDateString() + " à " + DateTime.Now.ToShortTimeString() + " Fermeture de l'application par l'administrateur"); Application.Exit(); } } }
private void configuraionToolStripMenuItem_Click(object sender, EventArgs e) { string mdp = Serialization.deserializeMDPAdmin(); if (mdp == null) { MessageBox.Show("mot de passe administrateur introuvable.Veuillez en enregistrer un"); this.configFormThread = new Thread(new ThreadStart(this.initWaitForm)); this.configFormThread.Start(); this.initConfig(); } else { MDPAdminControl MDPAC = new MDPAdminControl(mdp); DialogResult result = MDPAC.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { this.configFormThread = new Thread(new ThreadStart(this.initWaitForm)); this.configFormThread.Start(); this.initConfig(); } } }