示例#1
0
 public MoveButton(string text, PrinterConfig printer, PrinterAxis axis, double movementFeedRate, ThemeConfig theme)
     : base(text, theme)
 {
     this.printer          = printer;
     this.moveAxis         = axis;
     this.MovementFeedRate = movementFeedRate;
 }
示例#2
0
 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);
     }
 }
示例#3
0
 private bool AxisCollected(PrinterAxis axis)
 {
     if (axis == PrinterAxis.X)
     {
         return(calibrationWizard.XPick != -1);
     }
     else
     {
         return(calibrationWizard.YPick == -1);
     }
 }
示例#4
0
 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;
     }
 }
示例#5
0
 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,
     });
 }