From 9cc5bf68aaab46f33f2b00f8dcef0ab52ced0c41 Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期五, 27 十二月 2024 10:17:12 +0800 Subject: [PATCH] 添加出口口径初始化 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs | 81 +++++++++++++++++----------------------- 1 files changed, 34 insertions(+), 47 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs index 9365df7..280b40a 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs @@ -12,19 +12,10 @@ //姝ラ鎺т欢 StepTreeDockPanel _stepTreeDockPanel = null; - //鍙傛暟鎺т欢 - ctrlHdrBaseInfo _ctrlHdrBaseInfo = null; - ctrlGeomBaseInfo _ctrlGeomBaseInfo = null; - ctrlSectionBundleInfo _ctrlSectionBundleInfo = null; - ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null; - ctrlSetOutflowStyle _ctrlSetOutflowStyle = null; - ctrlSetOutflowType _ctrlSetOutflowType = null; - //鍙傛暟 - ViewModel.HdrBaseInfo _hdrBaseInfo = null; - ViewModel.GeomBaseInfo _geomBaseInfo = null; - ViewModel.SectionBundleInfo _sectionBundleInfo = null; - + + + /// <summary> /// 涓嬩竴姝� @@ -223,7 +214,8 @@ _ctrlHdrBaseInfo.SetBindingData(_hdrBaseInfo); - AddStepParaCtrl(_ctrlHdrBaseInfo); + AddStepParaCtrl(_ctrlHdrBaseInfo); + this._sectAreaDockPanel.Visible = false; } //绗簩姝� @@ -236,9 +228,10 @@ } _ctrlGeomBaseInfo.SetBindingData(_geomBaseInfo); AddStepParaCtrl(_ctrlGeomBaseInfo); + this._sectAreaDockPanel.Visible = false; } - //绗笁姝� + //绗笁姝� 鏂潰鎬昏 if (step_id == this._stepTreeDockPanel.Step_ID_Section18_Full) { if (_ctrlSectionBundleInfo == null) @@ -251,9 +244,11 @@ _ctrlSectionBundleInfo.InitialParas(_hdrBaseInfo, _geomBaseInfo); _ctrlSectionBundleInfo.SetBindingData(_sectionBundleInfo); RefreshSectShapeWhole18(_sectionBundleInfo); + this._sectAreaDockPanel.RefreshControl(); + this._sectAreaDockPanel.Visible = true; } - //绗洓姝� + //绗洓姝� 1-8鏂潰 if (step_id > this._stepTreeDockPanel.Step_ID_Section18_Grp && step_id <= this._stepTreeDockPanel.Step_ID_Section18_Grp + 8) { @@ -268,10 +263,13 @@ AddStepParaCtrl(_ctrlSectionShapeInfo18); var sect_index = 9 + this._stepTreeDockPanel.Step_ID_Section18_Grp - step_id; var shape_info = _sectionBundleInfo.ToSectionShapePara((int)sect_index); - + RefreshSectShapeSingle18(shape_info); _ctrlSectionShapeInfo18.SetBindingData(shape_info); + this._sectAreaDockPanel.RefreshControl(); + this._sectAreaDockPanel.Visible = true; } + //鍑烘按闈㈢被鍨嬮�夋嫨 if (step_id == this._stepTreeDockPanel.Step_ID_Outflow_Type) { if (_ctrlSetOutflowType == null) @@ -279,28 +277,40 @@ _ctrlSetOutflowType = new ctrlSetOutflowType(); _ctrlSetOutflowType.Name = "ctrlSetOutflowDim"; } + this._sectAreaDockPanel.Visible = true; + this._sectAreaDockPanel.RefreshControl(); AddStepParaCtrl(_ctrlSetOutflowType); } + //鍑烘按闈㈠弬鏁� if (step_id == this._stepTreeDockPanel.Step_ID_Outflow_Style) { + _outflowType = _ctrlSetOutflowType.GetBindingData(); if (_ctrlSetOutflowStyle == null) { - _ctrlSetOutflowStyle = new ctrlSetOutflowStyle(); + _ctrlSetOutflowStyle = new ctrlSetOutflowParas(); _ctrlSetOutflowStyle.Name = "ctrlSetOutflowStyle"; - - var pt = _occDesign2dCtrl.CreateOutflowBody(); - if(pt != null) - { - _occDesign3dCtrl.CreateOutflowBody(pt); - } + _ctrlSetOutflowStyle.OnRefreshShape += CreateWaterBody; + _ctrlSetOutflowStyle.InitialParas(_outflowType, _hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo); } + + _ctrlSetOutflowStyle.SetOutflowStyle(_outflowType); + + _ctrlSetOutflowStyle.ShowPage(); + this._sectAreaDockPanel.RefreshControl(); + this._sectAreaDockPanel.Visible = true; AddStepParaCtrl(_ctrlSetOutflowStyle); + string error = ""; + _otuflowParas = _ctrlSetOutflowStyle.GetBindingData(out error); } + if (step_id == this._stepTreeDockPanel.Step_ID_jiahout) + { + this._occDesign3dCtrl.CreateOutletBody3d(); + } } - + /// <summary> @@ -344,29 +354,6 @@ this._parasDockPanel.Controls.Clear(); ctrl.Dock = DockStyle.Fill; this._parasDockPanel.Controls.Add(ctrl); - } - /// <summary> - /// 铚楀3鍙傛暟瀵煎嚭 - /// </summary> - public void VoluteDeriveArgument() - { - //if (_sectionBaseInfo == null) - //{ - // MessageBox.Show("鎮ㄨ繕娌℃湁瀹屾垚瀹氫箟鍙傛暟锛佽瀹氫箟瀹屾垚鍚庡湪杩涜瀵煎嚭锛侊紙鑷冲皯瀹屾垚绗笁姝ワ級"); - // return; - //} - //if (_currentStepID <= 21) - //{ - // DialogResult result = MessageBox.Show("纭畾涓嶈繘琛屽悗缁柇闈㈠弬鏁扮殑璋冩暣锛屼娇鐢ㄥ垵濮嬭绠楀悗鐨勫弬鏁板悧锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); - // if (result == DialogResult.Cancel) - // { - // return; - // } - //} - //ViewModel.SectionShapePara VoluteArgument = new ViewModel.SectionShapePara(); - //string json = VoluteArgument.DeriveArgument(_sectionBaseInfo); - //string filePath = Path.Combine(@"C:\Users\THL\Desktop", $"铚楀3鍙傛暟.json"); - //File.WriteAllText(filePath, json); } #region 鍒濆鍖栨楠ゅ垪琛� -- Gitblit v1.9.3