From 6e1306ab578ed1ad79fc33b0bb7e496b897bf4a4 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期一, 20 一月 2025 10:48:03 +0800
Subject: [PATCH] 冲突处理

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/01-value/HydroMonitorValueViewModel.cs |   67 +--------------------------------
 1 files changed, 3 insertions(+), 64 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/01-value/HydroMonitorValueViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/01-value/HydroMonitorValueViewModel.cs
index 9bf2d6a..96e807c 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/01-value/HydroMonitorValueViewModel.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/01-value/HydroMonitorValueViewModel.cs
@@ -20,18 +20,14 @@
                 double? propValue
             )
         {
-            this.Relation = visual.Name;
+            this.Parter = visual.Name;
             this.PropName = HydroMonitorPropHelper.GetName(vmo.PropName);
+            this.PropValue = vmo.GetPropValue(propValue);
             this.UnitName = HydroMonitorPropHelper.GetUnit(vmo.PropName);
             this.Flags = Yw.Untity.FlagsHelper.ToString(vmo.Flags);
             this.SortCode = vmo.SortCode;
             this.Description = vmo.Description;
             this.Vmo = vmo;
-
-            if (propValue.HasValue)
-            {
-                UpdatePropValue(propValue.Value);
-            }
         }
 
 
@@ -39,7 +35,7 @@
         /// 鏋勪欢
         /// </summary>
         [DisplayName("鏋勪欢")]
-        public string Relation { get; set; }
+        public string Parter { get; set; }
 
         /// <summary>
         /// 鍚嶇О
@@ -82,63 +78,6 @@
         public Yw.Vmo.HydroMonitorVmo Vmo { get; set; }
 
 
-        /// <summary>
-        /// 鏇存柊灞炴�у��
-        /// </summary>
-        public void UpdatePropValue(double propValue)
-        {
-            switch (this.Vmo.PropName)
-            {
-                case Yw.Hydro.MonitorProp.CalcuQ:
-                    {
-                        this.PropValue = Math.Round(propValue, 1);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuP:
-                    {
-                        this.PropValue = Math.Round(propValue, 1);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuE:
-                    {
-                        this.PropValue = Math.Round(propValue, 1);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuPr:
-                    {
-                        this.PropValue = Math.Round(propValue, 2);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuO:
-                    {
-                        this.PropValue = Math.Round(propValue, 0);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuO1:
-                    {
-                        this.PropValue = Math.Round(propValue, 0);
-                    }
-                    break;
-                case Yw.Hydro.MonitorProp.CalcuO2:
-                    {
-                        this.PropValue = Math.Round(propValue, 0);
-                    }
-                    break;
-                default: this.PropValue = Math.Round(propValue, 2); break;
-            }
-        }
-
-        /// <summary>
-        /// 鏇存柊灞炴�у��
-        /// </summary>
-        public void UpdatePropValue(double? propValue)
-        {
-            this.PropValue = propValue;
-            if (propValue.HasValue)
-            {
-                UpdatePropValue(propValue.Value);
-            }
-        }
 
 
 

--
Gitblit v1.9.3