tangxu
2024-11-02 399c534c415062b08ee5a00fb2c36608f4b3c7ff
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -1,17 +1,22 @@

using System;
using 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;//组ID
@@ -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);