public MoveButton(string text, PrinterConfig printer, PrinterAxis axis, double movementFeedRate, ThemeConfig theme) : base(text, theme) { this.printer = printer; this.moveAxis = axis; this.MovementFeedRate = movementFeedRate; }
private void CalibrationPad_Hovered(object sender, PrinterAxis axis) { // Only show hint on hover if this axis is not collected - prevent accidental close of other axis if (!this.AxisCollected(axis)) { this.ShowHint(axis); } }
private bool AxisCollected(PrinterAxis axis) { if (axis == PrinterAxis.X) { return(calibrationWizard.XPick != -1); } else { return(calibrationWizard.YPick == -1); } }
private void ShowHint(PrinterAxis axis) { if (!AxisCollected(axis)) { // Show UI hints for hovered and uncollected axis this.CollectionMode = axis; } else { // Disable UI hints this.CollectionMode = PrinterAxis.Z; } }
public JogControls.MoveButton CreateMoveButton(PrinterConfig printer, string label, PrinterAxis axis, double movementFeedRate, bool levelingButtons = false) { return(new JogControls.MoveButton(label, printer, axis, movementFeedRate, this) { BackgroundColor = this.MinimalShade, Border = 1, BorderColor = this.BorderColor40, VAnchor = VAnchor.Absolute, HAnchor = HAnchor.Absolute, Margin = 0, Padding = 0, Height = (levelingButtons ? 45 : 40) * GuiWidget.DeviceScale, Width = (levelingButtons ? 90 : 40) * GuiWidget.DeviceScale, }); }