tangxu
2024-11-03 4ee432aa0ec5ec8058d720b49ae7f46e5ad1c49c
确认提交
已修改1个文件
94 ■■■■ 文件已修改
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -7,7 +7,7 @@
namespace DPumpHydr.WinFrmUI.Volute
{
    public partial class MainViewPage
    public partial class MainViewPage
    {
        //
        ctrlHdrBaseInfo _ctrlHdrBaseInfo = null;
@@ -33,16 +33,16 @@
        //出水设计
        private readonly string Group_Name_Outflow = "Outflow";
        private readonly int Group_ID_Outflow  = -3;
        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>
@@ -72,30 +72,30 @@
        /// <returns></returns>
        private bool GoNextStepCore()
        {
            if (_currentStepID != Step_ID_Section18_Dim || _currentSectIndex>8 || _currentSectIndex<=1)
            if (_currentStepID != Step_ID_Section18_Dim || _currentSectIndex > 8 || _currentSectIndex <= 1)
            {
                _currentSectIndex = 9;
                next_step = (from x in _allStepNodes
                                 where x.ID > _currentStepID
                                 orderby x.ID
                                 select x).FirstOrDefault();
                             where x.ID > _currentStepID
                             orderby x.ID
                             select x).FirstOrDefault();
                if (next_step == null)
                    return false;
            }
            //第一步进行下一步点击
            if(_currentStepID == Step_ID_Hdr_Base_Info)
            if (_currentStepID == 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)
                if (_geomBaseInfo == null)
                {
                    _geomBaseInfo = new ViewModel.GeomBaseInfo();
                }
@@ -112,7 +112,7 @@
                    return false;
                }
                _geomBaseInfo = geomBaseInfo;
                if(_sectionBaseInfo == null)
                if (_sectionBaseInfo == null)
                {
                    _sectionBaseInfo = new ViewModel.SectionBaseInfo();
                }
@@ -123,7 +123,7 @@
            //第三步进行下一步点击
            if (_currentStepID == Step_ID_Section18_Base)
            {
                string error_info;
                var sectionBaseInfo = _ctrlSectionBaseInfo.GetBindingData(out error_info);
                if (sectionBaseInfo == null)
@@ -153,14 +153,14 @@
                _sectionShapePara = sectionShapeInfo18;
                _sectionShapePara.CalcHeightByArea(_sectionBaseInfo.ShapeType);
                _sectionBaseInfo.EditSingleShape(_sectionShapePara, _currentSectIndex);
                if(_currentSectIndex != 9)
                if (_currentSectIndex != 9)
                {
                    _currentSectIndex--;
                }
                _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo);
            }
            SetParasCtrl(next_step.ID);
            return true;
        }
@@ -169,7 +169,7 @@
        /// </summary>
        /// <returns></returns>
        private bool GoPrevStepCore()
        {
        {
            //bool IsChanges = true;
            //if (_currentStepID == Step_ID_Section18_Base && _ctrlSectionBaseInfo.IsParameterChange())
            //{
@@ -191,26 +191,26 @@
            //}
            if (_currentStepID == Step_ID_Hdr_Base_Info)
                return false;
            if(_currentStepID == Step_ID_Section18_Dim && _currentSectIndex >=1 &&_currentSectIndex < 8)
            if (_currentStepID == Step_ID_Section18_Dim && _currentSectIndex >= 1 && _currentSectIndex < 8)
            {
                _currentSectIndex++;
                _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo);
                SetParasCtrl(Step_ID_Section18_Dim);
                return true;
            }
            if(_currentStepID == Step_ID_Outflow_Style)
            if (_currentStepID == Step_ID_Outflow_Style)
            {
                _currentSectIndex = 1;
                _sectionShapePara.Initialparameters(_currentSectIndex, _sectionBaseInfo);
            }
            var prev_step = (from x in _allStepNodes
                                where x.ID < _currentStepID
                                orderby x.ID
                                select x).LastOrDefault();
                             where x.ID < _currentStepID
                             orderby x.ID
                             select x).LastOrDefault();
            if (prev_step == null)
                return false;
                SetParasCtrl(prev_step.ID);
            SetParasCtrl(prev_step.ID);
            return true;
        }
@@ -220,7 +220,7 @@
        /// </summary>
        /// <param name="step_id"></param>
        private void SetParasCtrl(long step_id)
        {
        {
            //第一步
            if (step_id == Step_ID_Hdr_Base_Info)
            {
@@ -274,10 +274,10 @@
            if(step_id == Step_ID_Outflow_Style)
            if (step_id == Step_ID_Outflow_Style)
            {
                if (_ctrlSetOutflowStyle == null)
                {
                {
                    _ctrlSetOutflowStyle = new ctrlSetOutflowStyle();
                    _ctrlSetOutflowStyle.Name = "ctrlSetOutflowStyle";
                    _ctrlSetOutflowStyle.Dock = DockStyle.Right;
@@ -304,20 +304,20 @@
            this._currentStepID = step_id;
        }
        /// <summary>
        /// 蜗壳参数导出
        /// </summary>
        public void VoluteDeriveArgument()
        {
            if(_sectionBaseInfo == null )
            if (_sectionBaseInfo == null)
            {
                MessageBox.Show("您还没有完成定义参数!请定义完成后在进行导出!(至少完成第三步)");
                return;
            }
            if(_currentStepID <= 21)
            if (_currentStepID <= 21)
            {
                DialogResult result = MessageBox.Show("确定不进行后续断面参数的调整,使用初始计算后的参数吗?","提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                DialogResult result = MessageBox.Show("确定不进行后续断面参数的调整,使用初始计算后的参数吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                if (result == DialogResult.Cancel)
                {
                    return;
@@ -414,23 +414,23 @@
            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断面" ;
            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);
            stepSetct18.ID = Step_ID_Section18_Dim;
            stepSetct18.Group = "盖板连接";
            stepSetct18.ParentID = Group_ID_Section18;
            _allStepNodes.Add(stepSetct18);
            #endregion
@@ -458,14 +458,14 @@
            };
            step出水体类型.AllowSelect = true;
            step出水体类型.Caption = "第五步:出水体类型";
            step出水体类型.Name = "TreeStepNode"+ Step_ID_Outflow_Style;
            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.未完成,
@@ -473,7 +473,7 @@
            };
            step出水体尺寸.AllowSelect = true;
            step出水体尺寸.Caption = "第六步:出水体尺寸";
            step出水体尺寸.Name = "TreeStepNode"+ Step_ID_Outflow_Dim;
            step出水体尺寸.Name = "TreeStepNode" + Step_ID_Outflow_Dim;
            step出水体尺寸.ID = Step_ID_Outflow_Dim;
            step出水体尺寸.Group = Group_Name_Outflow;
            step出水体尺寸.ParentID = Group_ID_Outflow;