From b266e82b9a377fa35a766f7a3a2f5aa95f3c9125 Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 28 三月 2025 17:57:03 +0800 Subject: [PATCH] 修改首页场所列表 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-docking/HydroMonitorDockingViewModel.cs | 63 +------------------------------ 1 files changed, 3 insertions(+), 60 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-docking/HydroMonitorDockingViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-docking/HydroMonitorDockingViewModel.cs index 8d5a61b..3de3dd4 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-docking/HydroMonitorDockingViewModel.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-docking/HydroMonitorDockingViewModel.cs @@ -21,15 +21,14 @@ ) { this.Checked = vmo.ID > 0; - 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; - - UpdatePropValue(propValue); } /// <summary> @@ -42,7 +41,7 @@ /// 鏋勪欢 /// </summary> [DisplayName("鏋勪欢")] - public string Relation { get; set; } + public string Parter { get; set; } /// <summary> /// 鍚嶇О @@ -85,63 +84,7 @@ /// </summary> 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