recognize if we click on a link

This commit is contained in:
2018-02-16 17:24:45 +00:00
parent f397456649
commit f7b82d38c9
3 changed files with 60 additions and 0 deletions

View File

@ -501,6 +501,21 @@ namespace EduNetworkBuilder
}
return null;
}
public NetworkLink LinkAtPosition(Point NetworkLocation)
{
NetworkLink tLink;
foreach (NetworkComponent tItem in NetComponents)
{
if (tItem is NetworkLink)
{
tLink = (NetworkLink)tItem;
if (tLink.AtLocation(NetworkLocation))
return tLink;
}
}
return null;
}
public List<NetworkDevice> DevicesInRectangle(Rectangle area)
{
NetworkDevice tDevice;