Browse Source

添加输出控件句柄

callm 1 month ago
parent
commit
bbce021424

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckMidBox.cs

@@ -115,6 +115,7 @@ namespace UAS_MES_NEW.Make
                 }
                 StreamWriter sw = File.AppendText("MidBoxCheck" + ".txt");
                 sw.WriteLine(code.Handle);
+                sw.WriteLine(weight.Handle);
                 sw.Close();
             }
             catch (Exception) { }

+ 11 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_SNLabelCheckMidBoxNoWeight.cs

@@ -107,6 +107,17 @@ namespace UAS_MES_NEW.Make
             StepCount.LineCode = User.UserLineCode;
             StepCount.Dh = dh;
             StepCount.Start();
+            try
+            {
+                if (File.Exists("MidBoxCheckNoWeigh" + ".txt"))
+                {
+                    File.Delete("MidBoxCheckNoWeigh" + ".txt");
+                }
+                StreamWriter sw = File.AppendText("MidBoxCheckNoWeigh" + ".txt");
+                sw.WriteLine(code.Handle);
+                sw.Close();
+            }
+            catch (Exception) { }
         }
 
         private void Ma_code_DBChange(object sender, EventArgs e)

+ 1 - 0
UAS_MES_YDCY/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -129,6 +129,7 @@ namespace UAS_MES_NEW.Packing
                 }
                 StreamWriter sw = File.AppendText("CartonBoxWeigh" + ".txt");
                 sw.WriteLine(sn_code.Handle);
+                sw.WriteLine(weight.Handle);
                 sw.Close();
             }
             catch (Exception) { }