public CtrlToolLayerReHeight() { InitializeComponent(); Operation = new OperationLayerReHeight(); SetOperation(Operation); lbCurrent.Text = $"Current layers: {Program.SlicerFile.LayerCount} at {Program.SlicerFile.LayerHeight}mm"; if (Presets.Length > 0) { cbMultiplier.Items.AddRange(Presets); cbMultiplier.SelectedIndex = 0; } else { GUIExtensions.MessageBoxInformation("Not possible to re-height", "No valid configuration to be able to re-height, closing this tool now."); CanRun = false; } }
public CtrlToolPattern() { InitializeComponent(); var roi = Program.FrmMain.ROI; Operation = new OperationPattern(roi.IsEmpty ? Program.SlicerFile.LayerManager.BoundingRectangle : roi, Program.FrmMain.ActualLayerImage.Size); SetOperation(Operation); if (Operation.MaxRows < 2 && Operation.MaxCols < 2) { GUIExtensions.MessageBoxInformation("Unable to pattern", "The available free volume is not enough to pattern this object.\n" + "To run this tool the free space must allow at least 1 copy."); CanRun = false; return; } ExtraActionCall(this); }