|
|
|
@ -42,14 +42,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
SetAllControls();
|
|
|
|
|
|
|
|
|
|
BottomSelect(runtime);
|
|
|
|
|
|
|
|
|
|
HslSwitchE.ForceControlHA.OnSwitchChanged += ForceControl_OnSwitchChanged;
|
|
|
|
|
HslSwitchE.ForceControlCA.OnSwitchChanged += ForceControl_OnSwitchChanged;
|
|
|
|
|
HslSwitchE.ForceControlHB.OnSwitchChanged += ForceControl_OnSwitchChanged;
|
|
|
|
|
HslSwitchE.ForceControlCB.OnSwitchChanged += ForceControl_OnSwitchChanged;
|
|
|
|
|
|
|
|
|
|
StateRefresh(new object(), new EventArgs());
|
|
|
|
|
|
|
|
|
|
BottomSelect(runtime);
|
|
|
|
|
|
|
|
|
|
//timer = new Timer();
|
|
|
|
|
//timer.Interval = 1000;
|
|
|
|
|
//timer.Enabled = true;
|
|
|
|
@ -58,11 +59,14 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
private void ForceControl_OnSwitchChanged(object obj, bool state)
|
|
|
|
|
{
|
|
|
|
|
DB2119 = new DB2119Helper();
|
|
|
|
|
if (state)
|
|
|
|
|
{
|
|
|
|
|
if (MessageBox.Show("是否要打开强制排水模式?", "强制模式启动确认",
|
|
|
|
|
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
|
|
|
{
|
|
|
|
|
HslSwitch hs = obj as HslSwitch;
|
|
|
|
|
hs.SwitchStatus = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -84,7 +88,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
|
|
|
|
DefaultSwitch(hslSwitch);
|
|
|
|
|
DefaultSwitch(hslSwitch, state);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StateRefresh(object sender, EventArgs e)
|
|
|
|
@ -93,10 +97,13 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BottomSelect(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
DB2119 = new DB2119Helper();
|
|
|
|
|
|
|
|
|
|
SingleSelect();
|
|
|
|
|
|
|
|
|
|
if (ButtonE.StartMetage1 == runtime.Sender)
|
|
|
|
@ -248,9 +255,9 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void DefaultSwitch(HslSwitch hslSwitch)
|
|
|
|
|
private void DefaultSwitch(HslSwitch hslSwitch, bool state)
|
|
|
|
|
{
|
|
|
|
|
string status = hslSwitch.SwitchStatus ? "强制状态开" : "强制状态关";
|
|
|
|
|
string status = state ? "强制状态开" : "强制状态关";
|
|
|
|
|
hslSwitch.Text = status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|