namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 连接节点
|
/// </summary>
|
public class HydroJunctionViewModel : HydroNodeViewModel
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroJunctionViewModel() : base() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroJunctionViewModel(Yw.Model.HydroJunctionInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
|
{
|
this.Elev = rhs.Elev;
|
this.UpdatePropStatus(nameof(this.Elev), rhs, nameof(rhs.Elev));
|
this.MinorLoss = rhs.MinorLoss;
|
this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss));
|
this.Demand = rhs.Demand;
|
this.UpdatePropStatus(nameof(this.Demand), rhs, nameof(rhs.Demand));
|
this.DemandPattern = rhs.DemandPattern;
|
this.UpdatePropStatus(nameof(this.DemandPattern), rhs, nameof(rhs.DemandPattern));
|
|
this.Vmo = rhs;
|
}
|
|
|
/// <summary>
|
/// 标高/高程
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("标高")]
|
[PropertyOrder(1001)]
|
[DisplayUnit("m")]
|
[Browsable(true)]
|
public virtual double Elev { get; set; }
|
|
/// <summary>
|
/// 损失系数
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("损失系数")]
|
[PropertyOrder(1002)]
|
[Browsable(true)]
|
public virtual double? MinorLoss { get; set; }
|
|
/// <summary>
|
/// 需水量
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("需水量")]
|
[PropertyOrder(1003)]
|
[DisplayUnit("m³/h")]
|
[Browsable(false)]
|
public virtual double? Demand { get; set; }
|
|
/// <summary>
|
/// 需水模式
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("需水模式")]
|
[PropertyOrder(1004)]
|
[IsHydroPatternPro(HydroPattern.Demand)]
|
[Browsable(false)]
|
public virtual string DemandPattern { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
[Browsable(false)]
|
public new Yw.Model.HydroJunctionInfo Vmo { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public override void Update()
|
{
|
base.Update();
|
this.Elev = this.Vmo.Elev;
|
this.UpdatePropStatus(nameof(this.Elev), this.Vmo, nameof(this.Vmo.Elev));
|
this.MinorLoss = this.Vmo.MinorLoss;
|
this.UpdatePropStatus(nameof(this.MinorLoss), this.Vmo, nameof(this.Vmo.MinorLoss));
|
this.Demand = this.Vmo.Demand;
|
this.UpdatePropStatus(nameof(this.Demand), this.Vmo, nameof(this.Vmo.Demand));
|
this.DemandPattern = this.Vmo.DemandPattern;
|
this.UpdatePropStatus(nameof(this.DemandPattern), this.Vmo, nameof(this.Vmo.DemandPattern));
|
}
|
|
|
|
|
}
|
}
|