From 25ac863d22413b7721b0dfbe0820a0aff44f4f32 Mon Sep 17 00:00:00 2001 From: wangsr Date: Fri, 27 Oct 2023 18:18:28 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=87=AA=E5=8A=A8=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E6=A8=A1=E5=BC=8F=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=B7=B2=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoControl/GelerWeterControl.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/GelerWeterControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/GelerWeterControl.cs index dc41e04..f8756c3 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/GelerWeterControl.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/GelerWeterControl.cs @@ -612,13 +612,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl if(ControlsEntity.RepairMode == runtime.Sender) { - if (MessageBox.Show("是否开启维修模式?", "维修模式确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } + if (ControlsEntity.RepairState.MCValue.ToString() == "关") { + if (MessageBox.Show("是否开启维修模式?", "维修模式确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db3000Helper.WriteModel(SingleSelect(), true); ControlsEntity.RepairState.MCValue = "开"; MessageBox.Show("维修模式已开启"); @@ -627,6 +628,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl { if (ControlsEntity.RepairState.MCValue.ToString() == "开") { + if (MessageBox.Show("是否关闭维修模式?", "维修模式确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db3000Helper.WriteModel(SingleSelect(), false); ControlsEntity.RepairState.MCValue = "关"; MessageBox.Show("维修模式已关闭");