tangxu
2024-05-06 f01d639477141399fd3e092f3f0acb3ced7e02bf
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Hydro.Core.ObjectEnum;
 
namespace Hydro.MapView
{
    [Serializable]
    public class PipeViewModel: LinkViewModel
    {
        [Category("1、基本信息")]
        [DisplayName("长度")]
        [Browsable(true)]
        public float Length { get { return base.Length; } set { base.Length = value; } }
 
        [Category("2、计算参数")]
        [DisplayName("海森威廉系数")]
        [Browsable(true)]
        public float Roughness { get { return base.Roughness; } set { base.Roughness = value; } }
 
        [Category("2、计算参数")]
        [DisplayName("局部阻力系数")]
        [Browsable(true)]
        public  float MinorLoss { get { return base.MinorLoss; } set { base.MinorLoss = value; } }
 
        public override string ToString()
        {
            if (Roughness == 0) Roughness = 110;
            string statusString = Status == StatusType.CLOSED ? "CLOSED" : "";
            return $"{ID}\t{Node1}\t{Node2}\t{Length}\t{Diameter}\t{Roughness}\t{MinorLoss}\t{statusString}\t;\t";
        }
    }
}