|
@@ -31,13 +31,15 @@ namespace SAGA.GplotManage
|
|
|
{
|
|
|
DistributionRelationshipHandler handler = new DistributionRelationshipHandler();
|
|
|
var re = handler.GetViewData(new PowerComputerContext());
|
|
|
- if (re[0].Childrens.Any())
|
|
|
+
|
|
|
+ if (re[0].Childrens.Count == 0 && re[1].Childrens.Count == 0)
|
|
|
{
|
|
|
- WinEquipmentRelation_Web window =
|
|
|
- new WinEquipmentRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
- window.Title = "配电拓扑图:配电柜--配电柜";
|
|
|
- window.Show();
|
|
|
+ MessageShow.Infomation("不存在相关拓扑数据");
|
|
|
}
|
|
|
+ WinEquipmentRelation_Web window =
|
|
|
+ new WinEquipmentRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
+ window.Title = "配电拓扑图:配电柜--配电柜";
|
|
|
+ window.Show();
|
|
|
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -69,16 +71,18 @@ namespace SAGA.GplotManage
|
|
|
#region 核心处理
|
|
|
EquipPowerRelationshipHandler handler = new EquipPowerRelationshipHandler();
|
|
|
var re = handler.GetViewData(new PowerComputerContext());
|
|
|
- if (re[0].Childrens.Any())
|
|
|
+ if (re[0].Childrens.Count == 0 && re[1].Childrens.Count == 0)
|
|
|
{
|
|
|
- WinEquipmentRelation_Web window =
|
|
|
- new WinEquipmentRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
- window.Title = "配电拓扑图:配电柜--末端";
|
|
|
- window.Show();
|
|
|
- }
|
|
|
+ MessageShow.Infomation("不存在相关拓扑数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ WinEquipmentRelation_Web window =
|
|
|
+ new WinEquipmentRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
+ window.Title = "配电拓扑图:配电柜--末端";
|
|
|
+ window.Show();
|
|
|
#endregion
|
|
|
return Result.Succeeded;
|
|
|
- }
|
|
|
+ }
|
|
|
public override bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
{
|
|
|
return true;
|
|
@@ -99,13 +103,16 @@ namespace SAGA.GplotManage
|
|
|
#region 核心处理
|
|
|
ObjectControlRelationshipHandler handler = new ObjectControlRelationshipHandler();
|
|
|
var re = handler.GetViewData(new PowerComputerContext());
|
|
|
- if (re[0].Childrens.Any())
|
|
|
+ if (re[0].Childrens.Count == 0 && re[1].Childrens.Count == 0)
|
|
|
{
|
|
|
- WinControlRelation_Web window =
|
|
|
- new WinControlRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
- window.Title = "对象受控关系图";
|
|
|
- window.Show();
|
|
|
- }
|
|
|
+ MessageShow.Infomation("不存在相关拓扑数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ WinControlRelation_Web window =
|
|
|
+ new WinControlRelation_Web(re[0].Childrens, re[1].Childrens);
|
|
|
+ window.Title = "对象受控关系图";
|
|
|
+ window.Show();
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
return Result.Succeeded;
|