public GetCoarseBedHeight(LevelingWizard 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(LevelingWizard context, string pageDescription, Vector3 probeStartPosition, string instructionsText, ProbePosition probePosition) : base(context, pageDescription, instructionsText) { this.probeStartPosition = probeStartPosition; this.probePosition = probePosition; }
public CalibrateProbeLastPagelInstructions(LevelingWizard context, string headerText, string instructionsText, List <ProbePosition> autoProbePositions, List <ProbePosition> manualProbePositions) : base(context, headerText, instructionsText) { this.autoProbePositions = autoProbePositions; this.manualProbePositions = manualProbePositions; this.ShowWizardFinished(); }
public SelectMaterialPage(LevelingWizard context, string headerText, string instructionsText) : 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) }); }
public AutoProbeFeedback(LevelingWizard 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(LevelingWizard 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: ActiveTheme.Instance.PrimaryTextColor) { VAnchor = VAnchor.Center, Margin = new BorderDouble(10, 0), }; var runningInterval = UiThread.SetInterval(() => { Vector3 destinationPosition = printer.Connection.CurrentDestination; zPosition.Text = "Z: {0:0.00}".FormatWith(destinationPosition.Z); }, .3); this.Closed += (s, e) => runningInterval.Continue = false; zButtonsAndInfo.AddChild(zPosition); contentRow.AddChild(zButtonsAndInfo); contentRow.AddChild( this.CreateTextField(setZHeightCoarseInstruction2)); }
private CalibrationControls(PrinterConfig printer, ThemeConfig theme) : base(FlowDirection.TopToBottom) { this.printer = printer; // add in the controls for configuring auto leveling { SettingsRow settingsRow; this.AddChild(settingsRow = new SettingsRow( "Print Leveling Plane".Localize(), null, theme, AggContext.StaticData.LoadIcon("leveling_32x32.png", 16, 16, theme.InvertIcons))); // run leveling button var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, ToolTipText = "Print Leveling Wizard - Can be re-calculated anytime there seems to be a problem with initial layer consistency".Localize() }; runWizardButton.Click += (s, e) => { UiThread.RunOnIdle(() => { LevelingWizard.ShowPrintLevelWizard(printer, theme); }); }; settingsRow.AddChild(runWizardButton); // only show the switch if leveling can be turned off (it can't if it is required). if (!printer.Settings.GetValue <bool>(SettingsKey.print_leveling_required_to_print)) { // put in the switch var printLevelingSwitch = new RoundedToggleSwitch(theme) { VAnchor = VAnchor.Center, Margin = new BorderDouble(left: 16), Checked = printer.Settings.GetValue <bool>(SettingsKey.print_leveling_enabled) }; printLevelingSwitch.CheckedStateChanged += (sender, e) => { printer.Settings.Helpers.DoPrintLeveling(printLevelingSwitch.Checked); }; printer.Settings.PrintLevelingEnabledChanged.RegisterEvent((sender, e) => { printLevelingSwitch.Checked = printer.Settings.GetValue <bool>(SettingsKey.print_leveling_enabled); }, ref unregisterEvents); settingsRow.AddChild(printLevelingSwitch); } // add in the controls for configuring probe offset if (printer.Settings.GetValue <bool>(SettingsKey.has_z_probe) && printer.Settings.GetValue <bool>(SettingsKey.use_z_probe)) { this.AddChild(settingsRow = new SettingsRow( "Print Leveling Probe".Localize(), null, theme, AggContext.StaticData.LoadIcon("probing_32x32.png", 16, 16, theme.InvertIcons))); var runCalibrateProbeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, ToolTipText = "Probe Calibration Wizard - needed for initial setup - normally should remain calibrated unless there are changes to hardware.".Localize() }; runCalibrateProbeButton.Click += (s, e) => { UiThread.RunOnIdle(() => { LevelingWizard.ShowProbeCalibrationWizard(printer, theme); }); }; settingsRow.BorderColor = Color.Transparent; settingsRow.AddChild(runCalibrateProbeButton); } } printer.Connection.CommunicationStateChanged.RegisterEvent(PrinterStatusChanged, ref unregisterEvents); printer.Connection.EnableChanged.RegisterEvent(PrinterStatusChanged, ref unregisterEvents); SetVisibleControls(); }
public LastPageInstructions(LevelingWizard context, string pageDescription, string instructionsText, List <ProbePosition> probePositions) : base(context, pageDescription, instructionsText) { this.probePositions = probePositions; this.ShowWizardFinished(); }
public GetFineBedHeight(LevelingWizard context, string pageDescription, List <ProbePosition> probePositions, int probePositionsBeingEditedIndex, LevelingStrings levelingStrings) : base(context, pageDescription, levelingStrings.FineInstruction1, levelingStrings.FineInstruction2, .1, probePositions, probePositionsBeingEditedIndex) { }
public HomePrinterPage(LevelingWizard context, string headerText, string instructionsText, bool autoAdvance) : base(context, headerText, instructionsText) { this.autoAdvance = autoAdvance; }
public LevelingWizardRootPage(LevelingWizard levelingContext) { this.levelingContext = levelingContext; }
public WaitForTempPage(LevelingWizard 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: ActiveTheme.Instance.PrimaryTextColor) { 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 = ActiveTheme.Instance.PrimaryAccentColor, BorderColor = ActiveTheme.Instance.PrimaryTextColor, 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: ActiveTheme.Instance.PrimaryTextColor) { 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: ActiveTheme.Instance.PrimaryTextColor) { 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: ActiveTheme.Instance.PrimaryTextColor) { 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 = ActiveTheme.Instance.PrimaryAccentColor, BorderColor = ActiveTheme.Instance.PrimaryTextColor, 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: ActiveTheme.Instance.PrimaryTextColor) { 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: ActiveTheme.Instance.PrimaryTextColor) { AutoExpandBoundsToText = true, Visible = false, }; bedProgressHolder.AddChild(bedDoneText); contentRow.AddChild(bedProgressHolder); } }
private CalibrationControls(PrinterConfig printer, ThemeConfig theme) : base(FlowDirection.TopToBottom) { this.printer = printer; // add in the controls for configuring auto leveling { SettingsRow settingsRow; this.AddChild(settingsRow = new SettingsRow( "Bed Leveling".Localize(), null, theme, AggContext.StaticData.LoadIcon("leveling_32x32.png", 16, 16, theme.InvertIcons))); // run leveling button var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, Name = "Run Leveling Button", ToolTipText = "Run Calibration".Localize() }; runWizardButton.Click += (s, e) => { UiThread.RunOnIdle(() => { LevelingWizard.ShowPrintLevelWizard(printer, theme); }); }; settingsRow.AddChild(runWizardButton); // only show the switch if leveling can be turned off (it can't if it is required). if (!printer.Settings.GetValue <bool>(SettingsKey.print_leveling_required_to_print)) { // put in the switch var printLevelingSwitch = new RoundedToggleSwitch(theme) { VAnchor = VAnchor.Center, Margin = new BorderDouble(left: 16), Checked = printer.Settings.GetValue <bool>(SettingsKey.print_leveling_enabled) }; printLevelingSwitch.CheckedStateChanged += (sender, e) => { printer.Settings.Helpers.DoPrintLeveling(printLevelingSwitch.Checked); }; void Settings_PrintLevelingEnabledChanged(object sender, EventArgs e) { printLevelingSwitch.Checked = printer.Settings.GetValue <bool>(SettingsKey.print_leveling_enabled); } printer.Settings.PrintLevelingEnabledChanged += Settings_PrintLevelingEnabledChanged; this.Closed += (s, e) => { printer.Settings.PrintLevelingEnabledChanged -= Settings_PrintLevelingEnabledChanged; }; settingsRow.AddChild(printLevelingSwitch); } // add in the controls for configuring probe offset if (printer.Settings.GetValue <bool>(SettingsKey.has_z_probe) && printer.Settings.GetValue <bool>(SettingsKey.use_z_probe)) { this.AddChild(settingsRow = new SettingsRow( "Calibrate Probe Offset".Localize(), null, theme, AggContext.StaticData.LoadIcon("probing_32x32.png", 16, 16, theme.InvertIcons))); var runCalibrateProbeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, ToolTipText = "Run Calibration".Localize() }; runCalibrateProbeButton.Click += (s, e) => { UiThread.RunOnIdle(() => { LevelingWizard.ShowProbeCalibrationWizard(printer, theme); }); }; settingsRow.BorderColor = Color.Transparent; settingsRow.AddChild(runCalibrateProbeButton); } } printer.Connection.CommunicationStateChanged.RegisterEvent(PrinterStatusChanged, ref unregisterEvents); printer.Connection.EnableChanged.RegisterEvent(PrinterStatusChanged, ref unregisterEvents); SetVisibleControls(); }