示例#1
0
        private void OpenAdvancedPrintSettingsDialog()
        {
            PrinterObject selectedPrinter = SelectedPrinter;

            if (selectedPrinter == null)
            {
                return;
            }

            CurrentJobDetails.printer    = selectedPrinter;
            CurrentJobDetails.jobOptions = new JobOptions(false)
            {
                autostart_ignorewarnings = true
            };
            CurrentJobDetails.GenerateSlicerSettings(selectedPrinter, printerview);
            PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.AdvancedPrintSettingsFrame, CurrentJobDetails);
        }
示例#2
0
        private void StitchAndGotoSlicingFrame(PrintJobDetails CurrentJobDetails)
        {
            StitchModels(CurrentJobDetails);
            if (canceled.Value)
            {
                return;
            }

            if (CurrentJobDetails.print_to_file)
            {
                PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PrintingToFileFrame, CurrentJobDetails);
            }
            else
            {
                PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.SlicingFrame, CurrentJobDetails);
            }
        }
示例#3
0
        public void OnPrintButtonPressed(bool bPrintToFile)
        {
            PrinterObject selectedPrinter = SelectedPrinter;

            if (selectedPrinter == null)
            {
                return;
            }

            var jobOptions = new JobOptions(false);

            CurrentJobDetails.print_to_file = bPrintToFile;
            if (bPrintToFile)
            {
                CurrentJobDetails.printToFileOutputFile = SaveModelFileDialog.RunSaveFileDialog(SaveModelFileDialog.FileType.GCode);
                if (string.IsNullOrEmpty(CurrentJobDetails.printToFileOutputFile))
                {
                    PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PrintDialogFrame, CurrentJobDetails);
                    return;
                }
            }
            jobOptions.autostart_ignorewarnings          = true;
            jobOptions.use_raft_DetailOnly               = SlicerSettings.HasRaftEnabled;
            jobOptions.use_wave_bonding                  = UseWaveBonding.Checked;
            jobOptions.use_fan_preprocessor              = SlicerSettings.UsingAutoFanSettings;
            jobOptions.use_support_DetailOnly            = support_checkbutton.Checked;
            jobOptions.use_support_everywhere_DetailOnly = support_everywhere.Checked;
            jobOptions.calibrate_before_print            = verifybed_checkbutton.Checked;
            jobOptions.calibrate_before_print_z          = 0.4f;
            if (selectedPrinter.Info.calibration.UsesCalibrationOffset)
            {
                jobOptions.calibrate_before_print_z += selectedPrinter.Info.calibration.CALIBRATION_OFFSET;
            }

            jobOptions.use_heated_bed = heatedBedButton_checkbox.Checked;
            jobOptions.quality_layer_resolution_DetailOnly = (int)GetPrintQuality();
            jobOptions.fill_density_DetailOnly             = (int)GetFillDensity();
            CurrentJobDetails.GenerateSlicerSettings(selectedPrinter, printerview);
            CurrentJobDetails.auto_untethered_print = untetheredButton_checkbox.Checked;
            CurrentJobDetails.sdSaveOnly_print      = sdOnlyButton_checkbox.Checked;
            SlicerConnection.SlicerSettingStack.SaveSettingsDown();
            CurrentJobDetails.printer    = selectedPrinter;
            CurrentJobDetails.jobOptions = jobOptions;
            PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PreSlicingFrame, CurrentJobDetails);
        }
示例#4
0
        public void MyTabButtonCallback(ButtonWidget button)
        {
            switch (button.ID)
            {
            case 611:
                SlicerSettings.SetToDefault();
                SyncAllSettingWithGUI();
                break;

            case 612:
                SlicerConnection.SlicerSettingStack.PopSettings();
                PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PrintDialogFrame, CurrentJobDetails);
                break;

            case 613:
                SlicerConnection.SlicerSettingStack.SaveSettingsDown();
                PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PrintDialogFrame, CurrentJobDetails);
                break;

            default:
                ShowFrame(button.tag);
                break;
            }
        }
示例#5
0
 private void PrepareToStartPrint()
 {
     PrintDialogWindow.ActivateFrame(PrintDialogWidgetFrames.PreparingToStartFrame, CurrentJobDetails);
 }