From 399c534c415062b08ee5a00fb2c36608f4b3c7ff Mon Sep 17 00:00:00 2001 From: tangxu <tangxu76880903> Date: 星期六, 02 十一月 2024 18:32:06 +0800 Subject: [PATCH] 添加occ控件 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs | 43 ++++++++++++++++++++++++------------------- 1 files changed, 24 insertions(+), 19 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs index ff69fac..b07e29e 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs @@ -1,17 +1,22 @@ -锘� -using System; +锘縰sing System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; using System.Text; using System.Linq; -using DPumpHydr.WinFrmUI.Volute.ViewModel; -using System.Security.Policy; namespace DPumpHydr.WinFrmUI.Volute { public partial class MainViewPage { + // + ctrlHdrBaseInfo _ctrlHdrBaseInfo = null; + ctrlGeomBaseInfo _ctrlGeomBaseInfo = null; + ctrlSectionBaseInfo _ctrlSectionBaseInfo = null; + ctrlSectionShapeInfo18 _ctrlSectionShapeInfo18 = null; + ctrlSetOutflowStyle _ctrlSetOutflowStyle = null; + ctrlSetOutflowDim _ctrlSetOutflowDim = null; + //鍩虹淇℃伅 private readonly string Group_Name_Base_Info = "BaseInfo"; private readonly int Group_ID_Base_Info = -1;//缁処D @@ -60,16 +65,16 @@ ViewModel.SectionBaseInfo _sectionBaseInfo = null; ViewModel.SectionShapePara _sectionShapePara = null; DPumpHydr.WinFrmUI.Volute.TreeStepNode next_step = null; - int index; + int _currentSectIndex; /// <summary> /// 涓嬩竴姝ユ牳蹇� /// </summary> /// <returns></returns> private bool GoNextStepCore() { - if (_currentStepID != Step_ID_Section18_Dim || index>8 || index<=1) + if (_currentStepID != Step_ID_Section18_Dim || _currentSectIndex>8 || _currentSectIndex<=1) { - index = 9; + _currentSectIndex = 9; next_step = (from x in _allStepNodes where x.ID > _currentStepID orderby x.ID @@ -128,12 +133,12 @@ } _sectionBaseInfo = sectionBaseInfo; _sectionBaseInfo.InitialAllParameters(_hdrBaseInfo, _geomBaseInfo); - index--; + _currentSectIndex--; if (_sectionShapePara == null) { _sectionShapePara = new ViewModel.SectionShapePara(); } - _sectionShapePara.Initialparameters(index, _sectionBaseInfo); + _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } //1-8鏂潰杩涜涓嬩竴姝ョ偣鍑� if (_currentStepID == Step_ID_Section18_Dim) @@ -147,12 +152,12 @@ } _sectionShapePara = sectionShapeInfo18; _sectionShapePara.CalcHeightByArea(_sectionBaseInfo.ShapeType); - _sectionBaseInfo.EditSingleShape(_sectionShapePara, index); - if(index != 9) + _sectionBaseInfo.EditSingleShape(_sectionShapePara, _currentSectIndex); + if(_currentSectIndex != 9) { - index--; + _currentSectIndex--; } - _sectionShapePara.Initialparameters(index, _sectionBaseInfo); + _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } SetParasCtrl(next_step.ID); @@ -186,17 +191,17 @@ //} if (_currentStepID == Step_ID_Hdr_Base_Info) return false; - if(_currentStepID == Step_ID_Section18_Dim && index >=1 &&index < 8) + if(_currentStepID == Step_ID_Section18_Dim && _currentSectIndex >=1 &&_currentSectIndex < 8) { - index++; - _sectionShapePara.Initialparameters(index, _sectionBaseInfo); + _currentSectIndex++; + _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); SetParasCtrl(Step_ID_Section18_Dim); return true; } if(_currentStepID == Step_ID_Outflow_Style) { - index = 1; - _sectionShapePara.Initialparameters(index, _sectionBaseInfo); + _currentSectIndex = 1; + _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo); } var prev_step = (from x in _allStepNodes where x.ID < _currentStepID @@ -491,7 +496,7 @@ _ctrlHdrBaseInfo.Dock = DockStyle.Right; _ctrlHdrBaseInfo.SetBindingData(hdrBaseInfo); } - this.panelParas.Controls.Clear(); + //this.panelParas.Controls.Clear();//涓嶈兘娓呯悊 this.panelParas.Controls.Add(_ctrlHdrBaseInfo); this._currentStepID = Step_ID_Hdr_Base_Info; //this.stepTreeListCtrl.SetStepSource(_allStepNodes, 1); -- Gitblit v1.9.3