using Yw.Model; namespace HStation.WinFrmUI.Xhs.PumpProduct { public class CurrentTreeViewModel { public CurrentTreeViewModel(Vmo.PumpSeries rhs) : base() { this.ID = rhs.ID; this.CatalogID = rhs.CatalogID; this.Name = rhs.Name; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.TagName = rhs.TagName; this.UseStatus = (eUseStatus)rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; this.ImageIndex = ImageLib.Series; } public CurrentTreeViewModel(Vmo.PumpGroup rhs) : base() { this.ID = rhs.ID; this.Name = rhs.Name; this.ParentID = rhs.PumpSeriesID; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; this.IsGroup = true; this.ImageIndex = ImageLib.Group; } public void Reset(Vmo.PumpSeries rhs) { this.ID = rhs.ID; this.CatalogID = rhs.CatalogID; this.Name = rhs.Name; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; } public void Reset(Vmo.PumpGroup rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Model = rhs; } public long ID { get; set; } public long CatalogID { get; set; } public long ParentID { get; set; } public string Name { get; set; } public Dictionary Paras { get; set; } public List Flags { get; set; } public string TagName { get; set; } public eUseStatus UseStatus { get; set; } public int SortCode { get; set; } public string MotorFrequency { get; set; } public string Description { get; set; } public object Model { get; set; } public bool IsGroup { get; set; } = false; public int ImageIndex { get; set; } } }