public GetCoarseBedHeight(PrinterSetupWizard context, Vector3 probeStartPosition, string pageDescription, List <ProbePosition> probePositions, int probePositionsBeingEditedIndex, LevelingStrings levelingStrings) : base(context, pageDescription, "Using the [Z] controls on this screen, we will now take a coarse measurement of the extruder height at this position.".Localize(), levelingStrings.CoarseInstruction2, 1, probePositions, probePositionsBeingEditedIndex) { this.probeStartPosition = probeStartPosition; }
public GettingThirdPointFor2PointCalibration(PrinterSetupWizard context, string pageDescription, Vector3 probeStartPosition, string instructionsText, ProbePosition probePosition) : base(context, pageDescription, instructionsText) { this.probeStartPosition = probeStartPosition; this.probePosition = probePosition; }
public CalibrateProbeLastPagelInstructions(PrinterSetupWizard context, string headerText, List <ProbePosition> autoProbePositions, List <ProbePosition> manualProbePositions) : base(context, headerText, "") { this.autoProbePositions = autoProbePositions; this.manualProbePositions = manualProbePositions; var calibrated = "Your Probe is now calibrated.".Localize() + "\n" + " • " + "Remove the paper".Localize() + "\n" + "\n" + "If you wish to re-calibrate your probe in the future:".Localize() + "\n" + " 1. Select the 'Controls' tab on the right" + "\n" + " 2. Look for the calibration section (pictured below)".Localize() + "\n"; contentRow.AddChild(this.CreateTextField(calibrated)); contentRow.AddChild(new ImageWidget(AggContext.StaticData.LoadImage(Path.Combine("Images", "probe.png"))) { HAnchor = HAnchor.Center }); contentRow.AddChild(this.CreateTextField("Click 'Done' to close this window.".Localize())); this.ShowWizardFinished(); }
public GetFineBedHeight(PrinterSetupWizard context, string pageDescription, List <PrintLevelingWizard.ProbePosition> probePositions, int probePositionsBeingEditedIndex, LevelingStrings levelingStrings) : base( context, pageDescription, "We will now refine our measurement of the extruder height at this position.".Localize(), levelingStrings.FineInstruction2, .1, probePositions, probePositionsBeingEditedIndex) { }
public SelectMaterialPage(PrinterSetupWizard context, string headerText, string instructionsText, string nextButtonText, bool onlyLoad) : base(context, headerText, instructionsText) { contentRow.AddChild( new PresetSelectorWidget(printer, "Material".Localize(), Color.Transparent, NamedSettingsLayers.Material, theme) { BackgroundColor = Color.Transparent, Margin = new BorderDouble(0, 0, 0, 15) }); NextButton.Text = nextButtonText; if (onlyLoad) { } else { NextButton.Visible = false; contentRow.AddChild(this.CreateTextField("Optionally, click below to get help loading this material".Localize() + ":")); var loadFilamentButton = new TextButton("Load Filament".Localize(), theme) { Name = "Load Filament", BackgroundColor = theme.MinimalShade, VAnchor = Agg.UI.VAnchor.Absolute, HAnchor = Agg.UI.HAnchor.Fit | Agg.UI.HAnchor.Left, Margin = new BorderDouble(10, 0, 0, 15) }; loadFilamentButton.Click += (s, e) => { wizardContext.ShowNextPage(this.DialogWindow); }; contentRow.AddChild(loadFilamentButton); var selectButton = new TextButton("Select".Localize(), theme) { Name = "Already Loaded Button", BackgroundColor = theme.MinimalShade }; selectButton.Click += (s, e) => { this.DialogWindow.CloseOnIdle(); printer.Settings.SetValue(SettingsKey.filament_has_been_loaded, "1"); }; this.AddPageAction(selectButton); } }
public AutoProbeFeedback(PrinterSetupWizard context, Vector3 probeStartPosition, string headerText, List <ProbePosition> probePositions, int probePositionsBeingEditedIndex) : base(context, headerText, headerText) { this.probeStartPosition = probeStartPosition; this.probePositions = probePositions; this.lastReportedPosition = printer.Connection.LastReportedPosition; this.probePositionsBeingEditedIndex = probePositionsBeingEditedIndex; var spacer = new GuiWidget(15, 15); contentRow.AddChild(spacer); FlowLayoutWidget textFields = new FlowLayoutWidget(FlowDirection.TopToBottom); }
public FindBedHeight(PrinterSetupWizard context, string pageDescription, string setZHeightCoarseInstruction1, string setZHeightCoarseInstruction2, double moveDistance, List <ProbePosition> probePositions, int probePositionsBeingEditedIndex) : base(context, pageDescription, setZHeightCoarseInstruction1) { this.probePositions = probePositions; this.moveAmount = moveDistance; this.lastReportedPosition = printer.Connection.LastReportedPosition; this.probePositionsBeingEditedIndex = probePositionsBeingEditedIndex; GuiWidget spacer = new GuiWidget(15, 15); contentRow.AddChild(spacer); FlowLayoutWidget zButtonsAndInfo = new FlowLayoutWidget(); zButtonsAndInfo.HAnchor |= Agg.UI.HAnchor.Center; FlowLayoutWidget zButtons = CreateZButtons(); zButtonsAndInfo.AddChild(zButtons); zButtonsAndInfo.AddChild(new GuiWidget(15, 10)); //textFields TextWidget zPosition = new TextWidget("Z: 0.0 ", pointSize: 12, textColor: theme.TextColor) { VAnchor = VAnchor.Center, Margin = new BorderDouble(10, 0), }; runningInterval = UiThread.SetInterval(() => { Vector3 destinationPosition = printer.Connection.CurrentDestination; zPosition.Text = "Z: {0:0.00}".FormatWith(destinationPosition.Z); }, .3); zButtonsAndInfo.AddChild(zPosition); contentRow.AddChild(zButtonsAndInfo); contentRow.AddChild( this.CreateTextField(setZHeightCoarseInstruction2)); }
public DoneUnloadingPage(PrinterSetupWizard setupWizard, int extruderIndex) : base(setupWizard, "Success".Localize(), "Success!\n\nYour filament should now be unloaded".Localize()) { var loadFilamentButton = new TextButton("Load Filament".Localize(), theme) { Name = "Load Filament", BackgroundColor = theme.MinimalShade, }; loadFilamentButton.Click += (s, e) => { loadFilamentButton.Parents <SystemWindow>().First().Close(); DialogWindow.Show( new LoadFilamentWizard(printer, extruderIndex, showAlreadyLoadedButton: false)); }; theme.ApplyPrimaryActionStyle(loadFilamentButton); this.AddPageAction(loadFilamentButton); }
public DoneLoadingPage(PrinterSetupWizard setupWizard, int extruderIndex) : base(setupWizard, "Success".Localize(), "Success!\n\nYour filament should now be loaded".Localize()) { if (printer.Connection.Paused) { var resumePrintingButton = new TextButton("Resume Printing".Localize(), theme) { Name = "Resume Printing Button", BackgroundColor = theme.MinimalShade, }; resumePrintingButton.Click += (s, e) => { resumePrintingButton.Parents <SystemWindow>().First().Close(); printer.Connection.Resume(); }; theme.ApplyPrimaryActionStyle(resumePrintingButton); this.AddPageAction(resumePrintingButton); } else if (extruderIndex == 0 && printer.Settings.GetValue <int>(SettingsKey.extruder_count) > 1) { var loadFilament2Button = new TextButton("Load Filament 2".Localize(), theme) { Name = "Load Filament 2", BackgroundColor = theme.MinimalShade, }; loadFilament2Button.Click += (s, e) => { loadFilament2Button.Parents <SystemWindow>().First().Close(); DialogWindow.Show( new LoadFilamentWizard(printer, extruderIndex: 1, showAlreadyLoadedButton: true)); }; theme.ApplyPrimaryActionStyle(loadFilament2Button); this.AddPageAction(loadFilament2Button); } }
public LastPageInstructions(PrinterSetupWizard context, string pageDescription, bool useZProbe, List <ProbePosition> probePositions) : base(context, pageDescription, "") { this.probePositions = probePositions; var calibrated = "Congratulations! Print Leveling is now configured and enabled.".Localize() + "\n" + (useZProbe ? "" : " • Remove the paper".Localize()) + "\n" + "\n" + "If you wish to re-calibrate leveling in the future:".Localize() + "\n" + " 1. Select the 'Controls' tab on the right" + "\n" + " 2. Look for the calibration section (pictured below)".Localize() + "\n"; contentRow.AddChild(this.CreateTextField(calibrated)); contentRow.AddChild(new ImageWidget(AggContext.StaticData.LoadImage(Path.Combine("Images", "leveling.png"))) { HAnchor = HAnchor.Center }); contentRow.AddChild(this.CreateTextField("Click 'Done' to close this window.".Localize())); this.ShowWizardFinished(); }
public HomePrinterPage(PrinterSetupWizard context, string headerText, string instructionsText, bool autoAdvance) : base(context, headerText, instructionsText) { this.autoAdvance = autoAdvance; }
public GetFineBedHeight(PrinterSetupWizard context, string pageDescription, List <ProbePosition> probePositions, int probePositionsBeingEditedIndex, LevelingStrings levelingStrings) : base(context, pageDescription, levelingStrings.FineInstruction1, levelingStrings.FineInstruction2, .1, probePositions, probePositionsBeingEditedIndex) { }
public LevelingWizardRootPage(PrinterSetupWizard levelingContext) { this.levelingContext = levelingContext; }
public WaitForTempPage(PrinterSetupWizard context, string step, string instructions, double targetBedTemp, double targetHotendTemp) : base(context, step, instructions) { this.bedTargetTemp = targetBedTemp; this.hotEndTargetTemp = targetHotendTemp; if (hotEndTargetTemp > 0) { var hotEndProgressHolder = new FlowLayoutWidget() { Margin = new BorderDouble(0, 5) }; // put in bar name contentRow.AddChild(new TextWidget("Hotend Temperature:".Localize(), pointSize: 10, textColor: theme.TextColor) { AutoExpandBoundsToText = true, Margin = new BorderDouble(5, 0, 5, 5), }); // put in the progress bar hotEndProgressBar = new ProgressBar((int)(150 * GuiWidget.DeviceScale), (int)(15 * GuiWidget.DeviceScale)) { FillColor = theme.PrimaryAccentColor, BorderColor = theme.TextColor, BackgroundColor = Color.White, Margin = new BorderDouble(3, 0, 0, 0), VAnchor = VAnchor.Center }; hotEndProgressHolder.AddChild(hotEndProgressBar); // put in the status hotEndProgressBarText = new TextWidget("", pointSize: 10, textColor: theme.TextColor) { AutoExpandBoundsToText = true, Margin = new BorderDouble(5, 0, 5, 5), VAnchor = VAnchor.Center }; hotEndProgressHolder.AddChild(hotEndProgressBarText); // message to show when done hotEndDoneText = new TextWidget("Done!", textColor: theme.TextColor) { AutoExpandBoundsToText = true, Visible = false, }; hotEndProgressHolder.AddChild(hotEndDoneText); contentRow.AddChild(hotEndProgressHolder); } if (bedTargetTemp > 0) { var bedProgressHolder = new FlowLayoutWidget() { Margin = new BorderDouble(0, 5) }; // put in bar name contentRow.AddChild(new TextWidget("Bed Temperature:".Localize(), pointSize: 10, textColor: theme.TextColor) { AutoExpandBoundsToText = true, Margin = new BorderDouble(5, 0, 5, 5), }); // put in progress bar bedProgressBar = new ProgressBar((int)(150 * GuiWidget.DeviceScale), (int)(15 * GuiWidget.DeviceScale)) { FillColor = theme.PrimaryAccentColor, BorderColor = theme.TextColor, BackgroundColor = Color.White, Margin = new BorderDouble(3, 0, 0, 0), VAnchor = VAnchor.Center }; bedProgressHolder.AddChild(bedProgressBar); // put in status bedProgressBarText = new TextWidget("", pointSize: 10, textColor: theme.TextColor) { AutoExpandBoundsToText = true, Margin = new BorderDouble(5, 0, 0, 0), VAnchor = VAnchor.Center }; bedProgressHolder.AddChild(bedProgressBarText); // message to show when done bedDoneText = new TextWidget("Done!", textColor: theme.TextColor) { AutoExpandBoundsToText = true, Visible = false, }; bedProgressHolder.AddChild(bedDoneText); contentRow.AddChild(bedProgressHolder); } }