From 74706b439194deed9c5fde2d5ed02226fc33fd69 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 19 十一月 2024 16:43:56 +0800 Subject: [PATCH] 优化资产界面文字及颜色 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 7 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs index 46cc9a3..dbd593d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs @@ -8,6 +8,41 @@ /// </summary> public class ValveMatchingViewModel { + /// <summary> + /// + /// </summary> + public ValveMatchingViewModel() + { } + + /// <summary> + /// + /// </summary> + public ValveMatchingViewModel(Yw.Model.HydroValveInfo rhs, Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResult) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Code = rhs.Code; + this.ModelType = rhs.ModelType; + this.DbLocked = rhs.DbLocked; + this.DbId = rhs.DbId; + this.CurveDbId = hydroInfo.Curves?.Find(x => x.Code == rhs.ValveSetting)?.DbId; + this.Material = rhs.Material; + this.Diameter = rhs.Diameter; + this.MinorLoss = rhs.MinorLoss; + switch (rhs.ValveType) + { + case Yw.Hydro.ValveType.PRV: this.ValveType = HStation.Assets.eValveType.PRV; break; + case Yw.Hydro.ValveType.PSV: this.ValveType = HStation.Assets.eValveType.PSV; break; + case Yw.Hydro.ValveType.PBV: this.ValveType = HStation.Assets.eValveType.PBV; break; + case Yw.Hydro.ValveType.TCV: this.ValveType = HStation.Assets.eValveType.TCV; break; + case Yw.Hydro.ValveType.FCV: this.ValveType = HStation.Assets.eValveType.FCV; break; + case Yw.Hydro.ValveType.GPV: this.ValveType = HStation.Assets.eValveType.GPV; break; + case Yw.Hydro.ValveType.CV: this.ValveType = HStation.Assets.eValveType.CV; break; + default: break; + } + this.ValveSetting = rhs.ValveSetting; + } + /// <summaryd> /// ID /// </summary> @@ -51,11 +86,11 @@ public string DbId { get; set; } /// <summary> - /// ChartDbId + /// CurveDbId /// </summary> - [DisplayName("ChartDbId")] + [DisplayName("CurveDbId")] [Browsable(false)] - public string ChartDbId { get; set; } + public string CurveDbId { get; set; } /// <summary> /// 鐩村緞 @@ -114,11 +149,11 @@ public double? MatchingDiameter { get; set; } /// <summary> - /// MatchingChartDbId + /// MatchingCurveDbId /// </summary> - [DisplayName("MatchingChartDbId")] + [DisplayName("MatchingCurveDbId")] [Browsable(false)] - public string MatchingChartDbId { get; set; } + public string MatchingCurveDbId { get; set; } /// <summary> /// 鍖归厤鏉愯川 @@ -139,7 +174,7 @@ /// </summary> [DisplayName("鍖归厤闃�闂ㄧ被鍨�")] [Browsable(true)] - public eValveType MatchingValveType { get; set; } + public eValveType? MatchingValveType { get; set; } /// <summary> /// 鍖归厤闃�闂ㄨ缃� -- Gitblit v1.9.3