From 5fc444fd4e3a7f94fed8c848211e52012d6c522f Mon Sep 17 00:00:00 2001
From: tx <123456>
Date: 星期一, 14 四月 2025 17:51:44 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/DPump/Hydr/Desktop.V1.1

---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs |  159 ++++++++++++++++++++++-------------------------------
 1 files changed, 66 insertions(+), 93 deletions(-)

diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
index 56c441b..7c2b0fc 100644
--- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
+++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/MainViewPage_ExportImport.cs
@@ -5,9 +5,6 @@
 using System.Text;
 using System.Drawing;
 using HydrEngineCSharp;
-using DPumpHydr.WinFrmUI.RLT.Native;
-using DPumpHydr.WinFrmUI.RLT.Docking.Crown;
-using DPumpHydr.WinFrmUI.Volute.TempCtrl; 
 
 namespace DPumpHydr.WinFrmUI.Volute
 {
@@ -48,17 +45,17 @@
             if (currentStepID == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info)
             {
                 if (!SaveParaStep1())
-                    return ;
+                    return;
             }
             else if (currentStepID == this._stepTreeDockPanel.Step_ID_Section18_Full)
             {
                 if (!SaveParaStep2())
-                    return ;
+                    return;
             }
             else if (currentStepID == this._stepTreeDockPanel.Step_ID_Outflow_Paras)
             {
                 if (!SaveParaStep3())
-                    return ;
+                    return;
             }
             #endregion
             SaveFileDialog dlg = new SaveFileDialog();
@@ -69,18 +66,18 @@
                 return;
             new DPumpHydr.WinFrmUI.VoluteXmlParasTranHelper().Save(
                 dlg.FileName,
-                _hdrBaseInfo, 
-                _geomBaseInfo, 
-                _sectionBundleInfo, 
+                _hdrBaseInfo,
+                _geomBaseInfo,
+                _sectionBundleInfo,
                 _outflowParas,
-                this._bodyThickness); 
+                this._bodyThickness);
         }
 
         /// <summary>
         /// 铚楀3鍙傛暟瀵煎叆
         /// </summary>
         public void ImportXmlFile()
-        { 
+        {
             OpenFileDialog dlg = new OpenFileDialog();
             dlg.Title = "瀵煎叆铚楀3淇℃伅";
             dlg.FileName = "铚楀3淇℃伅.xml";
@@ -89,107 +86,83 @@
                 return;
             var ret = new DPumpHydr.WinFrmUI.VoluteXmlParasTranHelper().Read(
                 dlg.FileName,
-                out  _hdrBaseInfo,
+                out _hdrBaseInfo,
                 out _geomBaseInfo,
-                out _sectionBundleInfo, 
+                out _sectionBundleInfo,
                 out _outflowParas,
                 out this._bodyThickness);
-            if(ret)
+            if (ret)
             {
                 this._occDesign2dCtrl.ClearAll();
                 this._occDesign3dCtrl.ClearAll();
 
                 #region  绗竴姝� 
-                if (_hdrBaseInfo != null ) 
+                if (_hdrBaseInfo == null)
+                    return;
+
+                if (_ctrlHdrBaseInfo == null)
                 {
-                    if (_ctrlHdrBaseInfo == null)
-                    {
-                        _ctrlHdrBaseInfo = new ctrlHdrBaseInfo();
-                        _ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo";
-                    }
-                    _ctrlHdrBaseInfo.SetBindingData(_hdrBaseInfo);
-                    _ctrlHdrBaseInfo.SetBindingData(_geomBaseInfo);
-                    _ctrlHdrBaseInfo.SaveHistoryParas(_hdrBaseInfo, _geomBaseInfo);
+                    _ctrlHdrBaseInfo = new ctrlHdrBaseInfo();
+                    _ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo";
                 }
+                _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 (_sectionBundleInfo == null)
+                    return;
+                CreateSectionStepCtrl();
+                _isHaveCreateWaterBody3d = false;
+                DockStepParaCtrl(_ctrlSectionBundleInfo);
+                if (_ctrlSectionBundleInfo != null)
                 {
-                    if (_ctrlSectionBundleInfo == null)
-                    {
-                        _ctrlSectionBundleInfo = new ctrlSectionBundleInfo();
-                        _ctrlSectionBundleInfo.Name = "ctrlSectionBaseInfo";
-                        _ctrlSectionBundleInfo.OnRefreshShape += RefreshSectShapeWhole18;
-                        _ctrlSectionBundleInfo.OnHightLightSectCurve += HightLightSectCurve;
-                    }
-
-                    _ctrlSectionBundleInfo.ShowPage(_hdrBaseInfo, _geomBaseInfo,
-                        DPumpHydr.ViewModel.eWizardStepDiretion.鍓嶈繘,true);
-                    _ctrlSectionBundleInfo.RefreshAllSectPara(_sectionBundleInfo);
-                    RefreshSectShapeWhole18(_sectionBundleInfo);
+                    _ctrlSectionBundleInfo.SetBindingData(_sectionBundleInfo);
                 }
+                _ctrlSectionBundleInfo.ShowPage(_hdrBaseInfo, _geomBaseInfo,
+                        DPumpHydr.ViewModel.eWizardStepDiretion.鍓嶈繘, false);
+                _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();
+                _isHaveCreateWaterBody3d = false;
+                DockStepParaCtrl(_ctrlSetOutflowParas);
+                _ctrlSetOutflowParas.Isxml = true;
+                InitilOutflowStepCtrl(this._stepTreeDockPanel.Step_ID_Section18_Full);
 
-                    _ctrlSetOutflowParas.SetBindingData( _outflowParas);
+                this._occDesign2dCtrl.SetAllSectionCurveVisible(false);
+                this._occDesign3dCtrl.SetAllSectionCurveVisible(false);
 
-                    #region  鍔犲帤
-                    if (_bodyThickness>0)
-                    {
-                        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
-                }
+                RbtnChk鏍囨敞.Visible = true;
+                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Outflow_Paras);
 
                 #endregion
 
 
+                #region  鍔犲帤
+                if (_bodyThickness < 1)
+                    return;
+                InitilThicknessStepCtrl(this._stepTreeDockPanel.Step_ID_Outflow_Paras, _bodyThickness);
+
+                DockStepParaCtrl(_ctrlThicknessParas);
+                _stepTreeDockPanel.SetFocusedNode(this._stepTreeDockPanel.Step_ID_Thickness);
+
+                RbtnChk鏍囨敞.Visible = true;
+                #endregion
+
+                GoNextStep();
             }
         }
+
 
 
         /// <summary>
@@ -209,21 +182,21 @@
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 this._occDesign3dCtrl.ExportThicknessBody(dlg.FileName.Replace(".stp", "_body.stp"), FileType.ESTEPFILE);
-                this._occDesign3dCtrl.ExportWaterBodyFile(dlg.FileName.Replace(".stp","_water.stp"), FileType.ESTEPFILE);
+                this._occDesign3dCtrl.ExportWaterBodyFile(dlg.FileName.Replace(".stp", "_water.stp"), FileType.ESTEPFILE);
 
                 new DPumpHydr.WinFrmUI.VoluteXmlParasTranHelper().Save(
     dlg.FileName.Replace(".stp", ".xml"),
     _hdrBaseInfo,
     _geomBaseInfo,
-    _sectionBundleInfo, 
+    _sectionBundleInfo,
     _outflowParas,
     this._bodyThickness);
             }
-                
+
         }
-      
-        
-        
+
+
+
         /// <summary>
         /// 铚楀3鍙傛暟瀵煎嚭
         /// </summary>
@@ -248,10 +221,10 @@
     dlg.FileName.Replace(".stp", ".igs"),
     _hdrBaseInfo,
     _geomBaseInfo,
-    _sectionBundleInfo, 
+    _sectionBundleInfo,
     _outflowParas,
     this._bodyThickness);
-            } 
+            }
 
         }
     }

--
Gitblit v1.9.3