diff --git a/EduNetworkBuilder/ListBoxWindow.cs b/EduNetworkBuilder/ListBoxWindow.cs index e158f12..c1a48e1 100644 --- a/EduNetworkBuilder/ListBoxWindow.cs +++ b/EduNetworkBuilder/ListBoxWindow.cs @@ -706,6 +706,7 @@ namespace EduNetworkBuilder List Puzzles = NB.GetPuzzleNames(); NBSettings oursettings = NB.GetSettings(); if (Puzzles == null) return; + List NeedingToDo = new List(); foreach (string OnePuzzle in Puzzles) { pi = NB.GetPuzzleInfoFromName(OnePuzzle); @@ -722,23 +723,30 @@ namespace EduNetworkBuilder { if (isChecked(tag)) { - - //Visible = false; - BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"]; - if (myWin != null) - { - //myWin.Activate(); - FormColorForTesting(); - myWin.replayNetwork(OnePuzzle, 1); - //Return back to the listbox window - Visible = true; - Activate(); - FormColorContinuingLoop(); - } + 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, count--); + //Return back to the listbox window + Visible = true; + Activate(); + FormColorContinuingLoop(); + } + } + FormColorBackToNormal(); } diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index e3137d8..c9400ae 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -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 @@ -2884,6 +2884,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