Expose WizardPage.cancelButton getter only, restrict headerRow

This commit is contained in:
John Lewin 2017-08-23 17:30:58 -07:00
parent 65135f93a2
commit cc658c9bc6
2 changed files with 3 additions and 5 deletions

View file

@ -44,14 +44,12 @@ namespace MatterHackers.MatterControl
RefreshStatus();
//Construct buttons
cancelButton = whiteImageButtonFactory.Generate("Cancel".Localize());
cancelButton.Click += (s, e) => UiThread.RunOnIdle(() =>
{
abortCancel = true;
this.WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
});
//Construct buttons
nextButton = textImageButtonFactory.Generate("Continue".Localize());
nextButton.Click += (sender, e) => UiThread.RunOnIdle(this.WizardWindow.Close);
nextButton.Visible = false;

View file

@ -9,12 +9,12 @@ namespace MatterHackers.MatterControl
{
public class WizardPage : GuiWidget
{
protected FlowLayoutWidget headerRow;
private FlowLayoutWidget headerRow;
protected FlowLayoutWidget contentRow;
private FlowLayoutWidget footerRow;
protected WrappedTextWidget headerLabel;
protected Button cancelButton;
protected Button cancelButton { get; }
protected TextImageButtonFactory textImageButtonFactory { get; } = ApplicationController.Instance.Theme.WizardButtons;
protected TextImageButtonFactory whiteImageButtonFactory { get; } = ApplicationController.Instance.Theme.WhiteButtonFactory;