using DPumpHydr.WinFrmUI.RLT.Docking.Crown; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Windows.Forms; namespace DPumpHydr.WinFrmUI.Volute { public partial class dockCtrl测试 : UserControl { private readonly DPumpHydr.WinFrmUI.Volute.TempCtrl.DockProject _dockProject; private readonly DPumpHydr.WinFrmUI.Volute.TempCtrl.DockProperties _dockProperties; private readonly DPumpHydr.WinFrmUI.Volute.TempCtrl.DockConsole _dockConsole; private readonly DPumpHydr.WinFrmUI.Volute.TempCtrl.DockLayers _dockLayers; private readonly DPumpHydr.WinFrmUI.Volute.TempCtrl.DockHistory _dockHistory; public dockCtrl测试() { InitializeComponent(); // Add the control scroll message filter to re-route all mousewheel events // to the control the user is currently hovering over with their cursor. //Application.AddMessageFilter(new ControlScrollFilter()); // Add the dock content drag message filter to handle moving dock content around. Application.AddMessageFilter(MainDockPanel.DockContentDragFilter); // Add the dock panel message filter to filter through for dock panel splitter // input before letting events pass through to the rest of the application. Application.AddMessageFilter(MainDockPanel.DockResizeFilter); //// Hook in all the UI events manually for clarity. //DockPanel.ContentAdded += DockPanel_ContentAdded; //DockPanel.ContentRemoved += DockPanel_ContentRemoved; // Build the tool windows and add them to the dock panel _dockProject = new DPumpHydr.WinFrmUI.Volute.TempCtrl.DockProject(); _dockProject.DockArea = RLT.Enum.Crown.DockArea.Right; _dockProperties = new DPumpHydr.WinFrmUI.Volute.TempCtrl.DockProperties(); _dockProperties.DockArea = RLT.Enum.Crown.DockArea.Right; _dockConsole = new DPumpHydr.WinFrmUI.Volute.TempCtrl.DockConsole(); _dockConsole.DockArea = RLT.Enum.Crown.DockArea.Bottom; _dockLayers = new DPumpHydr.WinFrmUI.Volute.TempCtrl.DockLayers(); _dockLayers.DockArea = RLT.Enum.Crown.DockArea.Right; _dockHistory = new DPumpHydr.WinFrmUI.Volute.TempCtrl.DockHistory(); _dockHistory.DockArea = RLT.Enum.Crown.DockArea.Left; // Add the tool windows to a list // Deserialize if a previous state is stored MainDockPanel.AddContent(_dockConsole); // Add the tool window list contents to the dock panel MainDockPanel.AddContent(_dockProject); MainDockPanel.AddContent(_dockProperties); MainDockPanel.AddContent(_dockLayers); MainDockPanel.AddContent(_dockProperties, _dockProject.DockGroup); MainDockPanel.AddContent(_dockLayers, _dockProject.DockGroup); var dockDoct = new DesignMainDockPanel(); dockDoct.DockText = "abc"; MainDockPanel.AddContent(dockDoct); // Add the history panel to the layer panel group //MainDockPanel.AddContent(_dockHistory, _dockLayers.DockGroup); MainDockPanel.AddContent(_dockHistory); // Add dummy documents to the main document area of the dock panel // DockPanel.AddContent(new DockDocument("Document 1", Properties.Resources.document_16xLG)); // DockPanel.AddContent(new DockDocument("Document 2", Properties.Resources.document_16xLG)); // DockPanel.AddContent(new DockDocument("Document 3", Properties.Resources.document_16xLG)); } private void DockPanel_ContentAdded(object sender, DockContentEventArgs e) { } private void DockPanel_ContentRemoved(object sender, DockContentEventArgs e) { } } }