lixiaojun
2024-12-02 f460fd2c628ab56db7450d70f3b7ad4b3524e6c8
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
74
75
76
77
78
79
80
81
82
83
84
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 
    /// </summary>
    public class HydroPumpListItemStateViewModel
    {
 
        /// <summary>
        /// 
        /// </summary>
        public HydroPumpListItemStateViewModel() { }
 
        /// <summary>
        /// 
        /// </summary>
        public HydroPumpListItemStateViewModel(Yw.Model.HydroPumpInfo rhs)
        {
            this.Code = rhs.Code;
            this.Name = rhs.Name;
            if (rhs.LinkStatus == Yw.Hydro.PumpStatus.Open)
            {
                this.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_run_32;
            }
            else
            {
                this.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_shut_32;
 
            }
            this.RunStatus = rhs.LinkStatus == Yw.Hydro.PumpStatus.Open;
            this.CurrentHz = Math.Round(rhs.RatedHz * rhs.SpeedRatio, 1);
            this.Description = rhs.Description;
 
            this.Vmo = rhs;
        }
 
        /// <summary>
        /// 编码
        /// </summary>
        [Display(Name = "编码")]
        public string Code { get; set; }
 
        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name = "名称")]
        public string Name { get; set; }
 
        /// <summary>
        /// 图片
        /// </summary>
        [Display(Name = "图片")]
        public Image Image { get; set; }
 
        /// <summary>
        /// 运行状态
        /// </summary>
        [Display(Name = "运行状态")]
        public bool RunStatus { get; set; }
 
        /// <summary>
        /// 频率
        /// </summary>
        [Display(Name = "频率")]
        public double CurrentHz { get; set; }
 
        /// <summary>
        /// 说明
        /// </summary>
        [Display(Name = "说明")]
        public string Description { get; set; }
 
        /// <summary>
        /// vmo
        /// </summary>
        public Yw.Model.HydroPumpInfo Vmo { get; set; }
    }
}