namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 连接件属性视图
|
/// </summary>
|
public class HydroCouplingViewModel : HydroJunctionViewModel
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroCouplingViewModel() : base() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroCouplingViewModel(Yw.Model.HydroCouplingInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
|
{
|
this.Material = rhs.Material;
|
this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material));
|
this.Caliber = rhs.Caliber;
|
this.UpdatePropStatus(nameof(this.Caliber), rhs, nameof(rhs.Caliber));
|
|
this.Vmo = rhs;
|
}
|
|
|
/// <summary>
|
/// 材料
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("材料")]
|
[PropertyOrder(1001)]
|
[Browsable(true)]
|
public string Material { get; set; }
|
|
/// <summary>
|
/// 口径
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("口径")]
|
[PropertyOrder(1002)]
|
[DisplayUnit("mm")]
|
[Browsable(true)]
|
public double? Caliber { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
[Browsable(false)]
|
public new Yw.Model.HydroCouplingInfo Vmo { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public override void Update()
|
{
|
base.Update();
|
this.Material = this.Vmo.Material;
|
this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material));
|
this.Caliber = this.Vmo.Caliber;
|
this.UpdatePropStatus(nameof(this.Caliber), this.Vmo, nameof(this.Vmo.Caliber));
|
}
|
|
|
|
|
|
}
|
}
|