namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public class HydroSinglePumpListItemExtendViewModel
|
{
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroSinglePumpListItemExtendViewModel() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroSinglePumpListItemExtendViewModel(Yw.Model.HydroPumpInfo rhs, bool isRated)
|
{
|
if (isRated)
|
{
|
this.Name = "额定曲线";
|
this.Color = Color.Black;
|
this.Hz = rhs.RatedHz;
|
this.Extend = 100;
|
|
}
|
else
|
{
|
this.Name = "设定曲线";
|
this.Color = Color.Red;
|
this.Hz = Math.Round(rhs.RatedHz * rhs.SpeedRatio, 1);
|
this.Extend = 100;
|
}
|
this.IsRated = isRated;
|
|
this.Vmo = rhs;
|
}
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
[Display(Name = "名称")]
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 颜色
|
/// </summary>
|
[Display(Name = "颜色")]
|
public Color Color { get; set; }
|
|
/// <summary>
|
/// 频率
|
/// </summary>
|
[Display(Name = "频率(hz)")]
|
public double Hz { get; set; }
|
|
/// <summary>
|
/// 转速
|
/// </summary>
|
[Display(Name = "转速(r/min)")]
|
public double N
|
{
|
get
|
{
|
if (this.Vmo == null)
|
{
|
return default;
|
}
|
return Math.Round(this.Hz / this.Vmo.RatedHz * this.Vmo.RatedN, 1);
|
}
|
}
|
|
/// <summary>
|
/// 延长
|
/// </summary>
|
[Display(Name = "延长(%)")]
|
public double Extend { get; set; }
|
|
/// <summary>
|
/// 额定
|
/// </summary>
|
[Display(Name = "额定")]
|
public bool IsRated { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public Yw.Model.HydroPumpInfo Vmo { get; set; }
|
|
|
}
|
}
|