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
| using Yw.Hydro;
|
| namespace Yw.WinFrmUI
| {
| /// <summary>
| /// 水力阀门类型转换器
| /// </summary>
| public class HydroValveTypeConverter : StringConverter
| {
| /// <summary>
| ///
| /// </summary>
| public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
| {
| return true;
| }
|
| /// <summary>
| ///
| /// </summary>
| public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
| {
| var list = new List<string>
| {
| Valve.PRV,
| Valve.PSV,
| Valve.PBV,
| Valve.FCV,
| Valve.TCV,
| Valve.GPV
| };
| return new StandardValuesCollection(list);
| }
|
| /// <summary>
| /// 不允许手动输入
| /// </summary>
| public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
| {
| return true;
| }
|
|
|
| }
| }
|
|