Hide various things based on whether we can do Replays, and if we have anything to replay
This commit is contained in:
@ -2804,6 +2804,8 @@ namespace EduNetworkBuilder
|
||||
// Go through each step and do the actions again in order
|
||||
NBSettings ourSettings = NB.GetSettings();
|
||||
if (OurSettings == null) return; //nothing to do
|
||||
if (OurSettings.ReplayMode == false) return; //We should never be here if we are false.
|
||||
|
||||
ActionCollection actions = OurSettings.GetUserActionCollection();
|
||||
if (actions == null) return; //nothing to do
|
||||
|
||||
@ -2823,5 +2825,23 @@ namespace EduNetworkBuilder
|
||||
myNetwork.NextReplayIndex = 0;
|
||||
myNetwork.NextReplayAction = DateTime.UtcNow.AddMilliseconds(NB.MillisecondsBetweenReplays);
|
||||
}
|
||||
|
||||
private void fileToolStripMenuItem_DropDownOpening(object sender, EventArgs e)
|
||||
{
|
||||
NBSettings ourSettings = NB.GetSettings();
|
||||
replayToolStripMenuItem.Visible = false;
|
||||
|
||||
if (OurSettings != null && OurSettings.ReplayMode)
|
||||
{
|
||||
ActionCollection AC = OurSettings.GetUserActionCollection();
|
||||
if(AC != null && AC.GetActionCount >0)
|
||||
replayToolStripMenuItem.Visible = true; //Only visible if we have something to replay
|
||||
}
|
||||
else
|
||||
{
|
||||
replayToolStripMenuItem.Visible = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user