namespace Yw.WinFrmUI
{
///
/// 弯头视图
///
public class HydroElbowViewModel : HydroCouplingViewModel
{
///
///
///
public HydroElbowViewModel() : base() { }
///
///
///
public HydroElbowViewModel(Yw.Model.HydroElbowInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
{
this.BendingAngle = rhs.BendingAngle;
this.UpdatePropStatus(nameof(this.BendingAngle), rhs, nameof(rhs.BendingAngle));
this.ElbowType = rhs.ElbowType;
this.UpdatePropStatus(nameof(this.ElbowType), rhs, nameof(rhs.ElbowType));
this.Vmo = rhs;
}
///
/// 弯曲角度
///
[Category("数据")]
[DisplayName("弯曲角度")]
[PropertyOrder(101)]
[DisplayUnit("°")]
[Browsable(true)]
public double? BendingAngle { get; set; }
///
/// 弯头类型
///
[Category("数据")]
[DisplayName("弯头类型")]
[PropertyOrder(102)]
[DisplayUnit("mm")]
[Browsable(true)]
public string ElbowType { get; set; }
///
///
///
[Browsable(false)]
public new Yw.Model.HydroElbowInfo Vmo { get; set; }
///
///
///
public override void UpdateProperty()
{
base.UpdateProperty();
this.BendingAngle = this.Vmo.BendingAngle;
this.UpdatePropStatus(nameof(this.BendingAngle), this.Vmo, nameof(this.Vmo.BendingAngle));
this.ElbowType = this.Vmo.ElbowType;
this.UpdatePropStatus(nameof(this.ElbowType), this.Vmo, nameof(this.Vmo.ElbowType));
}
public override void UpdateVmoProperty()
{
base.UpdateVmoProperty();
this.Vmo.BendingAngle = this.BendingAngle;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.BendingAngle), this, nameof(this.BendingAngle));
this.Vmo.ElbowType = this.ElbowType;
this.Vmo.UpdatePropStatus(nameof(this.Vmo.ElbowType), this, nameof(this.ElbowType));
}
}
}