able to replace a burned item.
This commit is contained in:
parent
5b3be85e99
commit
44c7b90c3b
@ -879,15 +879,15 @@ namespace EduNetworkBuilder
|
||||
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_PowerOff_Click;
|
||||
}
|
||||
//We power off to fix this.
|
||||
//if(myNetwork.ItemHasTest(ReleasedOn.hostname,NetTestType.DeviceIsBad))
|
||||
//{
|
||||
// if(!myNetwork.ItemTestIsComplete(ReleasedOn.hostname, NetTestType.DeviceIsBad))
|
||||
// {
|
||||
// //If the item is bad and has not been replaced, then add a context menu to replace it
|
||||
// pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_Replace"));
|
||||
// pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Replace_Click;
|
||||
// }
|
||||
//}
|
||||
if (myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower) || ReleasedOn.IsBurned)
|
||||
{
|
||||
if (!myNetwork.ItemTestIsComplete(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower))
|
||||
{
|
||||
//If the item is bad and has not been replaced, then add a context menu to replace it
|
||||
pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_Replace"));
|
||||
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_Replace_Click;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else //we are locked out.
|
||||
@ -938,6 +938,13 @@ namespace EduNetworkBuilder
|
||||
if (ItemClickedOn != null)
|
||||
{
|
||||
ItemClickedOn.PowerOff = false;
|
||||
if(myNetwork.ItemHasTest(ItemClickedOn.hostname,NetTestType.DeviceBlowsUpWithPower))
|
||||
{
|
||||
if(!myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower))
|
||||
{
|
||||
ItemClickedOn.IsBurned = true;
|
||||
}
|
||||
}
|
||||
UpdateLinks();
|
||||
UpdateVisuals();
|
||||
}
|
||||
@ -964,7 +971,7 @@ namespace EduNetworkBuilder
|
||||
ItemClickedOn.ClearIPs(); //reset the device
|
||||
ItemClickedOn.IsBurned = false; //If it had been burned before, it is no longer burned
|
||||
//Mark the replace test as "done"
|
||||
//myNetwork.RegisterDeviceReplaced(ItemClickedOn.hostname);
|
||||
myNetwork.RegisterDeviceReplaced(ItemClickedOn.hostname);
|
||||
UpdateVisuals();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user