ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/03-other/03-pressmeter/HydroPressmeterPropertyViewModel.cs ÐÞ¸Ä |
| | |
| | | using Yw.Model; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// ååè¡¨å±æ§è§å¾ |
| | | /// åå表è§å¾ |
| | | /// </summary> |
| | | public class HydroPressmeterPropertyViewModel : HydroJunctionPropertyViewModel |
| | | public class HydroPressmeterViewModel : HydroJunctionViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroPressmeterPropertyViewModel() : base() { } |
| | | public HydroPressmeterViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroPressmeterPropertyViewModel(Yw.Model.HydroPressmeterInfo rhs) : base(rhs) |
| | | public HydroPressmeterViewModel(Yw.Model.HydroPressmeterInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo) |
| | | { |
| | | this.CurrentPress = rhs.CurrentPress.HasValue ? Math.Round(rhs.CurrentPress.Value, 2) : null; |
| | | this.UpdatePropStatus(nameof(this.CurrentPress), rhs, nameof(rhs.CurrentPress)); |
| | | |
| | | this.Vmo = rhs; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public double? CalcuPr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Browsable(false)] |
| | | public new Yw.Model.HydroPressmeterInfo 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.HydroPressmeterInfo hydroPressmeterInfo) |
| | | { |
| | | this.CurrentPress = hydroPressmeterInfo.CurrentPress; |
| | | this.UpdatePropStatus(nameof(this.CurrentPress), hydroPressmeterInfo, nameof(hydroPressmeterInfo.CurrentPress)); |
| | | } |
| | | base.Update(); |
| | | this.CurrentPress = this.Vmo.CurrentPress; |
| | | this.UpdatePropStatus(nameof(this.CurrentPress), this.Vmo, nameof(this.Vmo.CurrentPress)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è®¡ç®å±æ§ |
| | | /// </summary> |
| | | public override void UpdateCalcuProperty(IHydroCalcuResult rhs) |
| | | public override void UpdateCalcuProperty(HydroCalcuResult rhs) |
| | | { |
| | | base.UpdateCalcuProperty(rhs); |
| | | if (rhs is IHydroCalcuPressmeterResult calcuPressmeterProperty) |