Browse Source

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

章政 8 years ago
parent
commit
9dcfafc910
1 changed files with 8 additions and 1 deletions
  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)