When doing multiple regression tests, add a counter to the name so we see a status.

This commit is contained in:
Tim Young 2018-10-23 08:52:28 -05:00
parent facd5d1ea1
commit bf820055ca
2 changed files with 27 additions and 14 deletions

View File

@ -706,6 +706,7 @@ namespace EduNetworkBuilder
List<string> Puzzles = NB.GetPuzzleNames();
NBSettings oursettings = NB.GetSettings();
if (Puzzles == null) return;
List<string> NeedingToDo = new List<string>();
foreach (string OnePuzzle in Puzzles)
{
pi = NB.GetPuzzleInfoFromName(OnePuzzle);
@ -722,23 +723,30 @@ namespace EduNetworkBuilder
{
if (isChecked(tag))
{
NeedingToDo.Add(OnePuzzle);
break;
}
}
}
//Now, loop through and do them
int count = NeedingToDo.Count;
foreach(string OnePuzzle in NeedingToDo)
{
//Visible = false;
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
if (myWin != null)
{
//myWin.Activate();
FormColorForTesting();
myWin.replayNetwork(OnePuzzle, 1);
myWin.replayNetwork(OnePuzzle, 1, count--);
//Return back to the listbox window
Visible = true;
Activate();
FormColorContinuingLoop();
}
break;
}
}
}
FormColorBackToNormal();
}

View File

@ -2866,7 +2866,7 @@ namespace EduNetworkBuilder
#endregion Random Map Stuff
#region network replay stuff
public void replayNetwork(string NetworkName, int delay_between)
public void replayNetwork(string NetworkName, int delay_between, int Countdown=-1)
{
//Prepare for replay
// reset to original map
@ -2885,6 +2885,11 @@ namespace EduNetworkBuilder
//Loading the network automatically registers it as the current replay
LoadNetworkFromResource(NetworkName, true);
if(Countdown >=0)
{
Text = "(" + Countdown + ") " + Text; //How many more to do
}
//Make a boolean that says we are in a replaying state
//make an index that shows the index we are to replay
//make a time for when the next replay happens (.5 sec from now or after all packets are gone)