Ejemplo n.º 1
0
        private void Form1_Shown(object sender, EventArgs e)
        {
            DialConnexion dialForm = new DialConnexion();

            dialForm.MdiParent = this;
            //dialForm.Show();
        }
Ejemplo n.º 2
0
        private void FrmMain_Shown(object sender, EventArgs e)
        {
            DialConnexion DialogueModal = new DialConnexion();
            //  DialogResult resultat = DialogueModal.ShowDialog();
            DialogResult resultat = DialogResult.OK;

            switch (resultat)
            {
            case DialogResult.None:
                DialogueModal.ShowDialog();
                break;

            case DialogResult.OK:
                gestionToolStripMenuItem.Enabled = true;
                break;

            case DialogResult.Cancel:
                DialogueModal.Close();
                Close();
                break;
            }
        }
Ejemplo n.º 3
0
        private void Modal_DialConnection(object sender, EventArgs e)
        {
            DialConnexion oConnection = new DialConnexion();
            //DialogResult oResult = oConnection.ShowDialog();
            //pour sauter connection
            DialogResult oResult = DialogResult.OK;

            switch (oResult)
            {
            case DialogResult.OK:
                MessageBox.Show("Vous êtes connectés", "Etat Connection", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;

            case DialogResult.Cancel:
                Close();
                break;

            case DialogResult.Abort:
                MessageBox.Show("Votre compte est bloqué, veuillez contacter un administrateur", "Compte Bloqué", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Close();
                break;
            }
        }
Ejemplo n.º 4
0
        private void FenetreMere_Load(object sender, EventArgs e)
        {
            DialConnexion connexion = new DialConnexion();
            //DialogResult resultat = connexion.ShowDialog();
            DialogResult resultat = DialogResult.OK;

            switch (resultat)
            {
            case DialogResult.Cancel:
            {
                Close();
            }
            break;

            case DialogResult.OK:
            {
                MessageBox.Show("Vous êtes connecté.", "Connection",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
            break;
            }
        }