namespace Yw.WinFrmUI
{
///
/// 水库视图
///
public class HydroReservoirViewModel : HydroSourceViewModel
{
///
///
///
public HydroReservoirViewModel() : base() { }
///
///
///
public HydroReservoirViewModel(Yw.Model.HydroReservoirInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
{
this.PoolElev = rhs.PoolElev;
this.UpdatePropStatus(nameof(this.PoolElev), rhs, nameof(rhs.PoolElev));
this.Head = rhs.Head;
this.UpdatePropStatus(nameof(this.Head), rhs, nameof(rhs.Head));
this.HeadPattern = rhs.HeadPattern;
this.UpdatePropStatus(nameof(this.HeadPattern), rhs, nameof(rhs.HeadPattern));
this.Vmo = rhs;
}
///
/// 池底标高
///
[Category("数据")]
[DisplayName("池底标高")]
[HydroMarkPro]
[PropertyOrder(1001)]
[DisplayUnit("m")]
[Browsable(true)]
public double? PoolElev { get; set; }
///
/// 总水头
///
[Category("数据")]
[DisplayName("总水头")]
[HydroMarkPro]
[PropertyOrder(1002)]
[DisplayUnit("m")]
[Browsable(true)]
public double Head { get; set; }
///
/// 水头模式
///
[Category("数据")]
[DisplayName("水头模式")]
[PropertyOrder(1003)]
[HydroPatternPro(HydroPattern.Head)]
[Browsable(true)]
public string HeadPattern { get; set; }
///
///
///
[Browsable(false)]
public new Yw.Model.HydroReservoirInfo Vmo { get; set; }
///
///
///
public override void UpdateProperty()
{
base.UpdateProperty();
this.PoolElev = this.Vmo.PoolElev;
this.UpdatePropStatus(nameof(this.PoolElev), this.Vmo, nameof(this.Vmo.PoolElev));
this.Head = this.Vmo.Head;
this.UpdatePropStatus(nameof(this.Head), this.Vmo, nameof(this.Vmo.Head));
this.HeadPattern = this.Vmo.HeadPattern;
this.UpdatePropStatus(nameof(this.HeadPattern), this.Vmo, nameof(this.Vmo.HeadPattern));
}
///
///
///
public override void UpdateVmoProperty()
{
base.UpdateVmoProperty();
this.Vmo.PoolElev = this.PoolElev;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.PoolElev), this, nameof(this.PoolElev));
this.Vmo.Head = this.Head;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.Head), this, nameof(this.Head));
this.Vmo.HeadPattern = this.HeadPattern;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.HeadPattern), this, nameof(this.HeadPattern));
}
}
}