namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 过渡件视图
|
/// </summary>
|
public class HydroTranslationViewModel : HydroPipeViewModel, IHydroCalcuTranslationResult
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroTranslationViewModel() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroTranslationViewModel(Yw.Model.HydroTranslationInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo)
|
{
|
this.StartDiameter = Math.Round(rhs.StartDiameter, 0);
|
this.UpdatePropStatus(nameof(this.StartDiameter), rhs, nameof(rhs.StartDiameter));
|
this.EndDiameter = Math.Round(rhs.EndDiameter, 0);
|
this.UpdatePropStatus(nameof(this.EndDiameter), rhs, nameof(rhs.EndDiameter));
|
}
|
|
/// <summary>
|
/// 直径
|
/// </summary>
|
[Category("数据")]
|
[Display(Name = "直径(mm)")]
|
[DisplayName("直径")]
|
[DisplayUnit("mm")]
|
[PropertyOrder(2002)]
|
[Browsable(false)]
|
public override double Diameter { get; set; }
|
|
/// <summary>
|
/// 上游直径
|
/// </summary>
|
[Category("数据")]
|
[Display(Name = "上游直径(mm)")]
|
[DisplayName("上游直径")]
|
[DisplayUnit("mm")]
|
[PropertyOrder(3001)]
|
[Browsable(true)]
|
public double StartDiameter { get; set; }
|
|
/// <summary>
|
/// 下游直径
|
/// </summary>
|
[Category("数据")]
|
[Display(Name = "下游直径(mm)")]
|
[DisplayName("下游直径")]
|
[DisplayUnit("mm")]
|
[PropertyOrder(3002)]
|
[Browsable(true)]
|
public double EndDiameter { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
[Browsable(false)]
|
public new Yw.Model.HydroTranslationInfo Vmo
|
{
|
get { return _vmo as Yw.Model.HydroTranslationInfo; }
|
set { _vmo = value; }
|
}
|
|
|
/// <summary>
|
/// 更新属性
|
/// </summary>
|
public override void UpdateProperty()
|
{
|
base.UpdateProperty();
|
this.StartDiameter = this.Vmo.StartDiameter;
|
this.UpdatePropStatus(nameof(this.StartDiameter), this.Vmo, nameof(this.Vmo.StartDiameter));
|
this.EndDiameter = this.Vmo.EndDiameter;
|
this.UpdatePropStatus(nameof(this.EndDiameter), this.Vmo, nameof(this.Vmo.EndDiameter));
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public override void UpdateVmoProperty()
|
{
|
base.UpdateVmoProperty();
|
this.Vmo.StartDiameter = this.StartDiameter;
|
this.Vmo.UpdatePropStatus(nameof(this.Vmo.StartDiameter), this, nameof(this.StartDiameter));
|
this.Vmo.EndDiameter = this.EndDiameter;
|
this.Vmo.UpdatePropStatus(nameof(this.Vmo.EndDiameter), this, nameof(this.EndDiameter));
|
}
|
|
}
|
}
|