Items which are burned or frozen cannot do some things.
This commit is contained in:
parent
543ea92f8f
commit
a45807cb2d
@ -1730,7 +1730,6 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void RegisterDeviceReplaced(string source)
|
public void RegisterDeviceReplaced(string source)
|
||||||
{
|
{
|
||||||
foreach (NetTest one in NetTests)
|
foreach (NetTest one in NetTests)
|
||||||
@ -1753,6 +1752,7 @@ namespace EduNetworkBuilder
|
|||||||
if(NB.GetComponentType(nc) == GeneralComponentType.device)
|
if(NB.GetComponentType(nc) == GeneralComponentType.device)
|
||||||
{
|
{
|
||||||
nd = (NetworkDevice)nc;
|
nd = (NetworkDevice)nc;
|
||||||
|
if (nd.IsBurned || nd.isFrozen() || nd.PowerOff) continue; //skip if burnt, off or frozen
|
||||||
nd.DHCPRequestFromHere();
|
nd.DHCPRequestFromHere();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -786,7 +786,7 @@ namespace EduNetworkBuilder
|
|||||||
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !ReleasedOn.IsBurned)
|
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !ReleasedOn.IsBurned)
|
||||||
{
|
{
|
||||||
List<string> DoneList = new List<string>();
|
List<string> DoneList = new List<string>();
|
||||||
if (!PoweredOff)
|
if (!PoweredOff && !ReleasedOn.isFrozen())
|
||||||
{
|
{
|
||||||
foreach (string tStr in myNetwork.GetIncompleteTestDestinations(ReleasedOn.hostname, ContextTest.ping))
|
foreach (string tStr in myNetwork.GetIncompleteTestDestinations(ReleasedOn.hostname, ContextTest.ping))
|
||||||
{
|
{
|
||||||
@ -824,7 +824,7 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !ReleasedOn.IsBurned)
|
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !ReleasedOn.IsBurned && !ReleasedOn.isFrozen())
|
||||||
{
|
{
|
||||||
if (!PoweredOff)
|
if (!PoweredOff)
|
||||||
{
|
{
|
||||||
@ -838,7 +838,7 @@ namespace EduNetworkBuilder
|
|||||||
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_ArpClear_Click;
|
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_ArpClear_Click;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ReleasedOn != null)
|
if (ReleasedOn != null && !ReleasedOn.isFrozen())
|
||||||
{
|
{
|
||||||
if (!myNetwork.ItemIsCritical(ReleasedOn.hostname))
|
if (!myNetwork.ItemIsCritical(ReleasedOn.hostname))
|
||||||
{
|
{
|
||||||
@ -846,7 +846,7 @@ namespace EduNetworkBuilder
|
|||||||
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Delete_Click;
|
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Delete_Click;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !PoweredOff && !ReleasedOn.IsBurned)
|
if (ReleasedOn != null && ReleasedOn.IsNotNetDevice() && !PoweredOff && !ReleasedOn.IsBurned && !ReleasedOn.isFrozen())
|
||||||
{
|
{
|
||||||
pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("_Edit"));
|
pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("_Edit"));
|
||||||
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Edit_Click;
|
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Edit_Click;
|
||||||
@ -855,7 +855,7 @@ namespace EduNetworkBuilder
|
|||||||
if (ReleasedOn != null)
|
if (ReleasedOn != null)
|
||||||
{
|
{
|
||||||
ItemClickedOn = ReleasedOn;
|
ItemClickedOn = ReleasedOn;
|
||||||
if (!PoweredOff && !ReleasedOn.IsBurned)
|
if (!PoweredOff && !ReleasedOn.IsBurned && !ReleasedOn.isFrozen())
|
||||||
{
|
{
|
||||||
if (ReleasedOn.HasDHCPNic())
|
if (ReleasedOn.HasDHCPNic())
|
||||||
{
|
{
|
||||||
|
@ -327,6 +327,19 @@ namespace EduNetworkBuilder
|
|||||||
return myType;
|
return myType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool isFrozen()
|
||||||
|
{
|
||||||
|
Network mynet = NB.GetNetwork();
|
||||||
|
if (mynet.ItemHasTest(hostname, NetTestType.DeviceIsFrozen))
|
||||||
|
{
|
||||||
|
if (!mynet.ItemTestIsComplete(hostname, NetTestType.DeviceIsFrozen))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Load(XmlNode theNode)
|
public override void Load(XmlNode theNode)
|
||||||
{
|
{
|
||||||
NetworkCard newNic;
|
NetworkCard newNic;
|
||||||
|
Loading…
Reference in New Issue
Block a user