From 4f7cb65b079d88d5a829688b24d26d5145c5df47 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期一, 13 一月 2025 09:17:34 +0800
Subject: [PATCH] 文件补交

---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.cs |   75 ++++++++++++++++++++++++++++++++-----
 1 files changed, 65 insertions(+), 10 deletions(-)

diff --git "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs" "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs"
index 0b22448..9de8f70 100644
--- "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs"
+++ "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs"
@@ -5,11 +5,9 @@
 using System.Drawing;
 using System.IO;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Text; 
 using System.Windows.Forms;
-using DPumpHydr.WinFrmUI.Volute.ViewModel;
-using static System.Runtime.InteropServices.JavaScript.JSType;
+using DPumpHydr.WinFrmUI.Volute.ViewModel; 
 
 namespace DPumpHydr.WinFrmUI.Volute
 {
@@ -29,7 +27,7 @@
                 }
             }; 
         }
-        eOutflowStyle _stype = eOutflowStyle.鏈煡;
+        
         public Func<ViewModel.OtuflowParas, ViewModel.OtuflowParasCalcReponse> OnRefreshShape3D = null;
         public Func<ViewModel.OtuflowParas, ViewModel.OtuflowParasCalcReponse> OnRefreshShape2D = null;
         ViewModel.OtuflowParas _outflowParas = null;
@@ -37,6 +35,15 @@
         //鎺т欢
         SetOutflowParasCtrl1 _sidelineExitControl = null;
         SetOutflowParasCtrl2 _sideCurveExitControl = null;
+
+        eOutflowStyle _stype = eOutflowStyle.鏈煡;
+        public eOutflowStyle CurrentOutflowStyle
+        {
+            get
+            {
+                return _stype;
+            }
+        }
         public void SetOutflowStyle(eOutflowStyle style)
         {
             if (_stype == style)
@@ -52,7 +59,7 @@
 
                     if (_sidelineExitControl == null)
                     {
-                        _sidelineExitControl = new SetOutflowParasCtrl1();
+                        _sidelineExitControl = new SetOutflowParasCtrl1() { Name = "SetOutflowParasCtrl1" };
                         _sidelineExitControl.OnRefreshShape += (para) =>
                         {
                             if (OnRefreshShape2D != null)
@@ -69,7 +76,7 @@
                     metroTile鎵╂暎绠″舰鐘�.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238);
                     if (_sidelineExitControl == null)
                     {
-                        _sidelineExitControl = new SetOutflowParasCtrl1();
+                        _sidelineExitControl = new SetOutflowParasCtrl1() { Name= "SetOutflowParasCtrl1" };
                         _sidelineExitControl.OnRefreshShape += (para) =>
                         {
                             if (OnRefreshShape2D != null)
@@ -87,15 +94,63 @@
                     metroTile鎵╂暎绠″舰鐘�.BackgroundImage = GlobalResource.BuildImage("Side-exit-straight-line.png", 878, 238);
 
                     if (_sideCurveExitControl == null)
-                        _sideCurveExitControl = new SetOutflowParasCtrl2();
-                    _sideCurveExitControl.Dock = DockStyle.Top;
+                    {
+                        _sideCurveExitControl = new SetOutflowParasCtrl2() { Name = "SetOutflowParasCtrl2" };
+                        _sideCurveExitControl.OnRefreshShape += (para) =>
+                        {
+                            if (OnRefreshShape2D != null)
+                                return OnRefreshShape2D(para);
+                            else
+                                return null;
+                        };
+                        _sideCurveExitControl.Dock = DockStyle.Top;
+                    }
+
                     tabPage1.Controls.Add(_sideCurveExitControl);
                     return;
                 default:
                     throw new ArgumentException("Invalid control type");
             }
         }
-
+        public void SetBindingData(
+            eOutflowStyle style,
+            ViewModel.HdrBaseInfo hdrBaseInfo,
+            ViewModel.GeomBaseInfo geomBaseInfo,
+            ViewModel.SectionBundleInfo sectionBundleInfo)
+        {
+            if(_outflowParas == null)
+            {
+                InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo);
+            }
+            else
+            {
+                if (_stype == style)
+                    return;
+                if(_stype == eOutflowStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴)
+                {
+                    if(style != eOutflowStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴)
+                    {
+                        InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo);
+                    }
+                    else
+                    {
+                        SetOutflowStyle(style);
+                    }
+                }
+                else
+                {
+                    if (style == eOutflowStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴)
+                    {
+                        InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo);
+                    }
+                    else
+                    {
+                        SetOutflowStyle(style);
+                    }
+                }
+         
+            }
+        }
         public void InitialParas(
             eOutflowStyle style,
             ViewModel.HdrBaseInfo hdrBaseInfo,

--
Gitblit v1.9.3