devices can be locked to a region. They can be moved around somewhat, but only within a named shape. You can still lock a device so it cannot be moved around at all.

This commit is contained in:
2018-03-06 15:38:47 -06:00
parent 79304fae25
commit 38fd6705e4
2 changed files with 30 additions and 3 deletions

View File

@ -1193,6 +1193,29 @@ namespace EduNetworkBuilder
return Descriptions;
}
public Rectangle RectangleByNamedShape(string Name)
{
foreach (NetShape NS in Shapes)
{
if (NS.Name == Name)
return NS.InArea;
}
return new Rectangle(0, 0, myWidth, myHeight); //return the biggest one we can do
}
public List<string> DeviceLockedToShapes(string Host)
{
List<string> ShapeNames = new List<string>();
foreach(NetTest NS in NetTests)
{
if(NS.sHost == Host && NS.TheTest == NetTestType.LockLocation)
{
ShapeNames.Add(NS.dHost);
}
}
return ShapeNames;
}
void KillAllExtraWindows(bool EvenRTF=false)
{
for(int i = Application.OpenForms.Count -1; i >=0; i--)