Re-wrote the load filament wizard as not a macro so we have more control over it

Added it to the setup steps

issue: MatterHackers/MCCentral#4429
Put in a loading filament as part of initial setup process
This commit is contained in:
Lars Brubaker 2018-11-02 16:14:37 -07:00
parent 6469cba676
commit 775f1982bd
68 changed files with 832 additions and 492 deletions

View file

@ -29,21 +29,39 @@ either expressed or implied, of the FreeBSD Project.
using MatterHackers.Agg;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.CustomWidgets;
using MatterHackers.MatterControl.SlicerConfiguration;
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
{
public class SelectMaterialPage : LevelingWizardPage
public class SelectMaterialPage : PrinterSetupWizardPage
{
public SelectMaterialPage(LevelingWizard context, string headerText, string instructionsText)
public SelectMaterialPage(PrinterSetupWizard context, string headerText, string instructionsText, bool onlyLoad)
: base(context, headerText, instructionsText)
{
contentRow.AddChild(
ContentRow.AddChild(
new PresetSelectorWidget(printer, "Material".Localize(), Color.Transparent, NamedSettingsLayers.Material, theme)
{
BackgroundColor = Color.Transparent,
Margin = new BorderDouble(0, 0, 0, 15)
});
NextButton.Text = "Load";
if (!onlyLoad)
{
var alreadyLoadedButton = new TextButton("Already Loaded".Localize(), theme)
{
Name = "Already Loaded Button",
BackgroundColor = theme.MinimalShade
};
alreadyLoadedButton.Click += (s, e) =>
{
this.DialogWindow.CloseOnIdle();
};
this.AddPageAction(alreadyLoadedButton);
}
}
}
}