From 25d1bf4c50f43cf6690c5ac92824959865c9d78f Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期四, 13 三月 2025 10:34:40 +0800 Subject: [PATCH] BoxViewModel --- WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs | 80 +++++++++++++++++++++++++++++++++------ 1 files changed, 67 insertions(+), 13 deletions(-) diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs index 6dceaa6..aa2e303 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs @@ -1,4 +1,5 @@ -锘縰sing System.ComponentModel; +锘縰sing HStation.PBS; +using System.ComponentModel; using System.Windows.Forms.VisualStyles; namespace PBS.WinFrmUI @@ -21,111 +22,164 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; - this.Paras = rhs.Paras; - this.Flags = rhs.Flags; + this.Paras = rhs.Paras == null ? null : new(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; } public void Resert(Vmo.FacilityVmo rhs) { + this.ID = rhs.ID; + this.PlaceID = rhs.PlaceID; + this.PackageID = rhs.PackageID; + this.Name = rhs.Name; + this.WaterSupply = rhs.WaterSupply; + this.SupplyMode = rhs.SupplyMode; + this.Floor = rhs.Floor; + this.FloorHeight = rhs.FloorHeight; + this.Households = rhs.Households; + this.MaxWaterDemand = rhs.MaxWaterDemand; + this.ConstantPressure = rhs.ConstantPressure; + this.TerminalPressure = rhs.TerminalPressure; + this.Paras = rhs.Paras == null ? null : new(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; } /// <summary> /// 鏍囪瘑 ///</summary> + [DisplayName("ID")] + [Browsable(false)] public long ID { get; set; } /// <summary> - /// 鍦烘墍鏍囪瘑 + /// PlaceID ///</summary> + [DisplayName("PlaceID")] + [Browsable(false)] public long PlaceID { get; set; } /// <summary> /// 鎴愬璁惧鏍囪瘑 ///</summary> + [DisplayName("PackageID")] + [Browsable(false)] public long PackageID { get; set; } /// <summary> /// 鍚嶇О ///</summary> + [DisplayName("鍚嶇О")] + [Browsable(true)] public string Name { get; set; } /// <summary> /// 渚涙按鍗曞厓 ///</summary> - public int WaterSupply { get; set; } + [DisplayName("渚涙按鍗曞厓")] + [Browsable(true)] + public eWaterSupply WaterSupply { get; set; } /// <summary> /// 渚涙按妯″紡 ///</summary> - public int SupplyMode { get; set; } + [DisplayName("渚涙按妯″紡")] + [Browsable(true)] + public eSupplyMode SupplyMode { get; set; } /// <summary> /// 妤煎眰 ///</summary> + [DisplayName("妤煎眰")] + [Browsable(true)] public int Floor { get; set; } /// <summary> /// 灞傞珮 ///</summary> + [DisplayName("灞傞珮")] + [Browsable(true)] public double? FloorHeight { get; set; } /// <summary> /// 鎴锋暟 ///</summary> + + [DisplayName("鎴锋暟")] + [Browsable(true)] public int? Households { get; set; } /// <summary> /// 鏈�澶ч渶姘撮噺 ///</summary> - public double? MaxWaterDemand { get; set; } - /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } + [DisplayName("鏈�澶ч渶姘撮噺")] + [Browsable(true)] + public double? MaxWaterDemand { get; set; } /// <summary> /// 鎭掑畾鍘嬪姏 ///</summary> + [DisplayName("鎭掑畾鍘嬪姏")] + [Browsable(true)] public double? ConstantPressure { get; set; } /// <summary> /// 鏈鍘嬪姏 ///</summary> + [DisplayName("鏈鍘嬪姏")] + [Browsable(true)] public double? TerminalPressure { get; set; } /// <summary> /// 鍙傛暟 ///</summary> + [DisplayName("鍙傛暟")] + [Browsable(true)] public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 ///</summary> + [DisplayName("鏍囩")] + [Browsable(true)] public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 ///</summary> + [DisplayName("鏍囧織")] + [Browsable(true)] public string TagName { get; set; } /// <summary> /// 浣跨敤鐘舵�� ///</summary> - public int UseStatus { get; set; } + [DisplayName("浣跨敤鐘舵��")] + [Browsable(true)] + public Yw.Vmo.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� ///</summary> + [DisplayName("鎺掑簭鐮�")] + [Browsable(true)] public int SortCode { get; set; } /// <summary> /// 璇存槑 ///</summary> + [DisplayName("璇存槑")] + [Browsable(true)] public string Description { get; set; } } } \ No newline at end of file -- Gitblit v1.9.3