Prechádzať zdrojové kódy

彩盒称重重量单位设置

Hcsy 8 rokov pred
rodič
commit
b5f0021a23

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

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