コード例 #1
0
        private void admissionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AdmissionForm admission_form = new AdmissionForm();

            AdmissionForm childForm = null;

            foreach (Form f in this.MdiChildren)
            {
                if (f is AdmissionForm)
                {
                    childForm = (AdmissionForm)f;
                    break;
                }
            }

            if (childForm != null)
            {
                childForm.Show();
                childForm.Focus();
                MessageBox.Show("Fenêtre \"" + childForm.Text + "\" déjà ouverte.");
            }
            else
            {
                childForm           = new AdmissionForm();
                childForm.MdiParent = this;
                childForm.Show();
                childForm.Focus();
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: ajorion/gestion_usagers
        private void admissionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AdmissionForm admission_form = new AdmissionForm();

            AdmissionForm childForm = null;

            foreach (Form f in this.MdiChildren)
            {
                if (f is AdmissionForm)
                {
                    childForm = (AdmissionForm)f;
                    break;
                }
            }

            if (childForm != null)
            {
                childForm.Show();
                childForm.Focus();
                MessageBox.Show("Fenêtre \"" + childForm.Text + "\" déjà ouverte.");
            }
            else
            {
                childForm = new AdmissionForm();
                childForm.MdiParent = this;
                childForm.Show();
                childForm.Focus();
            }
        }