浏览代码

修改判断条件

章政 8 年之前
父节点
当前提交
db9eff9bbe
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

+ 1 - 6
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -112,7 +112,7 @@ namespace UAS_MES.Make
                         }
                         //如果未打开串口设置为0
                         int ActualWeight = int.Parse(weight.Text == "" ? "0" : weight.Text);
-                        if (ActualWeight > MinWeight && ActualWeight < MaxWeight)
+                        if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
                         {
                             //显示最近的三个称量记录
                             Temp3.Text = Temp2.Text;
@@ -194,11 +194,6 @@ namespace UAS_MES.Make
             Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
         }
 
-        private void Cancel_Click(object sender, EventArgs e)
-        {
-
-        }
-
         private void StartWeight_Click(object sender, EventArgs e)
         {
             thread = new Thread(getSerialData);