change - 强制排水优化

dep
wangsr 12 months ago
parent 4e9dcd6bd2
commit 3ef1d680a4

@ -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);

@ -26,6 +26,5 @@ namespace Mesnac.Action.ChemicalWeighing.Util
sourceProperty.SetValue(obj, pro);
}
}
}
}

Loading…
Cancel
Save