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; } }
public void OnUserSelection(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data) { if (result != PopupMessageBox.PopupResult.Button1_YesOK) { return; } RemoveFilamentProfile(); }
private void ContinueCallBack(PopupMessageBox.PopupResult result, MessageType type, PrinterSerialNumber sn, object user_data) { if (result != PopupMessageBox.PopupResult.Button1_YesOK) { return; } ContinuePrint(); }
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(); }
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(); }
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"); } }
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); } }
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); } }
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; }