From b4c867bf85d3edef5d084a3a26f13cbc6784bf58 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期一, 16 十二月 2024 13:37:21 +0800
Subject: [PATCH] 提交

---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs |  552 +++++++++++++++++++++++++++++++------------------------
 1 files changed, 312 insertions(+), 240 deletions(-)

diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
index 854879d..25008cd 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -1,40 +1,32 @@
-锘� 
-using System;
+锘縰sing System;
 using System.Collections.Generic;
 using System.Windows.Forms;
 using System.IO;
 using System.Text;
-using System.Linq;
+using System.Linq; 
 
 namespace DPumpHydr.WinFrmUI.Volute
 {
-    public partial class MainViewPage  
+    public partial class MainViewPage
     {
-        //鍩虹淇℃伅
-        private readonly string Group_Name_Base_Info = "BaseInfo";
-        private readonly int Group_ID_Base_Info = -1;//缁処D
-        private long Step_ID_Hdr_Base_Info = 12;
-        private long Step_ID_Geom_Base_Info = 13;
+        //姝ラ鎺т欢
+        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;
+        ViewModel.eOutflowStyle _type ;
 
 
-        //鏂潰璁捐(1-8)
-        private readonly string Group_Name_Section18 = "Section18";
-        private readonly int Group_ID_Section18 = -2;
-        private long Step_ID_Section18_Base = 20;//鍩烘湰淇℃伅
-        private long Step_ID_Section18_Dim = 21;//璇︾粏椤甸潰 
-
-
-        //鍑烘按璁捐
-        private readonly string Group_Name_Outflow = "Outflow";
-        private readonly int Group_ID_Outflow  = -3;
-        private long Step_ID_Outflow_Style = 31;
-        private long Step_ID_Outflow_Dim = 32;
-
-        //
-        private List<DPumpHydr.WinFrmUI.Volute.TreeStepNode> _allStepNodes = null;
-         
-        private long _currentStepID = 0;
- 
         /// <summary>
         /// 涓嬩竴姝�
         /// </summary>
@@ -52,125 +44,350 @@
         {
             return GoPrevStepCore();
         }
-        ViewModel.HdrBaseInfo _hdrBaseInfo = null;
+ 
+        /// <summary>
+        /// 涓嬩竴姝ユ牳蹇�
+        /// </summary>
+        /// <returns></returns>
         private bool GoNextStepCore()
         {
-            var next_step = (from x in _allStepNodes
-                             where x.ID > _currentStepID
-                             orderby x.ID
-                             select x).FirstOrDefault();
-            if (next_step == null)
+            var currentStepID = this._stepTreeDockPanel.CurrentStepID;
+            if (SaveStepParas(currentStepID) == false)
+            {
                 return false;
-            if(_currentStepID == Step_ID_Hdr_Base_Info)
+            }
+
+            //
+            var next_step_id = this._stepTreeDockPanel.NextStepID;
+            if (next_step_id > 0)
+            {
+                this.SetParasCtrl(next_step_id);
+
+                //
+                this._stepTreeDockPanel.SetFocusedNode(next_step_id);
+            }
+
+            return true;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="stepID"></param>
+        /// <returns></returns>
+        protected bool SaveStepParas(long stepID)
+        { 
+            #region 鑾峰彇褰撳墠椤甸潰鍙傛暟
+            //绗竴姝� 
+            if (stepID == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info)
             {
                 string error_info;
                 var hdrBaseInfo = _ctrlHdrBaseInfo.GetBindingData(out error_info);
-                if(hdrBaseInfo == null)
+                if (hdrBaseInfo == null)
                 {
                     MessageBox.Show(error_info);
                     return false;
                 }
+                hdrBaseInfo.CalcNs();
                 _hdrBaseInfo = hdrBaseInfo;
+                if (_geomBaseInfo == null)
+                {
+                    _geomBaseInfo = new ViewModel.GeomBaseInfo();
+                }
+                _geomBaseInfo.Calc(_hdrBaseInfo);
+                return true;
             }
-            SetParasCtrl(next_step.ID);
- 
+            //绗簩姝� 
+            if (stepID == this._stepTreeDockPanel.Step_ID_Geom_Base_Info)
+            {
+                if (_ctrlGeomBaseInfo == null)
+                    return false;
+                string error_info;
+                var geomBaseInfo = _ctrlGeomBaseInfo.GetBindingData(out error_info);
+                if (geomBaseInfo == null)
+                {
+                    MessageBox.Show(error_info);
+                    return false;
+                }
+                _geomBaseInfo = geomBaseInfo;
+                if (_sectionBundleInfo == null)
+                {
+                    _sectionBundleInfo = new ViewModel.SectionBundleInfo();
+                }
+                var v3 = ViewModel.SectionBundleInfo.CalcV3(_hdrBaseInfo, _geomBaseInfo);
+                _sectionBundleInfo.ResetAllParas(_hdrBaseInfo, _geomBaseInfo, v3); 
+
+                return true;
+            }
+            //绗笁姝� 
+            if (stepID == this._stepTreeDockPanel.Step_ID_Section18_Full)
+            {
+                string error_info;
+                var sectionBaseInfo = _ctrlSectionBundleInfo.GetBindingData(out error_info);
+                if (sectionBaseInfo == null)
+                {
+                    MessageBox.Show(error_info);
+                    return false;
+                }
+                _sectionBundleInfo = sectionBaseInfo;
+                //_sectionBundleInfo.ResetAllParas(_hdrBaseInfo, _geomBaseInfo);
+                //ViewModel.SectionShapePara _sectionShapePara = null;
+                //if (_sectionShapePara == null)
+                //{
+                //    _sectionShapePara = new ViewModel.SectionShapePara();
+                //}
+                //_sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo);
+
+                return true;
+            }
+            //1-8鏂潰杩涜涓嬩竴姝ョ偣鍑�
+            if (stepID == this._stepTreeDockPanel.Step_ID_Section18_Grp)
+            {
+                //string error_info;
+                //var sectionShapeInfo18 = _ctrlSectionShapeInfo18.GetBindingData(out error_info);
+                //if (sectionShapeInfo18 == null)
+                //{
+                //    MessageBox.Show(error_info);
+                //    return false;
+                //}
+                //if (!sectionShapeInfo18.Verify(out error_info))
+                //{
+                //    MessageBox.Show(error_info);
+                //    return false;
+                //}
+                //_sectionShapePara = sectionShapeInfo18;
+                //_sectionShapePara.CalcHeightByArea(_sectionBaseInfo.ShapeType);
+                //_sectionBaseInfo.EditSingleShape(_sectionShapePara, _currentSectIndex);
+                //if (_currentSectIndex != 9)
+                //{
+                //    _currentSectIndex--;
+                //}
+                //_sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo);
+
+                return true;
+            }
+
+            #endregion
+
+
             return true;
         }
 
+        /// <summary>
+        /// 涓婁竴姝ユ牳蹇�
+        /// </summary>
+        /// <returns></returns>
         private bool GoPrevStepCore()
         {
-            if (_currentStepID == Step_ID_Hdr_Base_Info)
+            var currentStepID = this._stepTreeDockPanel.CurrentStepID;
+            ParasInfoBaseCtrl paras_ctrl = GetParasCtrl(currentStepID);
+            if(paras_ctrl != null && paras_ctrl.IsChangesParas())
+            { 
+                DialogResult result = MessageBox.Show("宸茬粡淇敼杩囩殑鏁版嵁闇�瑕佷繚瀛樺悧锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                if (result == DialogResult.OK)
+                { 
+                    if (SaveStepParas(currentStepID) == false )
+                    { 
+                        return false;
+                    }
+                }
+            }
+ 
+            var prev_step_id = this._stepTreeDockPanel.PrevStepID;
+            if (prev_step_id == 0)
                 return false;
 
-            var prev_step = (from x in _allStepNodes
-                             where x.ID < _currentStepID
-                             orderby x.ID
-                             select x).LastOrDefault();
-            if (prev_step == null)
-                return false;
 
-            SetParasCtrl(prev_step.ID);
-   
+            this.SetParasCtrl(prev_step_id);
+
+            //
+            this._stepTreeDockPanel.SetFocusedNode(prev_step_id);
+
+
             return true;
         }
 
+        /// <summary>
+        /// 鐢熸垚鎺т欢鐨勫弬鏁版帶浠�
+        /// </summary>
+        /// <param name="step_id"></param>
         private void SetParasCtrl(long step_id)
-        {   
-            if (step_id == Step_ID_Hdr_Base_Info)
+        {
+            //绗竴姝�
+            if (step_id == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info)
             {
                 if (_ctrlHdrBaseInfo == null)
+                {
                     _ctrlHdrBaseInfo = new ctrlHdrBaseInfo();
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlHdrBaseInfo);
+                    _ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo";
+                }
+
+
+                _ctrlHdrBaseInfo.SetBindingData(_hdrBaseInfo);
+                AddStepParaCtrl(_ctrlHdrBaseInfo); 
+                this._sectAreaDockPanel.Visible = false;
             }
-            if (step_id == Step_ID_Geom_Base_Info)
+
+            //绗簩姝�
+            if (step_id == this._stepTreeDockPanel.Step_ID_Geom_Base_Info)
             {
                 if (_ctrlGeomBaseInfo == null)
                 {
                     _ctrlGeomBaseInfo = new ctrlGeomBaseInfo();
                     _ctrlGeomBaseInfo.Name = "ctrlGeomBaseInfo";
-                    _ctrlGeomBaseInfo.Dock = DockStyle.Fill;
                 }
-                
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlGeomBaseInfo);
+                _ctrlGeomBaseInfo.SetBindingData(_geomBaseInfo);
+                AddStepParaCtrl(_ctrlGeomBaseInfo);
+                this._sectAreaDockPanel.Visible = false;
             }
 
-
- 
- 
-            if (step_id == Step_ID_Section18_Base)
+            //绗笁姝� 鏂潰鎬昏
+            if (step_id == this._stepTreeDockPanel.Step_ID_Section18_Full)
             {
-                if (_ctrlSectionBaseInfo == null)
+                if (_ctrlSectionBundleInfo == null)
                 {
-                    _ctrlSectionBaseInfo = new ctrlSectionBaseInfo();
-                    _ctrlSectionBaseInfo.Name = "ctrlSectionBaseInfo";
-                    _ctrlSectionBaseInfo.Dock = DockStyle.Fill;
+                    _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
+                    _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
+                    _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
                 }
-             
-                  
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlSectionBaseInfo);
+                AddStepParaCtrl(_ctrlSectionBundleInfo);
+                _ctrlSectionBundleInfo.InitialParas(_hdrBaseInfo, _geomBaseInfo);
+                _ctrlSectionBundleInfo.SetBindingData(_sectionBundleInfo);
+                RefreshSectShapeWhole18(_sectionBundleInfo);
+                this._sectAreaDockPanel.RefreshControl();
+                this._sectAreaDockPanel.Visible = true;
             }
-            if (step_id == Step_ID_Section18_Dim)
+
+            //绗洓姝� 1-8鏂潰
+            if (step_id > this._stepTreeDockPanel.Step_ID_Section18_Grp &&
+                step_id <= this._stepTreeDockPanel.Step_ID_Section18_Grp + 8)
             {
+                if (_sectionBundleInfo == null)
+                    return;
                 if (_ctrlSectionShapeInfo18 == null)
                 {
                     _ctrlSectionShapeInfo18 = new ctrlSectionShapeInfo18();
                     _ctrlSectionShapeInfo18.Name = "ctrlSectionShapeInfo18";
-                    _ctrlSectionShapeInfo18.Dock = DockStyle.Fill;
+                    _ctrlSectionShapeInfo18.OnRefreshShape += RefreshSectShapeSingle18;
                 }
-                   
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlSectionShapeInfo18);
+                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 == Step_ID_Outflow_Style)
+            //鍑烘按闈㈢被鍨嬮�夋嫨
+            if (step_id == this._stepTreeDockPanel.Step_ID_Outflow_Type)
             {
+                if (_ctrlSetOutflowType == null)
+                {
+                    _ctrlSetOutflowType = new ctrlSetOutflowType();
+                    _ctrlSetOutflowType.Name = "ctrlSetOutflowDim";
+                }
+                this._sectAreaDockPanel.Visible = true;
+                this._sectAreaDockPanel.RefreshControl();
+                AddStepParaCtrl(_ctrlSetOutflowType);
+            }
+
+            //鍑烘按闈㈠弬鏁�
+            if (step_id == this._stepTreeDockPanel.Step_ID_Outflow_Style)
+            {
+                _type = _ctrlSetOutflowType.GetBindingData();
                 if (_ctrlSetOutflowStyle == null)
+                {
                     _ctrlSetOutflowStyle = new ctrlSetOutflowStyle();
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlSetOutflowStyle);
+                    _ctrlSetOutflowStyle.Name = "ctrlSetOutflowStyle";
 
-            }
-            if (step_id == Step_ID_Outflow_Dim)
-            {
-                if (_ctrlSetOutflowDim == null)
-                    _ctrlSetOutflowDim = new ctrlSetOutflowDim();
-                this.panelParas.Controls.Clear();
-                this.panelParas.Controls.Add(_ctrlSetOutflowDim);
+                    var pt = _occDesign2dCtrl.CreateOutflowBody();
+                    if(pt != null)
+                    {
+                        _occDesign3dCtrl.CreateOutflowBody(pt);
+                    }
+                }
+
+                
+                
+                
+                _ctrlSetOutflowStyle.SetBindingData(_type);
+                this._sectAreaDockPanel.RefreshControl();
+                this._sectAreaDockPanel.Visible = true;
+                AddStepParaCtrl(_ctrlSetOutflowStyle);
             }
 
 
-
-
-
-            this._currentStepID = step_id;
         }
-     
-        
+      
+
+
+        /// <summary>
+        /// 鑾峰彇褰撳墠姝ラ鐨勫弬鏁版帶鍒舵帶浠�
+        /// </summary>
+        /// <param name="step_id"></param>
+        private DPumpHydr.WinFrmUI.Volute.ParasInfoBaseCtrl GetParasCtrl(long step_id)
+        {
+            if (step_id == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info)
+            { 
+                return _ctrlHdrBaseInfo;
+            }
+            //绗簩姝� 
+            if (step_id == this._stepTreeDockPanel.Step_ID_Geom_Base_Info)
+            { 
+                return _ctrlGeomBaseInfo;
+            }
+            //绗笁姝� 
+            if (step_id == this._stepTreeDockPanel.Step_ID_Section18_Full)
+            { 
+                return _ctrlSectionBundleInfo;
+            }
+            //1-8鏂潰杩涜涓嬩竴姝ョ偣鍑�
+            if (step_id >= this._stepTreeDockPanel.Step_ID_Section18_Grp &&銆�
+                step_id>= this._stepTreeDockPanel.Step_ID_Section18_Grp+8)
+            {
+                return _ctrlSectionShapeInfo18;
+            }
+
+            return null;
+        }
+
+
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="ctrl"></param>
+        private void AddStepParaCtrl(ParasInfoBaseCtrl ctrl)
+        { 
+            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 鍒濆鍖栨楠ゅ垪琛�
 
         /// <summary>
@@ -178,152 +395,6 @@
         /// </summary>
         private void InitialStepNodes()
         {
-            _allStepNodes = new List<DPumpHydr.WinFrmUI.Volute.TreeStepNode>();
-
-            #region 鍩虹淇℃伅/鍑犱綍鍙傛暟
-            var stepGroup_BaseInfo = new DPumpHydr.WinFrmUI.Volute.TreeStepNode();
-            stepGroup_BaseInfo.AllowSelect = false;
-            stepGroup_BaseInfo.Group = Group_Name_Base_Info;
-            stepGroup_BaseInfo.Caption = "鍩虹淇℃伅";
-            stepGroup_BaseInfo.Name = Group_Name_Base_Info;
-            stepGroup_BaseInfo.ID = Group_ID_Base_Info;
-            stepGroup_BaseInfo.ParentID = 0;
-            _allStepNodes.Add(stepGroup_BaseInfo);
-
-            var step娆㈣繋浣跨敤 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode();
-            step娆㈣繋浣跨敤.AllowSelect = true;
-            step娆㈣繋浣跨敤.Group = Group_Name_Base_Info;
-            step娆㈣繋浣跨敤.Caption = "娆㈣繋浣跨敤";
-            step娆㈣繋浣跨敤.Name = "StepHelp";
-            step娆㈣繋浣跨敤.ID = 1;
-            step娆㈣繋浣跨敤.ParentID = Group_ID_Base_Info;
-            _allStepNodes.Add(step娆㈣繋浣跨敤);
-
-
-            var step鍩虹淇℃伅 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            step鍩虹淇℃伅.AllowSelect = true;
-            step鍩虹淇℃伅.Group = Group_Name_Base_Info;
-            step鍩虹淇℃伅.Caption = "绗竴姝�:鍩虹淇℃伅";
-            step鍩虹淇℃伅.Name = "StepHydParas";
-            step鍩虹淇℃伅.ID = Step_ID_Hdr_Base_Info;
-            step鍩虹淇℃伅.ParentID = Group_ID_Base_Info;
-            _allStepNodes.Add(step鍩虹淇℃伅);
-
-            var step鍑犱綍鍙傛暟 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            step鍑犱綍鍙傛暟.AllowSelect = true;
-            step鍑犱綍鍙傛暟.Group = Group_Name_Base_Info;
-            step鍑犱綍鍙傛暟.Caption = "绗簩姝�:鍑犱綍鍙傛暟";
-            step鍑犱綍鍙傛暟.Name = "StepGeomParas";
-            step鍑犱綍鍙傛暟.ID = Step_ID_Geom_Base_Info;
-            step鍑犱綍鍙傛暟.ParentID = Group_ID_Base_Info;
-            _allStepNodes.Add(step鍑犱綍鍙傛暟);
-            #endregion
-
-
-            #region 鏂潰璁捐(1-8)
-
-            var stepGroup_CoverPlate = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            stepGroup_CoverPlate.AllowSelect = false;
-            stepGroup_CoverPlate.Caption = "鏂潰璁捐";
-            stepGroup_CoverPlate.Name = Group_Name_Section18;
-            stepGroup_CoverPlate.ID = Group_ID_Section18;
-            stepGroup_CoverPlate.ParentID = 0;
-            _allStepNodes.Add(stepGroup_CoverPlate);
-
-
-            var step鏂潰鍩烘湰淇℃伅 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            step鏂潰鍩烘湰淇℃伅.AllowSelect = true;
-            step鏂潰鍩烘湰淇℃伅.Caption = string.Format("{0}:{1}", GetTranslateString("绗笁姝�"), GetTranslateString("闆朵欢鏉愭枡"));
-            step鏂潰鍩烘湰淇℃伅.Name = "SectBaseInfo18";
-            step鏂潰鍩烘湰淇℃伅.ID = Step_ID_Section18_Base;
-            step鏂潰鍩烘湰淇℃伅.Group = "鏂潰淇℃伅";
-            step鏂潰鍩烘湰淇℃伅.ParentID = Group_ID_Section18;
-            _allStepNodes.Add(step鏂潰鍩烘湰淇℃伅);
-
-       
-                var stepSetct18 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-                {
-                    ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                    DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-                };
-                stepSetct18.AllowSelect = true;
-                stepSetct18.Caption =  "绗洓姝�: 绗�1-8鏂潰" ;
-            stepSetct18.Name = "TreeStepNode" + Step_ID_Section18_Dim;
-            stepSetct18.ID = Step_ID_Section18_Dim  ;
-                stepSetct18.Group = "鐩栨澘杩炴帴";
-                stepSetct18.ParentID = Group_ID_Section18;
-                _allStepNodes.Add(stepSetct18);
-             
-
-
-     
-
-
-            #endregion
-
-
-            #region 鍑烘按浣�
-
-            var stepGroup_鍑烘按浣� = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            stepGroup_鍑烘按浣�.AllowSelect = false;
-            stepGroup_鍑烘按浣�.Caption = "鍑烘按浣撹璁�";
-            stepGroup_鍑烘按浣�.Name = Group_Name_Outflow;
-            stepGroup_鍑烘按浣�.ID = Group_ID_Outflow;
-            stepGroup_鍑烘按浣�.ParentID = 0;
-            _allStepNodes.Add(stepGroup_鍑烘按浣�);
-
-
-            var step鍑烘按浣撶被鍨� = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            step鍑烘按浣撶被鍨�.AllowSelect = true;
-            step鍑烘按浣撶被鍨�.Caption = "绗簲姝�:鍑烘按浣撶被鍨�";
-            step鍑烘按浣撶被鍨�.Name = "TreeStepNode"+ Step_ID_Outflow_Style;
-            step鍑烘按浣撶被鍨�.ID = Step_ID_Outflow_Style;
-            step鍑烘按浣撶被鍨�.Group = Group_Name_Outflow;
-            step鍑烘按浣撶被鍨�.ParentID = Group_ID_Outflow;
-            _allStepNodes.Add(step鍑烘按浣撶被鍨�);
-
-
-            
-            var step鍑烘按浣撳昂瀵� = new DPumpHydr.WinFrmUI.Volute.TreeStepNode()
-            {
-                ProgressState = WinFrmUI.Volute.TreeStepNode.eProgressState.鏈畬鎴�,
-                DataState = WinFrmUI.Volute.TreeStepNode.eDataState.鏈煡
-            };
-            step鍑烘按浣撳昂瀵�.AllowSelect = true;
-            step鍑烘按浣撳昂瀵�.Caption = "绗叚姝�:鍑烘按浣撳昂瀵�";
-            step鍑烘按浣撳昂瀵�.Name = "TreeStepNode"+ Step_ID_Outflow_Dim;
-            step鍑烘按浣撳昂瀵�.ID = Step_ID_Outflow_Dim;
-            step鍑烘按浣撳昂瀵�.Group = Group_Name_Outflow;
-            step鍑烘按浣撳昂瀵�.ParentID = Group_ID_Outflow;
-            _allStepNodes.Add(step鍑烘按浣撳昂瀵�);
-
-            #endregion
-
-
             ViewModel.HdrBaseInfo hdrBaseInfo = new ViewModel.HdrBaseInfo();
             hdrBaseInfo.Q = 200;
             hdrBaseInfo.H = 50;
@@ -338,10 +409,11 @@
                 _ctrlHdrBaseInfo.Dock = DockStyle.Right;
                 _ctrlHdrBaseInfo.SetBindingData(hdrBaseInfo);
             }
-            this.panelParas.Controls.Clear();
-            this.panelParas.Controls.Add(_ctrlHdrBaseInfo);
-            this._currentStepID = Step_ID_Hdr_Base_Info;
-            //this.stepTreeListCtrl.SetStepSource(_allStepNodes, 1);
+
+            this.AddStepParaCtrl(_ctrlHdrBaseInfo);
+
+            //
+            this._stepTreeDockPanel.InitialStepNodes();
         }
 
         #endregion

--
Gitblit v1.9.3