duheng
2024-08-12 1a12ef2743134f7fdea6d0abbfec34543b85bdb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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<string, string> Paras { get; set; }
        public List<string> 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; }
    }
}