Пример #1
0
        public CtrlToolLayerReHeight()
        {
            InitializeComponent();
            Operation = new OperationLayerReHeight();
            SetOperation(Operation);

            lbCurrent.Text = $"Current layers: {Program.SlicerFile.LayerCount} at {Program.SlicerFile.LayerHeight}mm";

            var items = OperationLayerReHeight.GetItems(Program.SlicerFile.LayerCount,
                                                        (decimal)Program.SlicerFile.LayerHeight);

            if (items.Length > 0)
            {
                cbMultiplier.Items.AddRange(items);
                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;
            }
        }