From 3ef1d680a44cb8b560af29adf1bb0992394c9242 Mon Sep 17 00:00:00 2001 From: wangsr Date: Tue, 5 Dec 2023 11:16:23 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=BC=BA=E5=88=B6=E6=8E=92?= =?UTF-8?q?=E6=B0=B4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManualControl/ForceWaterControl.cs | 51 +++++++++++++++++-- .../Util/ControlsImprot.cs | 1 - 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ForceWaterControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ForceWaterControl.cs index c63c737..0c857db 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ForceWaterControl.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ForceWaterControl.cs @@ -41,9 +41,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl SetAllControls(); - RadioButtonE.Gel1.MCValue = true; - RadioButtonE.Gel5.MCValue = true; - BottomSelect(runtime); HslSwitchE.ForceControlHA.OnSwitchChanged += ForceControl_OnSwitchChanged; @@ -60,6 +57,14 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl private void ForceControl_OnSwitchChanged(object obj, bool state) { + if(state) + { + if (MessageBox.Show("是否要打开强制排水模式?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } + } HslSwitch hslSwitch = obj as HslSwitch; string name = hslSwitch.Name; switch (name) @@ -100,6 +105,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("冷水称A强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向冷水称A补充?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddCaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue1.Text)); Db2119WriteHelper.AddCaAddForceBin(GelChooseA); Db2119WriteHelper.AddCaAddStartIn(true); @@ -113,6 +123,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("热水称A强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向热水称A补充?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddHaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue2.Text)); Db2119WriteHelper.AddHaAddForceBin(GelChooseA); Db2119WriteHelper.AddHaAddStartIn(true); @@ -126,6 +141,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("冷水称B强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向冷水称B补充?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddCbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue3.Text)); Db2119WriteHelper.AddCbAddForceBin(GelChooseB); Db2119WriteHelper.AddCbAddStartIn(true); @@ -139,6 +159,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("热水称B强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向热水称B补充?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddHbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue4.Text)); Db2119WriteHelper.AddHbAddForceBin(GelChooseB); Db2119WriteHelper.AddHbAddStartIn(true); @@ -154,6 +179,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("冷水称A强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向" + GelChooseA + "排水?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddCaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue1.Text)); Db2119WriteHelper.AddCaAddForceBin(GelChooseA); Db2119WriteHelper.AddCaAddStartOut(true); @@ -167,6 +197,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("热水称A强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向" + GelChooseA + "排水?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddHaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue2.Text)); Db2119WriteHelper.AddHaAddForceBin(GelChooseA); Db2119WriteHelper.AddHaAddStartOut(true); @@ -180,6 +215,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("冷水称B强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向" + GelChooseB + 4 + "排水?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddCbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue3.Text)); Db2119WriteHelper.AddCbAddForceBin(GelChooseB); Db2119WriteHelper.AddCbAddStartOut(true); @@ -193,6 +233,11 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MessageBox.Show("热水称B强制控制按钮未打开!"); return; } + if (MessageBox.Show("确认向" + GelChooseB + 4 + "排水?", "强制模式启动确认", + MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } Db2119WriteHelper.AddHbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue4.Text)); Db2119WriteHelper.AddHbAddForceBin(GelChooseB); Db2119WriteHelper.AddHbAddStartOut(true); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs index 662de9c..48e3a51 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs @@ -26,6 +26,5 @@ namespace Mesnac.Action.ChemicalWeighing.Util sourceProperty.SetValue(obj, pro); } } - } }