From c8552b21551b7fccd19e5dac28c05092fcde29cb Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期四, 13 二月 2025 17:40:23 +0800 Subject: [PATCH] 优化导入XML --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs | 112 +++++++++++++++++++++++++++++++------------------------ 1 files changed, 63 insertions(+), 49 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs index e153649..cfe2b99 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs @@ -1,15 +1,10 @@ -锘� -using System; +锘縰sing System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; 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; +using System.Drawing; +using DPumpHydr.WinFrmUI.RLT.Native; namespace DPumpHydr.WinFrmUI.Volute { @@ -20,22 +15,18 @@ LayersDockPanel _layersDockPanel = null; SectAreaDockPanel _sectAreaDockPanel = null; - //鍙傛暟鎺т欢 - ctrlHdrBaseInfo _ctrlHdrBaseInfo = null; - ctrlGeomBaseInfo _ctrlGeomBaseInfo = null; - ctrlSectionBundleInfo _ctrlSectionBundleInfo = null; - ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null; - ctrlSetOutflowParas _ctrlSetOutflowStyle = null; - ctrlSetOutflowType _ctrlSetOutflowType = null; + OccDesign3DCtrl _occDesign3dCtrl; + OccDesign2DCtrl _occDesign2dCtrl; + DesignMainDockPanel _designMainDockPanel; - //鍙傛暟 - ViewModel.HdrBaseInfo _hdrBaseInfo = null; - ViewModel.GeomBaseInfo _geomBaseInfo = null; - ViewModel.SectionBundleInfo _sectionBundleInfo = null; - ViewModel.OtuflowParas _otuflowParas = null; - ViewModel.eOutflowStyle _outflowType = ViewModel.eOutflowStyle.鏈煡; + ctrlThicknessParas _ctrlThicknessParas = null; + + + + + private double _bodyThickness = 0; public MainViewPage() { @@ -54,40 +45,40 @@ - ThemeProvider.Theme.Colors.HeaderBackground = Color.SteelBlue; - ThemeProvider.Theme.Colors.GreyBackground = Color.White; + DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper.ThemeProvider.Theme.Colors.HeaderBackground = Color.SteelBlue; + DPumpHydr.WinFrmUI.RLT.Helper.CrownHelper.ThemeProvider.Theme.Colors.GreyBackground = Color.White; //ThemeProvider.Theme.Colors.DarkBackground = Color.White; - MainDockPanel.RightDockWidth = 320; + MainDockPanel.RightDockWidth = 335; MainDockPanel.BottomDockHeight = 210; } - + public void InitWindow() { InitialRibbonForm(); - + _logListDockPanel = new LogListDockPanel(); _logListDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom; _sectAreaDockPanel = new SectAreaDockPanel(); _sectAreaDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom; - _sectAreaDockPanel.OnRefreshSingleSectBundle += (bundle , selectedPointIndex) => + _sectAreaDockPanel.OnRefreshSingleSectArea += (sect_index , sect_area) => { - - this._ctrlSectionBundleInfo.RefreshSectPara(bundle, selectedPointIndex); - if(this._stepTreeDockPanel.CurrentStepID > this._stepTreeDockPanel.Step_ID_Section18_Full) - { - this._ctrlSectionShapeInfo18.RefreshSectPara(bundle.ToSectionShapePara(selectedPointIndex)); - } + this._ctrlSectionBundleInfo.RefreshSingleSectArea(sect_index, sect_area); + //if(this._stepTreeDockPanel.CurrentStepID > this._stepTreeDockPanel.Step_ID_Section18_Full) + //{ + // this._ctrlSectionShapeInfo18.RefreshSectPara(bundle.ToSectionShapePara(selectedPointIndex)); + //} }; _parasDockPanel = new ParasInfoDockPanel(); _parasDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Right; + _layersDockPanel = new LayersDockPanel(); _layersDockPanel.InitialInfo(); @@ -96,12 +87,12 @@ _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; - } - + { + //if (arg1 != null && SaveStepParas(arg1.ID) == false) + //{ + // return false; + //} + return true; }; @@ -109,11 +100,10 @@ { // if (arg2 != null) - { - this.SetParasCtrl(arg2.ID); - - - + { + this.SetParasCtrl(arg1.ID, arg2.ID ); + + // this._stepTreeDockPanel.SetFocusedNode(arg2.ID); } @@ -123,16 +113,16 @@ return true; }; - - MainDockPanel.AddContent(_logListDockPanel); MainDockPanel.AddContent(_sectAreaDockPanel); + MainDockPanel.AddContent(_logListDockPanel); + MainDockPanel.AddContent(_parasDockPanel); MainDockPanel.AddContent(_layersDockPanel); MainDockPanel.AddContent(_stepTreeDockPanel); - - MainDockPanel.AddContent(_stepTreeDockPanel, _layersDockPanel.DockGroup); - MainDockPanel.AddContent(_sectAreaDockPanel, _logListDockPanel.DockGroup); + + MainDockPanel.AddContent( _logListDockPanel, _sectAreaDockPanel.DockGroup); + MainDockPanel.AddContent(_layersDockPanel, _stepTreeDockPanel.DockGroup); RBtn鍚庨��.Enabled = false; Rbtn鍓嶈繘.Enabled = true; @@ -149,6 +139,30 @@ InitialStepNodes(); } + private void InitialDesginPanel() + { + this._occDesign3dCtrl = new OccDesign3DCtrl(); + this._occDesign3dCtrl.Size = new System.Drawing.Size(1000, 1000); + this._occDesign3dCtrl.Name = "OccDesignCtrl3d"; + this._occDesign3dCtrl.Dock = DockStyle.Fill; + this._occDesign3dCtrl.Initial(); + + this._occDesign2dCtrl = new OccDesign2DCtrl(); + this._occDesign2dCtrl.Size = new System.Drawing.Size(1000, 1000); + this._occDesign2dCtrl.Name = "OccDesignCtrl2d"; + this._occDesign2dCtrl.Dock = DockStyle.Fill; + this._occDesign2dCtrl.Initial(); + + this._designMainDockPanel = new DesignMainDockPanel(); + this._designMainDockPanel.Size = new System.Drawing.Size(1000, 1000); + this._designMainDockPanel.Name = "OccDesignCtrl"; + this._designMainDockPanel.Dock = DockStyle.Fill; + this._designMainDockPanel.DockText = "璁捐瑙嗗浘"; + _designMainDockPanel.SetOccCtrl(_occDesign3dCtrl, _occDesign2dCtrl); + + MainDockPanel.AddContent(_designMainDockPanel); + + } #region 姝ラ鎿嶄綔 -- Gitblit v1.9.3