Consolidate Edit Leveling and Run Leveling buttons

- Move Run Leveling button into Edit Leveling dialog per discussions
This commit is contained in:
John Lewin 2018-02-01 23:26:40 -08:00
parent 155a175dfa
commit 87d474d796
2 changed files with 32 additions and 22 deletions

View file

@ -41,7 +41,8 @@ namespace MatterHackers.MatterControl
{
public EditLevelingSettingsPage(PrinterConfig printer)
{
var textImageButtonFactory = ApplicationController.Instance.Theme.ButtonFactory;
var theme = ApplicationController.Instance.Theme;
var textImageButtonFactory = theme.ButtonFactory;
this.WindowTitle = "Leveling Settings".Localize();
this.HeaderText = "Sampled Positions".Localize();
@ -96,6 +97,24 @@ namespace MatterHackers.MatterControl
this.contentRow.AddChild(leftRightEdit);
}
var runWizardButton = new TextButton("Run Leveling Wizard".Localize(), theme)
{
VAnchor = VAnchor.Absolute,
HAnchor = HAnchor.Right,
BackgroundColor = theme.MinimalShade,
Margin = new BorderDouble(5, 0, 5, 20)
};
runWizardButton.Click += (s, e) =>
{
this.WizardWindow.CloseOnIdle();
UiThread.RunOnIdle(() =>
{
LevelWizardBase.ShowPrintLevelWizard(printer, LevelWizardBase.RuningState.UserRequestedCalibration);
});
};
this.contentRow.AddChild(runWizardButton);
Button savePresetsButton = textImageButtonFactory.Generate("Save".Localize());
savePresetsButton.Click += (s, e) =>
{