示例#1
0
        public void MyButtonCallback(ButtonWidget button)
        {
            switch (button.ID)
            {
            case 101:
                hasmessage       = false;
                Visible          = false;
                popup_result     = PopupMessageBox.PopupResult.Button1_YesOK;
                result_processed = false;
                break;

            case 102:
                hasmessage       = false;
                Visible          = false;
                popup_result     = PopupMessageBox.PopupResult.Button2_NoCancel;
                result_processed = false;
                break;

            case 103:
                hasmessage       = false;
                Visible          = false;
                popup_result     = PopupMessageBox.PopupResult.Button3_Custom;
                result_processed = false;
                break;
            }
        }
示例#2
0
        public void OnUserSelection(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result != PopupMessageBox.PopupResult.Button1_YesOK)
            {
                return;
            }

            RemoveFilamentProfile();
        }
示例#3
0
        private void ContinueCallBack(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result != PopupMessageBox.PopupResult.Button1_YesOK)
            {
                return;
            }

            ContinuePrint();
        }
示例#4
0
        private void OrderFilamentCallBack(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result == PopupMessageBox.PopupResult.Button1_YesOK)
            {
                Process.Start("https://printm3d.com/3d-printer-filaments");
            }

            PrepareToStartPrint();
        }
示例#5
0
        public void OnUserSelection(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result != PopupMessageBox.PopupResult.Button1_YesOK || type != MessageType.UserDefined)
            {
                return;
            }

            PrinterObject selectedPrinter = spooler_connection.SelectedPrinter;

            spooler_connection.SelectPrinterBySerialNumber(((PrinterInfo)user_data).serial_number.ToString());
            Close();
        }
示例#6
0
        private void ContinuePrintCallBack(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result == PopupMessageBox.PopupResult.Button1_YesOK)
            {
                PrepareToStartPrint();
            }
            else
            {
                PrintDialogWindow.CloseWindow();
                if (CurrentJobDetails.printer == null)
                {
                    return;
                }

                var num = (int)CurrentJobDetails.printer.SendManualGCode(new AsyncCallback(ReleasePrinterAfterCommand), CurrentJobDetails.printer, "M106 S0");
            }
        }
示例#7
0
        public void OnUserSelection(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object data)
        {
            PrinterObject printerBySerialNumber = GetPrinterBySerialNumber(sn.ToString());

            if (printerBySerialNumber == null || type != MessageType.WarningABSPrintLarge || (printerBySerialNumber == null || !printerBySerialNumber.IsConnected()))
            {
                return;
            }

            if (result == PopupMessageBox.PopupResult.Button1_YesOK)
            {
                var num1 = (int)printerBySerialNumber.ClearCurrentWarning(null, null);
            }
            else
            {
                var num2 = (int)printerBySerialNumber.AbortPrint(null, null);
            }
        }
示例#8
0
        private void OnUnsavedChangesCallback(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            var printer = user_data as PrinterObject;

            if (printer == null)
            {
                return;
            }

            if (result == PopupMessageBox.PopupResult.Button1_YesOK)
            {
                ApplyCalibrationSettings(printer, m_ocUnsavedCalibrationValues, true);
            }
            else
            {
                var num = (int)printer.ReleaseLock(null, null);
            }
        }
示例#9
0
        private void AbortCallBack(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data)
        {
            if (result != PopupMessageBox.PopupResult.Button1_YesOK)
            {
                return;
            }

            if (settings.ShowAllWarnings)
            {
                messagebox.AddMessageToQueue("Aborting print. Please do not unplug your printer while it is aborting. If you unplug your printer, you will have to recalibrate it.");
            }

            var num = (int)AbortPrint(null, null);

            aborted                    = true;
            status_text.Visible        = false;
            remain_text.Visible        = false;
            progress_indicator.Visible = true;
            abort_button.Visible       = false;
        }