コード例 #1
0
ファイル: MDIParent.cs プロジェクト: hoangtan010896/CompareDB
        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();
            }
        }
コード例 #2
0
ファイル: MDIParent.cs プロジェクト: hoangtan010896/CompareDB
        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();
            }
        }