From 3effbd15ec04bbc39514c6904fa71d00631c96eb Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期一, 04 十一月 2024 01:36:42 +0800
Subject: [PATCH] 整合属性研究

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/01-pipe/00-core/HydroPipeViewModel.cs |   45 ++++++++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/01-pipe/00-core/HydroPipePropertyViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/01-pipe/00-core/HydroPipeViewModel.cs
similarity index 65%
rename from WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/01-pipe/00-core/HydroPipePropertyViewModel.cs
rename to WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/01-pipe/00-core/HydroPipeViewModel.cs
index aedf5a5..0748b5b 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/01-pipe/00-core/HydroPipePropertyViewModel.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/01-pipe/00-core/HydroPipeViewModel.cs
@@ -3,19 +3,19 @@
 namespace Yw.WinFrmUI
 {
     /// <summary>
-    /// 绠¢亾灞炴�ц鍥�
+    /// 绠¢亾瑙嗗浘
     /// </summary>
-    public class HydroPipePropertyViewModel : HydroLinkPropertyViewModel
+    public class HydroPipeViewModel : HydroLinkViewModel
     {
         /// <summary>
         /// 
         /// </summary>
-        public HydroPipePropertyViewModel() : base() { }
+        public HydroPipeViewModel() { }
 
         /// <summary>
         /// 
         /// </summary>
-        public HydroPipePropertyViewModel(Yw.Model.HydroPipeInfo rhs) : base(rhs)
+        public HydroPipeViewModel(Yw.Model.HydroPipeInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
         {
             this.Material = rhs.Material;
             this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material));
@@ -27,6 +27,7 @@
             this.UpdatePropStatus(nameof(this.Roughness), rhs, nameof(rhs.Roughness));
             this.MinorLoss = rhs.MinorLoss;
             this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss));
+            this.Vmo = rhs;
         }
 
         /// <summary>
@@ -87,25 +88,31 @@
         public double MinorLoss { get; set; }
 
         /// <summary>
+        /// 
+        /// </summary>
+        public new Yw.Model.HydroPipeInfo Vmo { get; set; }
+
+
+
+        /// <summary>
         /// 鏇存柊灞炴��
         /// </summary>
-        public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList)
+        public override void Update()
         {
-            base.UpdateProperty(rhs, allParterList);
-            if (rhs is Yw.Model.HydroPipeInfo hydroPipeInfo)
-            {
-                this.Material = hydroPipeInfo.Material;
-                this.UpdatePropStatus(nameof(this.Material), hydroPipeInfo, nameof(hydroPipeInfo.Material));
-                this.Diameter = hydroPipeInfo.Diameter;
-                this.UpdatePropStatus(nameof(this.Diameter), hydroPipeInfo, nameof(hydroPipeInfo.Diameter));
-                this.Length = hydroPipeInfo.Length;
-                this.UpdatePropStatus(nameof(this.Length), hydroPipeInfo, nameof(hydroPipeInfo.Length));
-                this.Roughness = hydroPipeInfo.Roughness;
-                this.UpdatePropStatus(nameof(this.Roughness), hydroPipeInfo, nameof(hydroPipeInfo.Roughness));
-                this.MinorLoss = hydroPipeInfo.MinorLoss;
-                this.UpdatePropStatus(nameof(this.MinorLoss), hydroPipeInfo, nameof(hydroPipeInfo.MinorLoss));
-            }
+            base.Update();
+            this.Material = this.Vmo.Material;
+            this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material));
+            this.Diameter = this.Vmo.Diameter;
+            this.UpdatePropStatus(nameof(this.Diameter), this.Vmo, nameof(this.Vmo.Diameter));
+            this.Length = this.Vmo.Length;
+            this.UpdatePropStatus(nameof(this.Length), this.Vmo, nameof(this.Vmo.Length));
+            this.Roughness = this.Vmo.Roughness;
+            this.UpdatePropStatus(nameof(this.Roughness), this.Vmo, nameof(this.Vmo.Roughness));
+            this.MinorLoss = this.Vmo.MinorLoss;
+            this.UpdatePropStatus(nameof(this.MinorLoss), this.Vmo, nameof(this.Vmo.MinorLoss));
         }
 
+
+
     }
 }

--
Gitblit v1.9.3