Exemplo n.º 1
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            frmNewComparision frm = new frmNewComparision();

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.OK)
            {
                // calculator time

                foreach (Form frmChild in this.MdiChildren)
                {
                    frmChild.Dispose();
                }

                // run compare
                // old form
                //frmCompareDB childForm = new frmCompareDB();
                // new form
                frmCompareTree childForm = new frmCompareTree();
                // Make it a child of this MDI form before showing it.
                childForm.ConnectionStringLeft  = frm.ConnectionStringLeft;
                childForm.ConnectionStringRight = frm.ConnectionStringRight;
                childForm.MdiParent             = this;
                childForm.WindowState           = FormWindowState.Maximized;
                childForm.Show();
            }
        }
Exemplo n.º 2
0
        private void MDIParent_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            // run db form
            frmNewComparision frm = new frmNewComparision();

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.OK)
            {
                // old form
                //frmCompareDB childForm = new frmCompareDB();
                // new form
                frmCompareTree childForm = new frmCompareTree();
                // Make it a child of this MDI form before showing it.
                childForm.ConnectionStringLeft  = frm.ConnectionStringLeft;
                childForm.ConnectionStringRight = frm.ConnectionStringRight;
                childForm.MdiParent             = this;
                childForm.WindowState           = FormWindowState.Maximized;
                childForm.Show();
            }
        }