Network itemhastest

This commit is contained in:
Tim Young 2018-02-13 10:27:11 +00:00
parent 4628f5390c
commit d3124c95bb
2 changed files with 20 additions and 0 deletions

View File

@ -940,6 +940,25 @@ namespace EduNetworkBuilder
return false;
}
public bool ItemHasTest(string host, string dest, NetTestType WhatToCheck)
{
foreach (NetTest nt in NetTests)
{
if (nt.sHost == host || WhatToCheck == NetTestType.LockVLANNames)
{
if (WhatToCheck == nt.TheTest && (dest == "" || dest == nt.dHost))
return true;
}
}
return false;
}
public bool ItemHasTest(string host, NetTestType WhatToCheck)
{
return ItemHasTest(host, "", WhatToCheck);
}
private void MarkAsSolved()
{
PuzzleIsSolved = true;

View File

@ -729,6 +729,7 @@ namespace EduNetworkBuilder
//We make sure the MAC matches.
mynet = NB.GetNetwork();
nd = mynet.GetDeviceFromID(myID);
if (tPacket == null) return;
tPacket.InboundNic = this; //track which nic we came in on.
if (myNicType == NicType.port || myNicType == NicType.wport || (nd.IsWirelessForwarder() && (myNicType == NicType.wlan ||