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("基本信息")]
|
[DisplayName("长度(m)")]
|
[Browsable(true)]
|
public float Length { get { return base.Length; } set { base.Length = value; } }
|
|
[Category("计算参数")]
|
[DisplayName("海森威廉系数")]
|
[Browsable(true)]
|
public float Roughness { get { return base.Roughness; } set { base.Roughness = value; } }
|
|
[Category("计算参数")]
|
[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";
|
}
|
}
|
}
|