ソースを参照

彩盒称重重量单位设置

Hcsy 9 年 前
コミット
b5f0021a23
1 ファイル変更2 行追加0 行削除
  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)
                             {
                             {