Get the puzzle to do a replay

This commit is contained in:
Tim Young 2018-09-24 11:18:45 -05:00
parent d4e206047c
commit b87d1acd93
2 changed files with 16 additions and 1 deletions

View File

@ -495,6 +495,21 @@ namespace EduNetworkBuilder
NB.LoadNetworkFromResource(TheName);
}
}
else if (MyMode == LBContents.regressiontest)
{
if (lbWindowData.SelectedItem is MyPuzzleEntry)
{
MyPuzzleEntry MPE = (MyPuzzleEntry)lbWindowData.SelectedItem;
string TheName = MPE.PuzzleName;
Visible = false;
BuilderWindow myWin = (BuilderWindow)Application.OpenForms["BuilderWindow"];
if (myWin != null)
{
myWin.Activate();
myWin.replayNetwork(TheName, 1);
}
}
}
Close();
}

View File

@ -2830,7 +2830,7 @@ namespace EduNetworkBuilder
#endregion Random Map Stuff
#region network replay stuff
private void replayNetwork(string NetworkName, int delay_between)
public void replayNetwork(string NetworkName, int delay_between)
{
//Prepare for replay
// reset to original map