Better non-visible regression testing & the close button working.

This commit is contained in:
2018-09-26 09:08:05 -05:00
parent b87d1acd93
commit aaf7afdd65
4 changed files with 43 additions and 3 deletions

View File

@ -2706,7 +2706,7 @@ namespace EduNetworkBuilder
return myNetwork;
}
public void RegisterInisibleNet(Network toRegister)
public void RegisterInvisibleNet(Network toRegister)
{
InvisibleNetwork = toRegister;
}
@ -2859,7 +2859,17 @@ namespace EduNetworkBuilder
//Disable menuitems & right-click if in replay mode
myNetwork.ReplayInProgress = true;
myNetwork.NextReplayIndex = 0;
myNetwork.NextReplayAction = DateTime.UtcNow.AddMilliseconds(delay_between);
myNetwork.NextReplayAction = DateTime.UtcNow.AddMilliseconds(delay_between);
//Now we need to process it.
NB.RegisterInvisibleNetwork(myNetwork);
//while we have actions to do.
while (myNetwork.ReplayInProgress)
{
myNetwork.Tick(true);
myNetwork.NonVisualProcessPacketsMultipleTimes();
}
NB.UnregisterInvisibleNetwork();
}
private void replayToolStripMenuItem_Click(object sender, EventArgs e)