tangxu
2025-02-13 c8552b21551b7fccd19e5dac28c05092fcde29cb
优化导入XML
已修改9个文件
309 ■■■■ 文件已修改
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs 117 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_出口_水体.cs 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_截面18.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeNode.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/参数控件/SetOutflowParasCtrl1.Designer.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/基本参数/ctrlHdrBaseInfo.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/断面设计/ctrlSectionBundleInfo.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
@@ -100,8 +100,9 @@
                this._occDesign3dCtrl.ClearAll();
                #region  ç¬¬ä¸€æ­¥ 
                if (_hdrBaseInfo != null )
                {
                if (_hdrBaseInfo == null)
                    return;
                    if (_ctrlHdrBaseInfo == null)
                    {
                        _ctrlHdrBaseInfo = new ctrlHdrBaseInfo();
@@ -110,86 +111,74 @@
                    _ctrlHdrBaseInfo.SetBindingData(_hdrBaseInfo);
                    _ctrlHdrBaseInfo.SetBindingData(_geomBaseInfo);
                    _ctrlHdrBaseInfo.SaveHistoryParas(_hdrBaseInfo, _geomBaseInfo);
                }
                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Hdr_Base_Info);
                #endregion
                #region  ç¬¬2æ­¥ æ–­é¢æ€»è§ˆ
                if (_sectionBundleInfo != null)
                {
                    if (_ctrlSectionBundleInfo == null)
                    {
                        _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
                        _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
                        _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
                        _ctrlSectionBundleInfo.OnHightLightSectCurve += HightLightSectCurve;
                    }
                if (_sectionBundleInfo == null)
                    return;
                CreateSectionStepCtrl();
                DockStepParaCtrl(_ctrlSectionBundleInfo);
                    _ctrlSectionBundleInfo.ShowPage(_hdrBaseInfo, _geomBaseInfo,
                        DPumpHydr.ViewModel.eWizardStepDiretion.前进,true);
                    _ctrlSectionBundleInfo.RefreshAllSectPara(_sectionBundleInfo);
                    RefreshSectShapeWhole18(_sectionBundleInfo);
                }
                _ctrlSectionBundleInfo.ShowPage(_hdrBaseInfo, _geomBaseInfo,
                        DPumpHydr.ViewModel.eWizardStepDiretion.前进, true);
                _ctrlSectionBundleInfo.RefreshAllSectPara(_sectionBundleInfo);
                RefreshSectShapeWhole18(_sectionBundleInfo);
                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Section18_Full);
                #endregion
                #region  å‡ºæ°´é¢ç±»åž‹é€‰æ‹©
                //if (_outflowType != ViewModel.eOutflowStyle.未知)
                //{
                //    if (_ctrlSetOutflowType == null)
                //    {
                //        _ctrlSetOutflowType = new ctrlSetOutflowType();
                //        _ctrlSetOutflowType.Name = "ctrlSetOutflowDim";
                //    }
                //    this._ctrlSetOutflowType.SetBindingData(_outflowType);
                //}
                #endregion
                #region  å‡ºæ°´é¢å‚æ•°
                if (_outflowParas != null)
                {
                    if (_ctrlSetOutflowParas == null)
                    {
                        _ctrlSetOutflowParas = new ctrlSetOutflowParas();
                        _ctrlSetOutflowParas.Name = "ctrlSetOutflowStyle";
                        _ctrlSetOutflowParas.OnRefreshShape2D += RefreshWaterBody2D;
                        _ctrlSetOutflowParas.OnRefreshShape3D += RefreshWaterBody3D;
                        _ctrlSetOutflowParas.InitialParas( _hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo);
                    }
                    //CreateWaterBody2D(_outflowParas);
                    RefreshWaterBody3D(_outflowParas);
                if (_outflowParas == null)
                    return;
                CreateOutflowStepCtrl();
                    _ctrlSetOutflowParas.SetBindingData( _outflowParas);
                DockStepParaCtrl(_ctrlSetOutflowParas);
                    #region  åŠ åŽš
                    if (_bodyThickness>0)
                    {
                        Rbtn数据导出STP.Visible = true;
                        Rbtn数据导出IGS.Visible = true;
                InitilOutflowStepCtrl(this._stepTreeDockPanel.Step_ID_Section18_Full);
                        if (_ctrlThicknessParas == null)
                        {
                            _ctrlThicknessParas = new ctrlThicknessParas();
                            _ctrlThicknessParas.Name = "ctrlThicknessParas";
                            _ctrlThicknessParas.OnRefreshShape += (houdu) => {
                                this._bodyThickness = houdu;
                                this._occDesign3dCtrl.BuildThicknessBody(houdu);
                            };
                             _ctrlThicknessParas.InitialParas(_bodyThickness);
                            this._occDesign3dCtrl.BuildThicknessBody(_bodyThickness);
                        }
                    }
                    #endregion
                }
                this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
                this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Outflow_Paras);
                #endregion
                #region  åŠ åŽš
                if (_bodyThickness < 1)
                    return;
                CreateThicknessStepCtrl();
                InitilThicknessStepCtrl(this._stepTreeDockPanel.Step_ID_Outflow_Paras);
                DockStepParaCtrl(_ctrlThicknessParas);
                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_jiahout);
                //{
                //    Rbtn数据导出STP.Visible = true;
                //    Rbtn数据导出IGS.Visible = true;
                //    if (_ctrlThicknessParas == null)
                //    {
                //        _ctrlThicknessParas = new ctrlThicknessParas();
                //        _ctrlThicknessParas.Name = "ctrlThicknessParas";
                //        _ctrlThicknessParas.OnRefreshShape += (houdu) =>
                //        {
                //            this._bodyThickness = houdu;
                //            this._occDesign3dCtrl.BuildThicknessBody(houdu);
                //        };
                //        _ctrlThicknessParas.InitialParas(_bodyThickness);
                //        this._occDesign3dCtrl.BuildThicknessBody(_bodyThickness);
                //    }
                //}
                #endregion
            }
        }
        /// <summary>
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_StepInfo.cs
@@ -172,36 +172,9 @@
            {
                if (_sectionBundleInfo == null)
                    return;
                Rbtn数据导出STP.Visible = true;
                Rbtn数据导出IGS.Visible = true;
                this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
                this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
                EnterStep4(last_step_id);
                if (_ctrlThicknessParas == null)
                {
                    _ctrlThicknessParas = new ctrlThicknessParas();
                    _ctrlThicknessParas.Name = "ctrlThicknessParas";
                    _ctrlThicknessParas.OnRefreshShape += (houdu) =>
                    {
                        this._bodyThickness = houdu;
                        this._occDesign3dCtrl.BuildThicknessBody(houdu);
                    };
                    this._bodyThickness = _ctrlThicknessParas.InitialParas(_hdrBaseInfo, _geomBaseInfo, _outflowParas);
                    this._occDesign3dCtrl.BuildThicknessBody(_bodyThickness);
                }
                _ctrlThicknessParas.ShowPage();
                this._occDesign3dCtrl.setWaterBodyOpacity(
                    DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.R,
                    DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.G,
                    DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.B, 60);
                this._occDesign3dCtrl.SetThicknessBodyVisible(true);
                DockStepParaCtrl(_ctrlThicknessParas);
                return;
            }
            #endregion
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_³ö¿Ú_Ë®Ìå.cs
@@ -4,9 +4,7 @@
using System.IO;
using System.Text;
using System.Linq;
using HydrEngineCSharp;
using System.Net.NetworkInformation;
using DPumpHydr.WinFrmUI.Volute.ViewModel;
using HydrEngineCSharp;
namespace DPumpHydr.WinFrmUI.Volute
{
@@ -36,12 +34,59 @@
            this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
            this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
            CreateOutflowStepCtrl();
            InitilOutflowStepCtrl(last_step_id);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="last_step_id"></param>
        private void InitilOutflowStepCtrl(long last_step_id)
        {
            _ctrlSetOutflowParas.InitialParas(_hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo);
            _ctrlSetOutflowParas.SetSect9Posi(_sect9Posi);
            _ctrlSetOutflowParas.SetSect10Posi(_sect10Posi);
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.前进;
            if (last_step_id > this._stepTreeDockPanel.Step_ID_Outflow_Paras)
                step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.后退;
            _ctrlSetOutflowParas.ShowPage(step_direction);
            this._sectAreaDockPanel.RefreshControl();
            this._sectAreaDockPanel.Visible = true;
            DockStepParaCtrl(_ctrlSetOutflowParas);
            string error = "";
            _outflowParas = _ctrlSetOutflowParas.GetBindingData(out error);
            this._occDesign3dCtrl.setWaterBodyOpacity(
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.R,
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.G,
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.B, 256);
            this._occDesign3dCtrl.SetThicknessBodyVisible(false);
        }
        /// <summary>
        ///
        /// </summary>
        private void CreateOutflowStepCtrl()
        {
            if (_ctrlSetOutflowParas == null)
            {
                _ctrlSetOutflowParas = new ctrlSetOutflowParas();
                _ctrlSetOutflowParas.Name = "ctrlSetOutflowStyle";
                _ctrlSetOutflowParas.OnRefreshShape2D += RefreshWaterBody2D ;
                _ctrlSetOutflowParas.OnRefreshShape2D += RefreshWaterBody2D;
                _ctrlSetOutflowParas.OnRefreshShape3D += RefreshWaterBody3D;
                _ctrlSetOutflowParas.OnNextStep += () =>
                {
@@ -89,37 +134,10 @@
                //    }
                //}
                //_ctrlSetOutflowParas.SetBindingData(_outflowType, _hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo);
            }
            _ctrlSetOutflowParas.InitialParas(_hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo);
            _ctrlSetOutflowParas.SetSect9Posi(_sect9Posi);
            _ctrlSetOutflowParas.SetSect10Posi(_sect10Posi);
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.前进;
            if (last_step_id > this._stepTreeDockPanel.Step_ID_Outflow_Paras)
                step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.后退;
            _ctrlSetOutflowParas.ShowPage(step_direction);
            this._sectAreaDockPanel.RefreshControl();
            this._sectAreaDockPanel.Visible = true;
            DockStepParaCtrl(_ctrlSetOutflowParas);
            string error = "";
            _outflowParas = _ctrlSetOutflowParas.GetBindingData(out error);
            this._occDesign3dCtrl.setWaterBodyOpacity(
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.R,
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.G,
         DPumpHydr.WinFrmUI.Volute.GlobalParas.WaterBodyColor.B, 256);
            this._occDesign3dCtrl.SetThicknessBodyVisible(false);
        }
  
   
WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_½ØÃæ18.cs
@@ -56,20 +56,12 @@
            this._occDesign3dCtrl.FitView();
            CreateSectionStepCtrl();
            _isHaveCreateWaterBody3d = false;
            if (_ctrlSectionBundleInfo == null)
            {
                _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
                _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
                _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
                _ctrlSectionBundleInfo.OnHightLightSectCurve += HightLightSectCurve;
                _ctrlSectionBundleInfo.OnNextStep += () =>
                {
                    GoNextStep();
                };
            }
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction = DPumpHydr.ViewModel.eWizardStepDiretion.前进;
            if (last_step_id > this._stepTreeDockPanel.Step_ID_Section18_Full)
@@ -85,7 +77,20 @@
            this._sectAreaDockPanel.RefreshControl();
            this._sectAreaDockPanel.Visible = true;
        }
        private void CreateSectionStepCtrl()
        {
            if (_ctrlSectionBundleInfo == null)
            {
                _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
                _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
                _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
                _ctrlSectionBundleInfo.OnHightLightSectCurve += HightLightSectCurve;
                _ctrlSectionBundleInfo.OnNextStep += () =>
                {
                    GoNextStep();
                };
            }
        }
        /// <summary>
        /// æ›´æ–°1-8
        /// </summary>
WinFrmUI/DPumpHydr.WinFrmUI.Volute/StepInfo/StepTreeNode.cs
@@ -26,10 +26,10 @@
        #region Event Region
        public event EventHandler<ObservableListModified<StepTreeNode>> ItemsAdded;
        public event EventHandler<ObservableListModified<StepTreeNode>> ItemsRemoved;
        //public event EventHandler<ObservableListModified<StepTreeNode>> ItemsAdded;
        //public event EventHandler<ObservableListModified<StepTreeNode>> ItemsRemoved;
        public event EventHandler TextChanged;
        //public event EventHandler TextChanged;
        public event Action<StepTreeNode> NodeExpanded;
        public event Action<StepTreeNode> NodeCollapsed;
WinFrmUI/DPumpHydr.WinFrmUI.Volute/³öË®Éè¼Æ/ctrlSetOutflowParas.cs
@@ -193,7 +193,10 @@
        {
            if (paras == null)
                return;
            if(_sectionBundleInfo == null)
            {
                throw new Exception("未初始化ctrlSetOutflowParas控件");
            }
            this._sharp_type = paras.ShapeStyle;
            var paras1 = new ViewModel.OutflowParas(paras);
            var paras2 = new ViewModel.OutflowParas(paras);
WinFrmUI/DPumpHydr.WinFrmUI.Volute/³öË®Éè¼Æ/²ÎÊý¿Ø¼þ/SetOutflowParasCtrl1.Designer.cs
@@ -763,8 +763,6 @@
        private RLT.Controls.CrownLabel crownLabel右上切线缩放量;
        private RLT.Controls.CrownLabel crownLabel左下切线缩放量;
        private RLT.Controls.CrownLabel crownLabel左上切线缩放量;
        private RLT.Controls.ThunderGroupBox thunderGroupBox1;
        private RLT.Controls.RibbonRadioButton RBtn中心出口;
        private RLT.Controls.RibbonRadioButton RBtn侧面出口曲线;
        private RLT.Controls.ThunderGroupBox thunderGroupBox1;
    }
}
WinFrmUI/DPumpHydr.WinFrmUI.Volute/»ù±¾²ÎÊý/ctrlHdrBaseInfo.cs
@@ -387,30 +387,30 @@
            mTextBoxEdit基圆直径D3.Text = D3.ToString();
            //计算并设置FAIO
            double FAI0 = 0, FAI0min, FAI0max;
            double FAI0 = 0;//, FAI0min, FAI0max;
            if (ns < 100)
            {
                FAI0 = 25 + (int)(ns / 20);
                FAI0min = 25.0;
                FAI0max = 30.0;
               // FAI0min = 25.0;
               // FAI0max = 30.0;
            }
            if (ns >= 100 && ns < 200)
            {
                FAI0 = 30 + (int)((ns - 100) / 12.5);
                FAI0min = 30.0;
                FAI0max = 38.0;
               // FAI0min = 30.0;
               // FAI0max = 38.0;
            }
            if (ns >= 200 && ns < 300)
            {
                FAI0 = 38 + (int)((ns - 200) / 50);
                FAI0min = 38.0;
                FAI0max = 40.0;
              //  FAI0min = 38.0;
              //  FAI0max = 40.0;
            }
            if (ns > 300)
            {
                FAI0 = 42;
                FAI0min = 40.0;
                FAI0max = 45.0;
               // FAI0min = 40.0;
               // FAI0max = 45.0;
            }
            mTextBoxEdit隔舌安放角.Text = FAI0.ToString();
WinFrmUI/DPumpHydr.WinFrmUI.Volute/¶ÏÃæÉè¼Æ/ctrlSectionBundleInfo.cs
@@ -173,7 +173,7 @@
        public void ShowPage(
            ViewModel.HdrBaseInfo base_info,
            ViewModel.GeomBaseInfo geom_info,
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction,bool isxml)
            DPumpHydr.ViewModel.eWizardStepDiretion step_direction,bool isRefreshModel = true)
        {
            if (step_direction == DPumpHydr.ViewModel.eWizardStepDiretion.后退)
            {
@@ -181,10 +181,7 @@
            }
            this._hdrBaseInfo = base_info;
            this._geomBaseInfo = geom_info;
            if (isxml)
            {
                return;
            }
            if (_sectionBundleInfo == null)
            {
                _sectionBundleInfo = new ViewModel.SectionBundleInfo();
@@ -206,9 +203,13 @@
                }
            }
            RefreshAllSectPara(_sectionBundleInfo);
            if (isRefreshModel == false)
            {
                return;
            }
            RefreshShape(_sectionBundleInfo);
        }
        private void pictureBoxRefreshK3_Click(object sender, EventArgs e)