private Workbench() { // restore form location from last session FormLocationHelper.Apply(this, "StartupFormPosition", true); dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); dockPanel.DocumentStyle = DocumentStyle.SystemMdi; var formOne = new FormOne(); formOne.Text = "测试1"; formOne.Dock = DockStyle.Fill; formOne.Show(dockPanel, DockState.DockLeft); var formTwo = new FormOne(); formTwo.Text = "测试2"; formTwo.Dock = DockStyle.Fill; formTwo.Show(dockPanel, DockState.DockRight); dockPanel.Dock = DockStyle.Fill; dockPanel.ResumeLayout(true, true); this.Controls.Add(dockPanel); Application.Idle += OnApplicationIdle; }
private Workbench() { // restore form location from last session FormLocationHelper.Apply(this, "StartupFormPosition", true); dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); dockPanel.DocumentStyle = DocumentStyle.SystemMdi; var formOne = new FormOne(); formOne.Text = "测试1"; formOne.Dock=DockStyle.Fill; formOne.Show(dockPanel, DockState.DockLeft); var formTwo = new FormOne(); formTwo.Text = "测试2"; formTwo.Dock = DockStyle.Fill; formTwo.Show(dockPanel, DockState.DockRight); dockPanel.Dock=DockStyle.Fill; dockPanel.ResumeLayout(true, true); this.Controls.Add(dockPanel); Application.Idle += OnApplicationIdle; }