cloudflight
2024-06-04 ffa7bf82ac177191cb3f872116985ebcf673c78b
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Hydro.MapView
{
    [Serializable]
    public class ValveViewModel:LinkViewModel
    {
        [Category("1、基本信息")]
        [DisplayName("5)长度(m)")]
        [Browsable(true)]
        public new float Length { get; set; }
 
        [Category("1、基本信息")]
        [DisplayName("口径(mm)")]
        [Browsable(true)]
        public new float Diameter { get; set; }
 
        [Category("2、计算参数")]
        [DisplayName("海森威廉系数")]
        [Browsable(true)]
        public new float Roughness { get; set; } = 110;
        [Category("2、计算参数")]
        [DisplayName("局部阻力系数")]
        [Browsable(true)]
        public new float MinorLoss { get; set; } = 0;
        //[Category("计算参数")]
        //[DisplayName("初始状态")]
        //[Browsable(true)]
        //public string Status { get; set; } = "";
        [Category("2、基本信息")]
        [DisplayName("类型")]
        [Browsable(true)]
        public new string Type { get; set; } = "GPV";
        [Category("2、基本信息")]
        [DisplayName("曲线")]
        [Browsable(true)]
        public string Setting { get; set; } = "GPVDefault";
 
        // 重写ToString()方法以便将阀门属性转换为字符串
        public override string ToString()
        {
 
            return $"{ID}\t{Node1}\t{Node2}\t{Diameter:F4}\t{Type}\t{Setting}\t{MinorLoss:F4}\t;\t";
        }
 
    }
}