qinjie
2023-12-02 c2fa168aff53d879f72412c94baa7be4998dae5e
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
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
{
    public class PipeViewModel: LinkViewModel
    {
        [Category("1、基本信息")]
        [DisplayName("长度")]
        [Browsable(true)]
        public new float Length { 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;
 
        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";
        }
    }
}