Able to lock light and microwave to keep from deleting them

This commit is contained in:
Tim Young 2015-08-13 20:28:00 -06:00
parent d128340987
commit 8c2c1c4109
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ namespace EduNetworkBuilder
ToEdit = new NetTest(OrigTest);
Network mynet = NB.GetNetwork();
HostNames.AddRange(mynet.GetHostnames());
HostNames.AddRange(mynet.GetHostnames(true));
Networks.AddRange(mynet.GetSubnets());
Broadcasts.AddRange(mynet.GetBroadcasts());
UpdateForm();

View File

@ -944,7 +944,7 @@ namespace EduNetworkBuilder
return null;
}
public List<string> GetHostnames()
public List<string> GetHostnames(bool EvenNonNetworked = false)
{
List<string> tList = new List<string>();
NetworkDevice ND;
@ -953,7 +953,7 @@ namespace EduNetworkBuilder
if(NB.GetComponentType(NC) == GeneralComponentType.device)
{
ND = (NetworkDevice)NC;
if (ND.GetNetType() == NetworkComponentType.microwave || ND.GetNetType() == NetworkComponentType.fluorescent)
if (!EvenNonNetworked && (ND.GetNetType() == NetworkComponentType.microwave || ND.GetNetType() == NetworkComponentType.fluorescent))
continue;
tList.Add(ND.hostname);
}