Expose Wizard.MoveToNextPage without resorting to Next button

This commit is contained in:
jlewin 2019-03-22 11:54:56 -07:00
parent 51e56992b5
commit 5749bc76d3
2 changed files with 11 additions and 6 deletions

View file

@ -67,11 +67,7 @@ namespace MatterHackers.MatterControl
nextButton.Name = "Next Button";
nextButton.Click += (s, e) =>
{
setupWizard.MoveNext();
if (setupWizard.Current is WizardPage wizardPage)
{
this.DialogWindow.ChangeToPage(wizardPage);
}
this.MoveToNextPage();
};
theme.ApplyPrimaryActionStyle(nextButton);
@ -81,6 +77,15 @@ namespace MatterHackers.MatterControl
this.NextButton = nextButton;
}
protected void MoveToNextPage()
{
setupWizard.MoveNext();
if (setupWizard.Current is WizardPage wizardPage)
{
this.DialogWindow.ChangeToPage(wizardPage);
}
}
protected GuiWidget CreateTextField(string text)
{
return new WrappedTextWidget(text)