diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs
index da6828f..556bf6d 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs
@@ -98,7 +98,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
MCLabel MCLabel349;
MCLabel MCLabel350;
-
+ HslLanternSimple HslLanternSimple1;
+ HslLanternSimple HslLanternSimple2;
Color mcCol;
#region 接口Run方法
@@ -117,7 +118,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
MCLabel349 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel349") as MCLabel;
MCLabel350 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel350") as MCLabel;
- mcCol = MCLabel349.ForeColor;
+
+
+ HslLanternSimple1 = Controls.FirstOrDefault(x => x != null && x.Name == "HslLanternSimple1") as HslLanternSimple;
+ HslLanternSimple2 = Controls.FirstOrDefault(x => x != null && x.Name == "HslLanternSimple2") as HslLanternSimple;
+
+ mcCol = HslLanternSimple1.LanternBackground;
//wangsr();
AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm");
@@ -132,20 +138,35 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
private void other()
{
var a = PlcConnect.Instance.ReadFloat("DB1.1634").Content;
- if (a > 40)
- {
- MCLabel349.ForeColor=Color.Red;
+ MCLabel349.Text = a.ToString("0.00") + " mg/m3";
+
+ Other(HslLanternSimple1, a);
+
+ var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content;
+ MCLabel350.Text = b.ToString("0.00") + " ℃";
+ Other(HslLanternSimple2, b);
+
+ }
+ private void Other(HslLanternSimple simple,float a)
+ {
+ if(a>=0 && a <= 40)
+ {
+ simple.LanternBackground = mcCol;
}
- else
+
+ if (a > 40 && a < 60)
{
- MCLabel349.ForeColor = mcCol;
+ simple.LanternBackground = System.Drawing.Color.Yellow;
}
- MCLabel349.Text = a.ToString("0.00") + " mg/m3";
- var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content;
- MCLabel350.Text = b.ToString("0.00") + " ℃";
+ if (a>60)
+ {
+ simple.LanternBackground = System.Drawing.Color.Red;
+ }
}
+
+
#endregion
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml
index 2c8c5a8..bc51dae 100644
--- a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml
+++ b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml
@@ -1,6 +1,16 @@
ylNormal