Ejemplo n.º 1
0
        public Form_Main()
        {
            InitializeComponent();

            frm5 = new Form_DataShow();
            //赋值四个方向停靠比例
            dockPanel1.DockBottomPortion = mySettings.dockPanelBottomPortion;
            dockPanel1.DockTopPortion    = mySettings.dockPanelTopPortion;
            dockPanel1.DockLeftPortion   = mySettings.dockPanelLeftPortion;
            dockPanel1.DockRightPortion  = mySettings.dockPanelRightPortion;

            //-----------
            //frm5.Show(dockPanel1);
            //frm5.DockTo(dockPanel1, DockStyle.Top);

            frm5.AutoHidePortion = mySettings.frm5AutoDockPortion;//赋值自动隐藏比例
            if (mySettings.frm5DockState != DockState.Hidden)
            {
                frm5.Show(dockPanel1, mySettings.frm5DockState == DockState.Unknown ? DockState.DockTop : mySettings.frm5DockState); //显示窗体
            }

            //-----------

            frm2.AutoHidePortion = mySettings.frm2AutoDockPortion;//赋值自动隐藏比例
            if (mySettings.frm2DockState != DockState.Hidden)
            {
                frm2.Show(dockPanel1, mySettings.frm2DockState == DockState.Unknown ? DockState.DockRightAutoHide : mySettings.frm2DockState); //显示窗体
            }
            //-----------

            frm3.AutoHidePortion = mySettings.frm3AutoDockPortion;//赋值自动隐藏比例
            if (mySettings.frm3DockState != DockState.Hidden)
            {
                frm3.Show(dockPanel1, mySettings.frm3DockState == DockState.Unknown ? DockState.DockLeftAutoHide : mySettings.frm3DockState); //显示窗体
            }

            //-----------

            //frm5.AutoHidePortion = mySettings.frm5AutoDockPortion;//赋值自动隐藏比例

            //if (mySettings.frm5DockState != DockState.Hidden)
            //{
            //    frm5.Show(dockPanel1, mySettings.frm5DockState == DockState.Unknown ? DockState.DockBottom : mySettings.frm5DockState); //显示窗体
            //    frm5.Show(dockPanel1, DockState.Float);
            //}
            //#region 显示实验
            //frm2.Show(dockPanel1,DockState.DockRight);
            ////frm5.;
            //frm5.Show(dockPanel1,DockState.DockTop);
            //frm3.Show(dockPanel1);
            //frm3.DockTo(dockPanel1, DockStyle.Left);

            ////frm5.DockTo(dockPanel1, DockStyle.Top);
            ////frm2.Show(dockPanel1);
            ////frm2.DockTo(dockPanel1, DockStyle.Right);
            //#endregion
        }
Ejemplo n.º 2
0
 //-----------------------------------------------
 //显示数据显示界面
 //-----------------------------------------------
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     if (frm5 == null || frm5.IsDisposed)
     {
         frm5 = new Form_DataShow();
         frm5.Show(dockPanel1, DockState.DockTop);
     }
     else
     {
         frm5.Activate();
     }
 }