namespace Yw.WinFrmUI
{
///
///
///
public class HydroPumpAnalyWorkingCheckedListItemViewModel
{
///
///
///
public HydroPumpAnalyWorkingCheckedListItemViewModel() { }
///
///
///
public HydroPumpAnalyWorkingCheckedListItemViewModel
(
Yw.Vmo.HydroWorkingVmo rhs,
Yw.Model.HydroPumpInfo pump,
HydroPumpAnalyViewModel vm
)
{
this.Id = rhs.ID.ToString();
this.Name = rhs.Name;
this.Checked = true;
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
this.Vmo = rhs;
var pumpInfo = vm.Items.Find(x => x.Code == pump.Code);
if (pumpInfo.LinkStatus == Yw.Hydro.LinkStatus.Open)
{
this.Enabled = true;
}
else
{
this.Enabled = false;
this.Checked = false;
}
}
///
/// Id
///
public string Id { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 选择
///
public bool Checked { get; set; }
///
/// 启用
///
public bool Enabled { get; set; }
///
/// 排序码
///
public int SortCode { get; set; }
///
/// 说明
///
public string Description { get; set; }
///
///
///
public Yw.Vmo.HydroWorkingVmo Vmo { get; set; }
}
}