Browse Source

彩盒称重重量单位设置

Hcsy 8 years ago
parent
commit
b5f0021a23
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -161,6 +161,8 @@ namespace UAS_MES.Make
                             try
                             try
                             {
                             {
                                 weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
                                 weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
+                                if (pr_colorboxunit.Text == "kg")
+                                weight.Text = (float.Parse(weight.Text) / 1000).ToString();
                             }
                             }
                             catch (Exception)
                             catch (Exception)
                             {
                             {