Exemple #1
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();
        }
Exemple #2
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;
                }
            }
        }
Exemple #3
0
 private void btnretour_Click(object sender, EventArgs e)
 {
     ClassMySQL.sedeconnecter();
     this.Close();
 }
Exemple #4
0
 private void FormAccueil_FormClosed(object sender, FormClosedEventArgs e)
 {
     ClassMySQL.sedeconnecter();
 }