From b0de14c2670b9ff0079dacfb4b7457b438368f11 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期四, 27 三月 2025 10:17:53 +0800 Subject: [PATCH] 添加导出直线圆弧数据 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs | 169 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 149 insertions(+), 20 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs index 883461e..5283aa9 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage.cs @@ -1,56 +1,185 @@ -锘� -using System; +锘縰sing System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; using System.Text; -using System.Drawing; -using HydrEngineCSharp; +using System.Drawing; +using DPumpHydr.WinFrmUI.RLT.Native; namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage : System.Windows.Forms.UserControl { + ParasInfoDockPanel _parasDockPanel = null; + LogListDockPanel _logListDockPanel = null; + LayersDockPanel _layersDockPanel = null; + SectAreaDockPanel _sectAreaDockPanel = null; + + OccDesign3DCtrl _occDesign3dCtrl; + OccDesign2DCtrl _occDesign2dCtrl; + DesignMainDockPanel _designMainDockPanel; + + ctrlThicknessParas _ctrlThicknessParas = null; + + private double _bodyThickness = 0; + 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); - - + 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 = 335; + MainDockPanel.BottomDockHeight = 210; } - - - - + + /// <summary> + /// + /// </summary> public void InitWindow() { InitialRibbonForm(); - //InitialStepNodes(); - InitialOcccCtrl(); - // SetParasCtrl(Step_ID_Hdr_Base_Info); + _logListDockPanel = new LogListDockPanel(); + _logListDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom; - // _currentStepID = Step_ID_Hdr_Base_Info; + _sectAreaDockPanel = new SectAreaDockPanel(); + _sectAreaDockPanel.DefaultDockArea = DPumpHydr.WinFrmUI.RLT.Enum.Crown.DockArea.Bottom; + _sectAreaDockPanel.OnRefreshSingleSectArea += (sect_index , sect_area) => + { + 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(); + _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.ChangeStep(arg1.ID, arg2.ID); + } + + return true; + }; + + MainDockPanel.AddContent(_sectAreaDockPanel); + MainDockPanel.AddContent(_logListDockPanel); + + + MainDockPanel.AddContent(_parasDockPanel); + MainDockPanel.AddContent(_layersDockPanel); + MainDockPanel.AddContent(_stepTreeDockPanel); + + MainDockPanel.AddContent( _logListDockPanel, _sectAreaDockPanel.DockGroup); + MainDockPanel.AddContent(_layersDockPanel, _stepTreeDockPanel.DockGroup); + + RBtn鍚庨��.Enabled = false; + Rbtn鍓嶈繘.Enabled = true; + + Rbtn涓嬩竴姝�.Enabled = true; + Rbtn涓婁竴姝�.Enabled = false; + Rbtn瀹屾垚.Enabled = false; + + + InitialDesginPanel(); + + + if (_ctrlHdrBaseInfo == null) + { + _ctrlHdrBaseInfo = new ctrlHdrBaseInfo(); + _ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo"; + _ctrlHdrBaseInfo.Dock = DockStyle.Right; + _ctrlHdrBaseInfo.InitialParas(); + _ctrlHdrBaseInfo.OnNextStep += () => + { + GoNextStep(); + }; + } + + this.DockStepParaCtrl(_ctrlHdrBaseInfo); + + + //// 鍒濆鍖栨楠ゅ垪琛� + this._stepTreeDockPanel.InitialStepNodes(); + } + /// <summary> + /// + /// </summary> + 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 姝ラ鎿嶄綔 //椤甸潰璺宠浆鍓� - 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 +201,13 @@ - + protected string GetTranslateString(string text) { return text; } - + } } -- Gitblit v1.9.3