Esempio n. 1
0
 public MoveButton(string text, PrinterConfig printer, PrinterConnection.Axis axis, double movementFeedRate, ThemeConfig theme)
     : base(text, theme)
 {
     this.printer          = printer;
     this.moveAxis         = axis;
     this.MovementFeedRate = movementFeedRate;
 }
 private void CalibrationPad_Hovered(object sender, PrinterConnection.Axis 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(PrinterConnection.Axis axis)
 {
     if (axis == PrinterConnection.Axis.X)
     {
         return(calibrationWizard.XPick != -1);
     }
     else
     {
         return(calibrationWizard.YPick == -1);
     }
 }
 private void ShowHint(PrinterConnection.Axis axis)
 {
     if (!AxisCollected(axis))
     {
         // Show UI hints for hovered and uncollected axis
         this.CollectionMode = axis;
     }
     else
     {
         // Disable UI hints
         this.CollectionMode = PrinterConnection.Axis.Z;
     }
 }
Esempio n. 5
0
 public JogControls.MoveButton CreateMoveButton(PrinterConfig printer, string label, PrinterConnection.Axis 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,
     });
 }