namespace Yw.WinFrmUI.HydroL2d
{
///
/// 管网
///
public partial class Network
{
///
///
///
public Network() { }
///
/// 组件列表
///
public List Parters
{
get { return _parters.ToList(); }
private set { _parters = value; }
}
private List _parters = new();
///
/// 节点列表
///
public List Nodes
{
get
{
return _parters.Where(x => x is Node).Select(x => x as Node).ToList();
}
}
///
/// 管段列表
///
public List Links
{
get { return _parters.Where(x => x is Link).Select(x => x as Link).ToList(); }
}
///
/// 水源列表
///
public List Sources
{
get { return _parters.Where(x => x is Source).Select(x => x as Source).ToList(); }
}
///
/// 水库列表
///
public List Reservoirs
{
get { return _parters.Where(x => x is Reservoir).Select(x => x as Reservoir).ToList(); }
}
///
/// 水池列表
///
public List Tanks
{
get { return _parters.Where(x => x is Tank).Select(x => x as Tank).ToList(); }
}
///
/// 连接节点列表
///
public List Junctions
{
get { return _parters.Where(x => x is Junction).Select(x => x as Junction).ToList(); }
}
///
/// 管道列表
///
public List Pipes
{
get { return _parters.Where(x => x is Pipe).Select(x => x as Pipe).ToList(); }
}
///
/// 水泵列表
///
public List Pumps
{
get { return _parters.Where(x => x is Pump).Select(x => x as Pump).ToList(); }
}
///
/// 阀门列表
///
public List Valves
{
get { return _parters.Where(x => x is Valve).Select(x => x as Valve).ToList(); }
}
}
}