namespace Yw.WinFrmUI.HydroW3d
|
{
|
/// <summary>
|
/// 水力管网(方法)
|
/// </summary>
|
public partial class NetworkViewModel
|
{
|
|
/// <summary>
|
/// 获取所有组件
|
/// </summary>
|
public List<ParterViewModel> GetAllParters()
|
{
|
var list = new List<ParterViewModel>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有可见组件
|
/// 节点与管段
|
/// </summary>
|
public List<VisualViewModel> GetAllVisuals()
|
{
|
var list = new List<VisualViewModel>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有节点
|
/// </summary>
|
public List<NodeViewModel> GetAllNodes()
|
{
|
var list = new List<NodeViewModel>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水源
|
/// </summary>
|
public List<SourceViewModel> GetAllSources()
|
{
|
var list = new List<SourceViewModel>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水池
|
/// </summary>
|
public List<TankViewModel> GetTanks()
|
{
|
var list = new List<TankViewModel>();
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有连接节点
|
/// </summary>
|
public List<JunctionViewModel> GetAllJunctions()
|
{
|
var list = new List<JunctionViewModel>();
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有连接件
|
/// </summary>
|
public List<CouplingViewModel> GetAllCouplings()
|
{
|
var list = new List<CouplingViewModel>();
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有扩散器
|
/// </summary>
|
public List<EmitterViewModel> GetAllEmitters()
|
{
|
var list = new List<EmitterViewModel>();
|
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有仪表
|
/// </summary>
|
public List<InstrumentViewModel> GetAllInstruments()
|
{
|
var list = new List<InstrumentViewModel>();
|
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管段
|
/// </summary>
|
public List<LinkViewModel> GetAllLinks()
|
{
|
var list = new List<LinkViewModel>();
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管道
|
/// </summary>
|
public List<PipeViewModel> GetAllPipes()
|
{
|
var list = new List<PipeViewModel>();
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有阻件
|
/// </summary>
|
public List<ResistanceViewModel> GetAllResistances()
|
{
|
var list = new List<ResistanceViewModel>();
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
|
|
|
|
|
}
|
}
|