예제 #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
        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();
            }
        }