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
| namespace Yw.WinFrmUI
| {
| /// <summary>
| /// 水力管段状态辅助类
| /// </summary>
| public class HydroLinkStatusHelper
| {
|
| //字典
| private static readonly Dictionary<string, string> _dict = new Dictionary<string, string>()
| {
| { Yw.Hydro.LinkStatus.None,"无"},
| { Yw.Hydro.LinkStatus.Open,"开启"},
| { Yw.Hydro.LinkStatus.Closed,"关闭"},
| { Yw.Hydro.LinkStatus.CV,"止回阀"}
| };
|
| /// <summary>
| /// 获取状态名称
| /// </summary>
| public static string GetStatusName(string code)
| {
| if (_dict.ContainsKey(code))
| {
| return _dict[code];
| }
| return string.Empty;
| }
|
|
| }
| }
|
|