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
| using Yw.Hydro;
|
| namespace Yw.WinFrmUI
| {
| /// <summary>
| /// 属性状态颜色辅助类
| /// </summary>
| public class HydroPropStatusColorHelper
| {
| private static Dictionary<ePropStatus, Color> _dict = new Dictionary<ePropStatus, Color>()
| {
| { ePropStatus.Error,Color.Red},
| { ePropStatus.Normal,Color.Black},
| { ePropStatus.Lack,Color.Green},
| { ePropStatus.Abnormal,Color.Orange},
| { ePropStatus.Matching,Color.Purple}
| };
|
| /// <summary>
| /// 获取状态
| /// </summary>
| public static Color GetColor(ePropStatus propStatus)
| {
| if (_dict.ContainsKey(propStatus))
| {
| return _dict[propStatus];
| }
| return Color.Black;
| }
|
|
| }
| }
|
|