From b4c867bf85d3edef5d084a3a26f13cbc6784bf58 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期一, 16 十二月 2024 13:37:21 +0800
Subject: [PATCH] 提交

---
 WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowStyle.cs |   76 +++++++++++++++++++++++++++++++++++--
 1 files changed, 71 insertions(+), 5 deletions(-)

diff --git "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowStyle.cs" "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowStyle.cs"
index 7a38d20..43eefba 100644
--- "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowStyle.cs"
+++ "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowStyle.cs"
@@ -1,25 +1,91 @@
-锘縰sing System;
+锘�
+
+using DPumpHydr.WinFrmUI.Volute.ViewModel;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
-namespace DPumpHydr.WinFrmUI.Volute 
+namespace DPumpHydr.WinFrmUI.Volute
 {
-    public partial class ctrlSetOutflowStyle : UserControl
+    public partial class ctrlSetOutflowStyle : ParasInfoBaseCtrl
     {
         public ctrlSetOutflowStyle()
         {
             InitializeComponent();
+            AddControlToPanel(_type, panel);
+            BuildAllTips();
+        }
+        int _type = 0;
+        public void SetBindingData(eOutflowStyle eOutflowStyle)
+        {
+            if (eOutflowStyle == eOutflowStyle.涓績鍑哄彛_鍨傜洿娉曞叞闈㈡祦鍑�)
+            {
+                _type = 0;
+                panel.Controls.Clear();
+                AddControlToPanel(_type, panel);
+            }
+            if (eOutflowStyle == eOutflowStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴)
+            {
+                _type = 1;
+                panel.Controls.Clear();
+                AddControlToPanel(_type, panel);
+            }
+            if (eOutflowStyle == eOutflowStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴)
+            {
+                _type = 2;
+                panel.Controls.Clear();
+                AddControlToPanel(_type, panel);
+            }
+        }
+        private Control AddControlToPanel(int type, Panel panel)
+        {
+            Control newControl = null;
+            switch (type)
+            {
+                case 0:
+                    newControl = new centralExitControl();
+                    metroTile鎵╂暎绠″舰鐘�.BackgroundImage = GlobalResource.BuildImage("Central-exit.png", 878, 238);
+                    break;
+                case 1:
+                    newControl = new sideCurveExitControl();
+                    metroTile鎵╂暎绠″舰鐘�.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238);
+                    break;
+                case 2:
+                    newControl = new sidelineExitControl();
+                    metroTile鎵╂暎绠″舰鐘�.BackgroundImage = GlobalResource.BuildImage("Side-exit-straight-line.png", 878, 238);
+                    break;
+                default:
+                    throw new ArgumentException("Invalid control type");
+            }
+
+            // 灏嗘帶浠舵坊鍔犲埌Panel涓�
+            panel.Controls.Add(newControl);
+            newControl.Dock = DockStyle.Top;
+            return newControl;
         }
 
-        private void ctrlSelectOutflowStyle_Load(object sender, EventArgs e)
-        {
 
+       
+
+        private void BuildAllTips()
+        {
+            metroToolTip绗叚姝ユ彁绀�.SetToolTip(this.metroTile鎵╂暎绠″舰鐘�, "鏂潰鍥�");
+        }
+
+
+
+
+
+        private void mBtn鏇存柊妯″瀷_Click(object sender, EventArgs e)
+        {
+            
         }
     }
 }

--
Gitblit v1.9.3