Add mechanism to finish stage and move to next best action

This commit is contained in:
jlewin 2019-03-20 15:41:13 -07:00
parent c5edf5c761
commit 2c13c1d4b4
2 changed files with 18 additions and 1 deletions

View file

@ -127,6 +127,20 @@ namespace MatterHackers.MatterControl
this.Invalidate();
}
internal void FinishWizard()
{
ISetupWizard nextStage = stages.FirstOrDefault(s => s.SetupRequired);
if (nextStage != null)
{
this.ActiveStage = nextStage;
return;
}
// Move to next unfinished wizard or move to summary/home page
this.ChangeToPage(homePageGenerator());
}
public override DialogPage ChangeToPage<PanelType>()
{
return base.ChangeToPage<PanelType>();