namespace Yw.WinFrmUI
{
///
/// 三通属性视图
///
public class HydroThreelinkViewModel : HydroCouplingViewModel
{
///
///
///
public HydroThreelinkViewModel() : base() { }
///
///
///
public HydroThreelinkViewModel(Yw.Model.HydroThreelinkInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
{
this.RunningThroughLoss = rhs.RunningThroughLoss;
this.UpdatePropStatus(nameof(this.RunningThroughLoss), rhs, nameof(rhs.RunningThroughLoss));
this.BranchThroughLoss = rhs.BranchThroughLoss;
this.UpdatePropStatus(nameof(this.BranchThroughLoss), rhs, nameof(rhs.BranchThroughLoss));
this.Vmo = rhs;
}
///
/// 运行通过
///
[Category("数据")]
[DisplayName("运行通过")]
[PropertyOrder(101)]
[Browsable(true)]
public double? RunningThroughLoss { get; set; }
///
/// 支管通过
///
[Category("数据")]
[DisplayName("支管通过")]
[PropertyOrder(102)]
[Browsable(true)]
public double? BranchThroughLoss { get; set; }
///
///
///
[Browsable(false)]
public new Yw.Model.HydroThreelinkInfo Vmo { get; set; }
///
///
///
public override void UpdateProperty()
{
base.UpdateProperty();
this.RunningThroughLoss = this.Vmo.RunningThroughLoss;
this.UpdatePropStatus(nameof(this.RunningThroughLoss), this.Vmo, nameof(this.Vmo.RunningThroughLoss));
this.BranchThroughLoss = this.Vmo.BranchThroughLoss;
this.UpdatePropStatus(nameof(this.BranchThroughLoss), this.Vmo, nameof(this.Vmo.BranchThroughLoss));
}
public override void UpdateVmoProperty()
{
base.UpdateVmoProperty();
this.Vmo.RunningThroughLoss = this.RunningThroughLoss;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.RunningThroughLoss), this, nameof(this.RunningThroughLoss));
this.Vmo.BranchThroughLoss = this.BranchThroughLoss;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.BranchThroughLoss), this, nameof(this.BranchThroughLoss));
}
}
}