Browse Source

去除异常弹窗

章政 7 years ago
parent
commit
317d7fdba1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      UAS_Web/tool/RequestHandler.cs

+ 4 - 4
UAS_Web/tool/RequestHandler.cs

@@ -64,9 +64,8 @@ namespace UAS_Web.tool
             {
                 case "zplPrinter":
                     //弹出打印机选择列表
-                    print = new PrinterList(browser) { StartPosition = FormStartPosition.CenterScreen };
+                    print = new PrinterList(browser) { StartPosition = FormStartPosition.CenterScreen,TopMost=true };
                     print.Controls["Confirm"].Click += RequestHandler_Click;
-                    print.TopMost = true;
                     print.ShowDialog();
                     break;
                 case "zplPrint.action":
@@ -88,11 +87,12 @@ namespace UAS_Web.tool
                         {
                             PrintHelper.SendStringToPrinter(PrinterName, PrintList[i]);
                         }
+                        data.Clear();
                     }
                     else if (data.ContainsKey("exceptionInfo"))
                     {
-                        string PrintCode = data["exceptionInfo"].ToString();
-                        MessageBox.Show(PrintCode);
+                        //string PrintCode = data["exceptionInfo"].ToString();
+                        //MessageBox.Show(PrintCode);
                     }
                     break;
                 case "getPrintType.action":