Browse Source

连接至共享文件夹延时修改

Hcsy 8 years ago
parent
commit
e993718387

+ 7 - 2
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
 
-            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+            OperateResult.AppendText(">>请输入TSN\n", Color.Black);  
         }
 
         private void Ma_code_DbChange(object sender, EventArgs e)
@@ -97,6 +97,7 @@ namespace UAS_MES.Make
             {
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl(lbl);
+                ftpOperater ftp = new ftpOperater();
             }
             catch (Exception ex)
             {
@@ -283,7 +284,6 @@ namespace UAS_MES.Make
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "pl_name";
             PrintLabel.ValueMember = "pl_labelcode";
-            ftpOperater ftp = new ftpOperater();
             indate = new System.DateTime[dt.Rows.Count];
             for (int i = 0; i < dt.Rows.Count; i++)
             {
@@ -347,5 +347,10 @@ namespace UAS_MES.Make
                 sncode.Focus();
             }
         }
+
+        private void PrintLabel_TabIndexChanged(object sender, EventArgs e)
+        {
+            MessageBox.Show(PrintLabel.Text);
+        }
     }
 }

+ 2 - 2
UAS-MES/PublicMethod/BaseUtil.cs

@@ -1135,7 +1135,7 @@ namespace UAS_MES.PublicMethod
                 proc.StandardInput.WriteLine("exit");
                 while (!proc.HasExited)
                 {
-                    proc.WaitForExit(1000);
+                    proc.WaitForExit(1);
                 }
                 string errormsg = proc.StandardError.ReadToEnd();
                 proc.StandardError.Close();
@@ -1150,7 +1150,7 @@ namespace UAS_MES.PublicMethod
             }
             catch (Exception ex)
             {
-                throw ex;
+                throw new Exception(ex.Message);
             }
             finally
             {