Explorar o código

初始化打印程序添加异常处理

章政 %!s(int64=8) %!d(string=hai) anos
pai
achega
9dcfafc910
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

+ 8 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -97,7 +97,14 @@ namespace UAS_MES.Make
 
         private void InPrint()
         {
-            lbl = new ApplicationClass();
+            try
+            {
+                lbl = new ApplicationClass();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("未正确安装codesoft");
+            }
         }
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)