namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 计算结果
|
/// </summary>
|
public class HydroCalcuResult
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroCalcuResult()
|
{
|
this.Succeed = true;
|
this.FailedList = new List<HydroCalcuFailed>();
|
this.NodeList = new List<HydroCalcuNodeResult>();
|
this.LinkList = new List<HydroCalcuLinkResult>();
|
this.WainingList = new List<HydroCalcuWarning>();
|
}
|
|
/// <summary>
|
/// 是否成功
|
/// </summary>
|
public bool Succeed { get; set; }
|
|
/// <summary>
|
/// 失败列表
|
/// </summary>
|
public List<HydroCalcuFailed> FailedList { get; set; }
|
|
/// <summary>
|
/// 节点列表
|
/// </summary>
|
public List<HydroCalcuNodeResult> NodeList { get; set; }
|
|
/// <summary>
|
/// 管段列表
|
/// </summary>
|
public List<HydroCalcuLinkResult> LinkList { get; set; }
|
|
/// <summary>
|
/// 警告列表
|
/// </summary>
|
public List<HydroCalcuWarning> WainingList { get; set; }
|
|
/// <summary>
|
/// 获取可见列表
|
/// </summary>
|
public List<HydroCalcuVisualResult> GetVisualList()
|
{
|
var list = new List<HydroCalcuVisualResult>();
|
this.NodeList?.ForEach(x => list.Add(x));
|
this.LinkList?.ForEach(x => list.Add(x));
|
return list;
|
}
|
|
/// <summary>
|
/// 获取可见字典
|
/// </summary>
|
public Dictionary<string, HydroCalcuVisualResult> GetVisualDict()
|
{
|
var allVisualList = GetVisualList();
|
var dict = new Dictionary<string, HydroCalcuVisualResult>();
|
allVisualList?.ForEach(x => dict.Add(x.Code, x));
|
return dict;
|
}
|
|
|
|
|
|
}
|
}
|