From 01c17e63a6d26085b6db1e188ea3bac3b9e26b30 Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期三, 06 十一月 2024 09:30:41 +0800 Subject: [PATCH] 修改TreeView颜色 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs | 110 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 99 insertions(+), 11 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs index 883461e..bcbc1c2 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs @@ -1,4 +1,4 @@ -锘� +锘� using System; using System.Collections.Generic; using System.Windows.Forms; @@ -6,20 +6,38 @@ using System.Text; using System.Drawing; using HydrEngineCSharp; +using DPumpHydr.WinFrmUI.RLT.Native; +using DPumpHydr.WinFrmUI.RLT.Docking.Crown; +using DPumpHydr.WinFrmUI.Volute.TempCtrl; +using static DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper; namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage : System.Windows.Forms.UserControl { + ParasInfoDockPanel _parasDockPanel = null; + LogListDockPanel _logListDockPanel = null; + LayersDockPanel _layersDockPanel = null; public MainViewPage() { InitializeComponent(); //InitWindow(); + 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); + + + + ThemeProvider.Theme.Colors.HeaderBackground = Color.SteelBlue; + ThemeProvider.Theme.Colors.GreyBackground = Color.White; + //ThemeProvider.Theme.Colors.DarkBackground = Color.White; } @@ -30,27 +48,97 @@ { InitialRibbonForm(); - //InitialStepNodes(); + - InitialOcccCtrl(); + _logListDockPanel = new LogListDockPanel(); + _logListDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom; - // SetParasCtrl(Step_ID_Hdr_Base_Info); + _parasDockPanel = new ParasInfoDockPanel(); + _parasDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Right; - // _currentStepID = Step_ID_Hdr_Base_Info; + _layersDockPanel = new LayersDockPanel(); + _layersDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Left; + + _stepTreeDockPanel = new StepTreeDockPanel(); + _stepTreeDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Left; + this._stepTreeDockPanel.BeforeSelectedNodeChangedEvent += (arg1, arg2) => + { + if (arg1 != null && SaveStepParas(arg1.ID) == false) + { + return false; + } + + return true; + }; + + this._stepTreeDockPanel.AfterSelectedNodeChangedEvent += (arg1, arg2) => + { + // + if (arg2 != null) + { + this.SetParasCtrl(arg2.ID); + + + + // + this._stepTreeDockPanel.SetFocusedNode(arg2.ID); + } + + CheckStepBtnStatus(); + + return true; + }; + + + MainDockPanel.AddContent(_logListDockPanel); + MainDockPanel.AddContent(_parasDockPanel); + MainDockPanel.AddContent(_layersDockPanel); + MainDockPanel.AddContent(_stepTreeDockPanel); + + MainDockPanel.AddContent(_stepTreeDockPanel, _layersDockPanel.DockGroup); + + + RBtn鍚庨��.Enabled = false; + Rbtn鍓嶈繘.Enabled = true; + Rbtn涓嬩竴姝�.Enabled = true; + Rbtn涓婁竴姝�.Enabled = false; + Rbtn瀹屾垚.Enabled = false; + + this._occDesign3dCtrl = new OccDesignCtrlDockPanel(); + this._occDesign3dCtrl.Size = new System.Drawing.Size(1000, 1000); + this._occDesign3dCtrl.Name = "OccDesignCtrl"; + this._occDesign3dCtrl.Dock = DockStyle.Fill; + this._occDesign3dCtrl.DockText = "涓夌淮璁捐"; + this._occDesign3dCtrl.Initial(true); + + this._occDesign2dCtrl = new OccDesignCtrlDockPanel(); + this._occDesign2dCtrl.Size = new System.Drawing.Size(1000, 1000); + this._occDesign2dCtrl.Name = "OccDesignCtrl"; + this._occDesign2dCtrl.Dock = DockStyle.Fill; + this._occDesign2dCtrl.DockText = "浜岀淮瑙嗗浘"; + this._occDesign2dCtrl.Initial(false ); + + + MainDockPanel.AddContent(_occDesign2dCtrl); + MainDockPanel.AddContent(_occDesign3dCtrl); + + InitialStepNodes(); + } #region 姝ラ鎿嶄綔 //椤甸潰璺宠浆鍓� - bool stepTreeListCtrl1_BeforeStepNodeChangedEvent(DPumpHydr.WinFrmUI.Volute.TreeStepNode CurrentStepNode, DPumpHydr.WinFrmUI.Volute.TreeStepNode NextStepNode) + bool stepTreeListCtrl1_BeforeStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode, + DPumpHydr.WinFrmUI.Base.StepTreeNodePara NextStepNode) { return true; } //椤甸潰璺宠浆鍚� - void stepTreeListCtrl1_SelectedStepNodeChangedEvent(DPumpHydr.WinFrmUI.Volute.TreeStepNode BeforeStepNode, - DPumpHydr.WinFrmUI.Volute.TreeStepNode CurrentStepNode) + void stepTreeListCtrl1_SelectedStepNodeChangedEvent(DPumpHydr.WinFrmUI.Base.StepTreeNodePara BeforeStepNode, + DPumpHydr.WinFrmUI.Base.StepTreeNodePara CurrentStepNode) { //if (CurrentStepNode.Name == "StepHydParas") //{ @@ -72,13 +160,13 @@ - + protected string GetTranslateString(string text) { return text; } - + } } -- Gitblit v1.9.3