Browse Source

加未安装codesoft异常捕捉

shim 8 years ago
parent
commit
02dd604a25

+ 6 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -54,7 +54,12 @@ 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)

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

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