using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yw.WinFrmUI
{
///
///
///
public class HydroPumpRunViewModel
{
///
///
///
public HydroPumpRunViewModel() { }
///
///
///
public HydroPumpRunViewModel(Yw.Model.HydroPumpInfo pump)
{
this.Code = pump.Code;
this.Name = pump.Name;
if (pump.LinkStatus == Yw.Hydro.PumpStatus.Open)
{
this.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_run_32;
this.CurrentHz = $"{Math.Round(pump.RatedHz * pump.SpeedRatio, 1)}hz";
}
else
{
this.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_shut_32;
}
this.Description = pump.Description;
this.Vmo = pump;
}
///
/// 编码
///
public string Code { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 图片
///
public Image Image { get; set; }
///
/// 当前Hz
///
public string CurrentHz { get; set; }
///
/// 说明
///
public string Description { get; set; }
///
/// vmo
///
public Yw.Model.HydroPumpInfo Vmo { get; set; }
}
}