|
|
|
@ -24,7 +24,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
FMCTextBoxEntity MCTextBoxE = new FMCTextBoxEntity();
|
|
|
|
|
FMCButtonEntity ButtonE = new FMCButtonEntity();
|
|
|
|
|
FMCRadioButtonEntity RadioButtonE = new FMCRadioButtonEntity();
|
|
|
|
|
DB2119Helper DB2119 = new DB2119Helper();
|
|
|
|
|
DB2105Helper DB2105 = new DB2105Helper();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<Control> Controls;
|
|
|
|
@ -59,7 +59,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
private void ForceControl_OnSwitchChanged(object obj, bool state)
|
|
|
|
|
{
|
|
|
|
|
DB2119 = new DB2119Helper();
|
|
|
|
|
DB2105 = new DB2105Helper();
|
|
|
|
|
if (state)
|
|
|
|
|
{
|
|
|
|
|
if (MessageBox.Show("是否要打开强制排水模式?", "强制模式启动确认",
|
|
|
|
@ -75,16 +75,16 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
switch (name)
|
|
|
|
|
{
|
|
|
|
|
case "ForceControlHA":
|
|
|
|
|
Db2119WriteHelper.AddHaAddForceOn(state);
|
|
|
|
|
DB2105WriteHelper.AddHaAddForceOn(state);
|
|
|
|
|
break;
|
|
|
|
|
case "ForceControlCA":
|
|
|
|
|
Db2119WriteHelper.AddCaAddForceOn(state);
|
|
|
|
|
DB2105WriteHelper.AddCaAddForceOn(state);
|
|
|
|
|
break;
|
|
|
|
|
case "ForceControlHB":
|
|
|
|
|
Db2119WriteHelper.AddHbAddForceOn(state);
|
|
|
|
|
DB2105WriteHelper.AddHbAddForceOn(state);
|
|
|
|
|
break;
|
|
|
|
|
case "ForceControlCB":
|
|
|
|
|
Db2119WriteHelper.AddCbAddForceOn(state);
|
|
|
|
|
DB2105WriteHelper.AddCbAddForceOn(state);
|
|
|
|
|
break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
|
|
|
@ -93,22 +93,25 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
private void StateRefresh(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
HslSwitchE.ForceControlHA.SwitchStatus = DB2119.Force_HA.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlCA.SwitchStatus = DB2119.Force_CA.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlHB.SwitchStatus = DB2119.Force_HB.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlCB.SwitchStatus = DB2119.Force_CB.forceOn;
|
|
|
|
|
DefaultSwitch(HslSwitchE.ForceControlHA, DB2119.Force_HA.forceOn);
|
|
|
|
|
HslSwitchE.ForceControlHA.SwitchStatus = DB2105.Force_HA.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlCA.SwitchStatus = DB2105.Force_CA.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlHB.SwitchStatus = DB2105.Force_HB.forceOn;
|
|
|
|
|
HslSwitchE.ForceControlCB.SwitchStatus = DB2105.Force_CB.forceOn;
|
|
|
|
|
DefaultSwitch(HslSwitchE.ForceControlHA, DB2105.Force_HA.forceOn);
|
|
|
|
|
DefaultSwitch(HslSwitchE.ForceControlCA, DB2105.Force_CA.forceOn);
|
|
|
|
|
DefaultSwitch(HslSwitchE.ForceControlHB, DB2105.Force_HB.forceOn);
|
|
|
|
|
DefaultSwitch(HslSwitchE.ForceControlCB, DB2105.Force_CB.forceOn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BottomSelect(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
DB2119 = new DB2119Helper();
|
|
|
|
|
DB2105 = new DB2105Helper();
|
|
|
|
|
|
|
|
|
|
SingleSelect();
|
|
|
|
|
|
|
|
|
|
if (ButtonE.StartMetage1 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_CA.forceOn)
|
|
|
|
|
if (!DB2105.Force_CA.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("冷水称A强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -118,15 +121,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddCaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue1.Text));
|
|
|
|
|
Db2119WriteHelper.AddCaAddForceBin(GelChooseA);
|
|
|
|
|
Db2119WriteHelper.AddCaAddStartIn(true);
|
|
|
|
|
DB2105WriteHelper.AddCaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue1.Text));
|
|
|
|
|
DB2105WriteHelper.AddCaAddForceBin(GelChooseA);
|
|
|
|
|
DB2105WriteHelper.AddCaAddStartIn(true);
|
|
|
|
|
ManualLogControl("冷水称A强制补充", Convert.ToInt16(MCTextBoxE.SetWaterValue1.Text), GelChooseA);
|
|
|
|
|
MessageBox.Show("冷水称A强制补充");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartMetage2 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_HA.forceOn)
|
|
|
|
|
if (!DB2105.Force_HA.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("热水称A强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -136,15 +139,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddHaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue2.Text));
|
|
|
|
|
Db2119WriteHelper.AddHaAddForceBin(GelChooseA);
|
|
|
|
|
Db2119WriteHelper.AddHaAddStartIn(true);
|
|
|
|
|
DB2105WriteHelper.AddHaAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue2.Text));
|
|
|
|
|
DB2105WriteHelper.AddHaAddForceBin(GelChooseA);
|
|
|
|
|
DB2105WriteHelper.AddHaAddStartIn(true);
|
|
|
|
|
ManualLogControl("热水称A强制补充", Convert.ToInt16(MCTextBoxE.SetWaterValue2.Text), GelChooseA);
|
|
|
|
|
MessageBox.Show("热水称A强制补充");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartMetage3 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_CB.forceOn)
|
|
|
|
|
if (!DB2105.Force_CB.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("冷水称B强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -154,15 +157,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddCbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue3.Text));
|
|
|
|
|
Db2119WriteHelper.AddCbAddForceBin(GelChooseB);
|
|
|
|
|
Db2119WriteHelper.AddCbAddStartIn(true);
|
|
|
|
|
DB2105WriteHelper.AddCbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue3.Text));
|
|
|
|
|
DB2105WriteHelper.AddCbAddForceBin(GelChooseB);
|
|
|
|
|
DB2105WriteHelper.AddCbAddStartIn(true);
|
|
|
|
|
ManualLogControl("冷水称B强制补充", Convert.ToInt16(MCTextBoxE.SetWaterValue3.Text), GelChooseB + 4);
|
|
|
|
|
MessageBox.Show("冷水称B强制补充");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartMetage4 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_HB.forceOn)
|
|
|
|
|
if (!DB2105.Force_HB.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("热水称B强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -172,9 +175,9 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddHbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue4.Text));
|
|
|
|
|
Db2119WriteHelper.AddHbAddForceBin(GelChooseB);
|
|
|
|
|
Db2119WriteHelper.AddHbAddStartIn(true);
|
|
|
|
|
DB2105WriteHelper.AddHbAddValue(Convert.ToInt16(MCTextBoxE.SetWaterValue4.Text));
|
|
|
|
|
DB2105WriteHelper.AddHbAddForceBin(GelChooseB);
|
|
|
|
|
DB2105WriteHelper.AddHbAddStartIn(true);
|
|
|
|
|
ManualLogControl("热水称B强制补充", Convert.ToInt16(MCTextBoxE.SetWaterValue4.Text), GelChooseB + 4);
|
|
|
|
|
MessageBox.Show("热水称B强制补充");
|
|
|
|
|
}
|
|
|
|
@ -182,7 +185,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
if (ButtonE.StartOut1 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_CA.forceOn)
|
|
|
|
|
if (!DB2105.Force_CA.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("冷水称A强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -192,15 +195,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddCaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue1.Text));
|
|
|
|
|
Db2119WriteHelper.AddCaAddForceBin(GelChooseA);
|
|
|
|
|
Db2119WriteHelper.AddCaAddStartOut(true);
|
|
|
|
|
DB2105WriteHelper.AddCaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue1.Text));
|
|
|
|
|
DB2105WriteHelper.AddCaAddForceBin(GelChooseA);
|
|
|
|
|
DB2105WriteHelper.AddCaAddStartOut(true);
|
|
|
|
|
ManualLogControl("冷水称A强制排水", Convert.ToInt16(MCTextBoxE.StayWaterValue1.Text), GelChooseA);
|
|
|
|
|
MessageBox.Show("冷水称A强制排水");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartOut2 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_HA.forceOn)
|
|
|
|
|
if (!DB2105.Force_HA.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("热水称A强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -210,15 +213,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddHaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue2.Text));
|
|
|
|
|
Db2119WriteHelper.AddHaAddForceBin(GelChooseA);
|
|
|
|
|
Db2119WriteHelper.AddHaAddStartOut(true);
|
|
|
|
|
DB2105WriteHelper.AddHaAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue2.Text));
|
|
|
|
|
DB2105WriteHelper.AddHaAddForceBin(GelChooseA);
|
|
|
|
|
DB2105WriteHelper.AddHaAddStartOut(true);
|
|
|
|
|
ManualLogControl("热水称A强制排水", Convert.ToInt16(MCTextBoxE.StayWaterValue2.Text), GelChooseA);
|
|
|
|
|
MessageBox.Show("热水称A强制排水");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartOut3 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_CB.forceOn)
|
|
|
|
|
if (!DB2105.Force_CB.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("冷水称B强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -228,15 +231,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddCbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue3.Text));
|
|
|
|
|
Db2119WriteHelper.AddCbAddForceBin(GelChooseB);
|
|
|
|
|
Db2119WriteHelper.AddCbAddStartOut(true);
|
|
|
|
|
DB2105WriteHelper.AddCbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue3.Text));
|
|
|
|
|
DB2105WriteHelper.AddCbAddForceBin(GelChooseB);
|
|
|
|
|
DB2105WriteHelper.AddCbAddStartOut(true);
|
|
|
|
|
ManualLogControl("冷水称B强制排水", Convert.ToInt16(MCTextBoxE.StayWaterValue3.Text), GelChooseB + 4);
|
|
|
|
|
MessageBox.Show("冷水称B强制排水");
|
|
|
|
|
}
|
|
|
|
|
if (ButtonE.StartOut4 == runtime.Sender)
|
|
|
|
|
{
|
|
|
|
|
if (!DB2119.Force_HB.forceOn)
|
|
|
|
|
if (!DB2105.Force_HB.forceOn)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("热水称B强制控制按钮未打开!");
|
|
|
|
|
return;
|
|
|
|
@ -246,9 +249,9 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Db2119WriteHelper.AddHbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue4.Text));
|
|
|
|
|
Db2119WriteHelper.AddHbAddForceBin(GelChooseB);
|
|
|
|
|
Db2119WriteHelper.AddHbAddStartOut(true);
|
|
|
|
|
DB2105WriteHelper.AddHbAddRemainValue(Convert.ToInt16(MCTextBoxE.StayWaterValue4.Text));
|
|
|
|
|
DB2105WriteHelper.AddHbAddForceBin(GelChooseB);
|
|
|
|
|
DB2105WriteHelper.AddHbAddStartOut(true);
|
|
|
|
|
ManualLogControl("热水称B强制排水", Convert.ToInt16(MCTextBoxE.StayWaterValue4.Text), GelChooseB + 4);
|
|
|
|
|
MessageBox.Show("热水称B强制排水");
|
|
|
|
|
}
|
|
|
|
|