Explorar el Código

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

章政 hace 8 años
padre
commit
9dcfafc910
Se han modificado 1 ficheros con 8 adiciones y 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)