using Yw.Model;
|
|
namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 连接件属性视图
|
/// </summary>
|
public class HydroCouplingPropertyViewModel : HydroJunctionPropertyViewModel
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroCouplingPropertyViewModel() : base() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroCouplingPropertyViewModel(Yw.Model.HydroCouplingInfo rhs) : base(rhs)
|
{
|
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));
|
}
|
|
|
/// <summary>
|
/// 材料
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("材料")]
|
[PropertyOrder(31)]
|
[Browsable(true)]
|
public string Material { get; set; }
|
|
/// <summary>
|
/// 口径
|
/// </summary>
|
[Category("数据")]
|
[DisplayName("口径")]
|
[PropertyOrder(32)]
|
[DisplayUnit("mm")]
|
[Browsable(true)]
|
public double? Caliber { get; set; }
|
|
/// <summary>
|
/// 更新属性
|
/// </summary>
|
public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList)
|
{
|
base.UpdateProperty(rhs, allParterList);
|
if (rhs is Yw.Model.HydroCouplingInfo hydroCouplingInfo)
|
{
|
this.Material = hydroCouplingInfo.Material;
|
this.UpdatePropStatus(nameof(this.Material), hydroCouplingInfo, nameof(hydroCouplingInfo.Material));
|
this.Caliber = hydroCouplingInfo.Caliber;
|
this.UpdatePropStatus(nameof(this.Caliber), hydroCouplingInfo, nameof(hydroCouplingInfo.Caliber));
|
}
|
}
|
|
|
|
}
|
}
|