ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/01-pipe/00-core/HydroPipePropertyViewModel.cs ÐÞ¸Ä |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// 管é屿§è§å¾ |
| | | /// 管éè§å¾ |
| | | /// </summary> |
| | | public class HydroPipePropertyViewModel : HydroLinkPropertyViewModel |
| | | public class HydroPipeViewModel : HydroLinkViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroPipePropertyViewModel() : base() { } |
| | | public HydroPipeViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroPipePropertyViewModel(Yw.Model.HydroPipeInfo rhs) : base(rhs) |
| | | public HydroPipeViewModel(Yw.Model.HydroPipeInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo) |
| | | { |
| | | this.Material = rhs.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material)); |
| | |
| | | this.UpdatePropStatus(nameof(this.Roughness), rhs, nameof(rhs.Roughness)); |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss)); |
| | | this.Vmo = rhs; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public double MinorLoss { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public new Yw.Model.HydroPipeInfo Vmo { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ´æ°å±æ§ |
| | | /// </summary> |
| | | public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList) |
| | | public override void Update() |
| | | { |
| | | base.UpdateProperty(rhs, allParterList); |
| | | if (rhs is Yw.Model.HydroPipeInfo hydroPipeInfo) |
| | | { |
| | | this.Material = hydroPipeInfo.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), hydroPipeInfo, nameof(hydroPipeInfo.Material)); |
| | | this.Diameter = hydroPipeInfo.Diameter; |
| | | this.UpdatePropStatus(nameof(this.Diameter), hydroPipeInfo, nameof(hydroPipeInfo.Diameter)); |
| | | this.Length = hydroPipeInfo.Length; |
| | | this.UpdatePropStatus(nameof(this.Length), hydroPipeInfo, nameof(hydroPipeInfo.Length)); |
| | | this.Roughness = hydroPipeInfo.Roughness; |
| | | this.UpdatePropStatus(nameof(this.Roughness), hydroPipeInfo, nameof(hydroPipeInfo.Roughness)); |
| | | this.MinorLoss = hydroPipeInfo.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), hydroPipeInfo, nameof(hydroPipeInfo.MinorLoss)); |
| | | } |
| | | base.Update(); |
| | | this.Material = this.Vmo.Material; |
| | | this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material)); |
| | | this.Diameter = this.Vmo.Diameter; |
| | | this.UpdatePropStatus(nameof(this.Diameter), this.Vmo, nameof(this.Vmo.Diameter)); |
| | | this.Length = this.Vmo.Length; |
| | | this.UpdatePropStatus(nameof(this.Length), this.Vmo, nameof(this.Vmo.Length)); |
| | | this.Roughness = this.Vmo.Roughness; |
| | | this.UpdatePropStatus(nameof(this.Roughness), this.Vmo, nameof(this.Vmo.Roughness)); |
| | | this.MinorLoss = this.Vmo.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), this.Vmo, nameof(this.Vmo.MinorLoss)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |