diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
index b25d8a0..61ec344 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
@@ -1342,22 +1342,26 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetFan(FanE.DM1DRY4_Running, PlcReadTemp.DM1DRY4_Running_Set);
ControlsHelper.SetFan(FanE.PM3ADF01, PlcReadTemp.PM3ADF01_Set);
- ControlsHelper.SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm);
- ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm);
+ var wx = Db3000Helper.ReadModel();
+
+ ControlsHelper.SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm, wx[0]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm, wx[0]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm, wx[1]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm, wx[1]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm, wx[2]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm, wx[2]);
+
+ ControlsHelper.SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm, wx[3]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm, wx[3]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm, wx[4]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm, wx[4]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm, wx[5]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm, wx[5]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm, wx[6]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm, wx[6]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm, wx[7]);
+ ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm, wx[7]);
+
//压力参数
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
index 52dbb07..3cc4733 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
@@ -91,6 +91,34 @@ namespace Mesnac.Action.ChemicalWeighing.Util
}
}
+
+
+ public static void SetSwitchLight(SwitchLight obj, bool set, bool alarm, bool weixiu)
+ {
+ obj.BackColor = Color.Gray;
+
+ if (weixiu == true)
+ {
+ obj.Status = SwitchLight.Statuses.ylWeiXiu;
+ }
+ else
+ {
+
+ if (set == true && alarm == false)
+ {
+ obj.Status = SwitchLight.Statuses.ylMove;
+ }
+ else if (alarm == true)
+ {
+ obj.Status = SwitchLight.Statuses.ylAlarm;
+ }
+ else
+ {
+ obj.Status = SwitchLight.Statuses.ylNormal;
+ }
+ }
+ }
+
///
/// 阀门
///
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
index 60f66e0..c580f5d 100644
--- a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
+++ b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
@@ -673,6 +673,9 @@
Always
+
+ Always
+
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/AlarmLightPurple.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/AlarmLightPurple.png
new file mode 100644
index 0000000..f2b50df
Binary files /dev/null and b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/AlarmLightPurple.png differ
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/SwitchLight.cs b/Controls/Mesnac.Controls.ChemicalWeighing/SwitchLight.cs
index 75e9717..0ccf4c7 100644
--- a/Controls/Mesnac.Controls.ChemicalWeighing/SwitchLight.cs
+++ b/Controls/Mesnac.Controls.ChemicalWeighing/SwitchLight.cs
@@ -32,7 +32,7 @@ namespace Mesnac.Controls.ChemicalWeighing
}
public enum Statuses
{
- ylNormal = 0, ylMove = 1, ylAlarm = 2
+ ylNormal = 0, ylMove = 1, ylAlarm = 2,ylWeiXiu=3
}
Statuses _status;
string[] sImages;
@@ -48,10 +48,11 @@ namespace Mesnac.Controls.ChemicalWeighing
base.Init();
_imageStream = null;
- sImages = new string[3];
+ sImages = new string[4];
sImages[0] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGray.png";//
sImages[1] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewGreen.png";//
sImages[2] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightNewRed.png";//
+ sImages[3] = "Mesnac.Controls.ChemicalWeighing.Resources.AlarmLightPurple.png";//
_status = Statuses.ylNormal;
}
@@ -84,18 +85,37 @@ namespace Mesnac.Controls.ChemicalWeighing
bNewPic = true;
}
}
- if ((int)value < 0)
+
+ var val = (int)value;
+
+
+ if (val == 0)
{
_status = (Statuses)0;
}
- else if ((int)value > 2)
+
+ if (val == 1)
+ {
+ _status = (Statuses)1;
+ }
+
+ if (val == 2)
{
_status = (Statuses)2;
}
- else
+
+ if (val == 3)
+ {
+ _status = (Statuses)3;
+ }
+
+ if (val == 4)
{
- _status = value;
+ _status = (Statuses)4;
}
+
+
+
ReloadStream();
Reload();
}