use powerof/on actions

This commit is contained in:
Tim Young 2018-05-17 16:26:37 -05:00
parent 4b70e9b2ff
commit b8df925493

View File

@ -1139,7 +1139,9 @@ namespace EduNetworkBuilder
{
if (ItemClickedOn != null)
{
ItemClickedOn.PowerOff = false;
NB.DoActionPowerOn(ItemClickedOn.GetUniqueIdentifier);
//ItemClickedOn.PowerOff = false;
bool BlowUpOnce = myNetwork.ItemHasTest(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower) && !myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceBlowsUpWithPower);
bool BlowUpMultiple = myNetwork.ItemHasTest(ItemClickedOn.hostname, NetTestType.DeviceNeedsUPS) && !myNetwork.ItemTestIsComplete(ItemClickedOn.hostname, NetTestType.DeviceNeedsUPS);
if (BlowUpOnce || BlowUpMultiple)
@ -1180,8 +1182,8 @@ namespace EduNetworkBuilder
{
ItemClickedOn.PowerOff = true;
//Mark the replace test as "done"
NB.DoActionChangeComponent(ItemClickedOn);
myNetwork.RegisterDeviceReset(ItemClickedOn.hostname);
NB.DoActionPowerOff(ItemClickedOn.GetUniqueIdentifier);
//myNetwork.RegisterDeviceReset(ItemClickedOn.hostname);
UpdateLinks();
UpdateVisuals();
}