From bc0ed5b6cfda6c72c06f451b77da8518c41ab210 Mon Sep 17 00:00:00 2001
From: duheng <2286773002@qq.com>
Date: 星期四, 20 三月 2025 16:16:03 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/02-translation/HydroTranslationViewModel.cs |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/02-translation/HydroTranslationViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/02-translation/HydroTranslationViewModel.cs
index c55dfc8..5c1f7e0 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/02-translation/HydroTranslationViewModel.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/02-translation/HydroTranslationViewModel.cs
@@ -16,10 +16,11 @@
         public HydroTranslationViewModel(Yw.Model.HydroTranslationInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
         {
             this.Elev = Math.Round(rhs.Elev, 4);
+            this.TranslationType = rhs.TranslationType;
             this.Material = rhs.Material;
-            this.Length = Math.Round(rhs.Length, 0);
-            this.Roughness = Math.Round(rhs.Roughness, 0);
-            this.MinorLoss = Math.Round(rhs.MinorLoss, 0);
+            this.Length = Math.Round(rhs.Length, 4);
+            this.Roughness = rhs.Roughness;
+            this.MinorLoss = rhs.MinorLoss;
             this.StartDiameter = Math.Round(rhs.StartDiameter, 0);
             this.EndDiameter = Math.Round(rhs.EndDiameter, 0);
         }
@@ -36,12 +37,22 @@
         public virtual double Elev { get; set; }
 
         /// <summary>
+        /// 杩囨浮浠剁被鍨�
+        /// </summary>
+        [Category("鏁版嵁")]
+        [Display(Name = "杩囨浮浠剁被鍨�")]
+        [DisplayName("杩囨浮浠剁被鍨�")]
+        [PropertyOrder(2002)]
+        [Browsable(true)]
+        public string TranslationType { get; set; }
+
+        /// <summary>
         /// 鏉愯川
         /// </summary>
         [Category("鏁版嵁")]
         [Display(Name = "鏉愯川")]
         [DisplayName("鏉愯川")]
-        [PropertyOrder(2002)]
+        [PropertyOrder(2003)]
         [Browsable(true)]
         public string Material { get; set; }
 
@@ -52,8 +63,8 @@
         [Display(Name = "闀垮害(m)")]
         [DisplayName("闀垮害")]
         [DisplayUnit("m")]
-        [PropertyOrder(2003)]
-        [Browsable(true)]
+        [PropertyOrder(2004)]
+        [Browsable(false)]
         public double Length { get; set; }
 
         /// <summary>
@@ -63,8 +74,8 @@
         [Display(Name = "绮楃硻绯绘暟")]
         [DisplayName("绮楃硻绯绘暟")]
         [Description("娴锋.濞佸粔鍏紡绯绘暟")]
-        [PropertyOrder(2004)]
-        [Browsable(true)]
+        [PropertyOrder(2005)]
+        [Browsable(false)]
         public double Roughness { get; set; }
 
         /// <summary>
@@ -74,7 +85,7 @@
         [Display(Name = "灞�闃荤郴鏁�")]
         [DisplayName("灞�闃荤郴鏁�")]
         [Description("灞�閮ㄩ樆鍔涚郴鏁�")]
-        [PropertyOrder(2005)]
+        [PropertyOrder(2006)]
         [Browsable(true)]
         public double MinorLoss { get; set; }
 
@@ -166,19 +177,6 @@
         public override double? CalcuMinorLoss { get; set; }
 
         /// <summary>
-        /// 娌跨▼鎹熷け
-        /// </summary>
-        [Category("璁$畻缁撴灉")]
-        [DisplayName("娌跨▼鎹熷け")]
-        [DisplayUnit("m")]
-        [Display(Name = "娌跨▼鎹熷け(m)")]
-        [PropertyOrder(19009)]
-        [HydroCalcuPro]
-        [ShowEditor(false)]
-        [Browsable(true)]
-        public override double? CalcuFrictionLoss { get; set; }
-
-        /// <summary>
         /// 
         /// </summary>
         [Browsable(false)]
@@ -196,6 +194,8 @@
         public override void UpdateProperty()
         {
             base.UpdateProperty();
+            this.Elev = Math.Round(this.Vmo.Elev, 4);
+            this.TranslationType = this.Vmo.TranslationType;
             this.Material = this.Vmo.Material;
             this.Length = Math.Round(this.Vmo.Length, 4);
             this.Roughness = this.Vmo.Roughness;
@@ -210,6 +210,8 @@
         public override void UpdateVmoProperty()
         {
             base.UpdateVmoProperty();
+            this.Vmo.Elev = this.Elev;
+            this.TranslationType = this.TranslationType;
             this.Vmo.Material = this.Material;
             this.Vmo.Length = this.Length;
             this.Vmo.Roughness = this.Roughness;

--
Gitblit v1.9.3