コード例 #1
0
 public static frmHomePage GetInstance()
 {
     if (frmMainPage == null)
     {
         frmMainPage = new frmHomePage();
     }
     return(frmMainPage);
 }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: RockJiang1/HouseSelection
        private void picMenuSub1_Click(object sender, EventArgs e)
        {
            frmHomePage childForm = frmHomePage.GetInstance();

            childForm.MdiParent = this;
            childForm.Parent    = splitContainer.Panel2;

            childForm.WindowState = FormWindowState.Normal;
            childForm.Dock        = DockStyle.Fill;
            childForm.Size        = new Size(splitContainer.Width - splitContainer.SplitterDistance, splitContainer.Height);
            childForm.BringToFront();
            childForm.Show();
        }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: RockJiang1/HouseSelection
        private void SetHomePage()
        {
            frmHomePage childForm = frmHomePage.GetInstance();

            childForm.MdiParent = this;
            childForm.Parent    = splitContainer.Panel2;

            childForm.WindowState = FormWindowState.Normal;
            childForm.Dock        = DockStyle.Fill;
            childForm.Size        = new Size(splitContainer.Width - splitContainer.SplitterDistance, splitContainer.Height);
            childForm.BringToFront();
            childForm.Show();
            //ShowChildForm<frmHomePage>();
        }