From efa99fc71908505717a2b5e074962cbd0195fbef Mon Sep 17 00:00:00 2001 From: Tim Young <tim.young@lightsys.org> Date: Tue, 6 Mar 2018 14:37:37 -0600 Subject: [PATCH] Network returns all the rectangle shapes on the map. For use on the net-test editor --- EduNetworkBuilder/Network.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index c780425..69c3463 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -1167,6 +1167,20 @@ namespace EduNetworkBuilder } return Descriptions; } + /// <summary> + /// This is used by the NetTest editor to list all the shape names we can lock a device into + /// </summary> + /// <returns>A list of the names of all the rectangles</returns> + public List<string> RectangleNames() + { + List<string> Descriptions = new List<string>(); + foreach (NetShape NS in Shapes) + { + if(NS.MyShape == NetShapeType.rectangle) + Descriptions.Add(NS.Name); + } + return Descriptions; + } void KillAllExtraWindows(bool EvenRTF=false) {