dep_deliver
杨威 8 months ago
parent 88f7faacc6
commit 50b273ccbf

@ -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,21 +138,36 @@ 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
#region 方法

@ -1,6 +1,16 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="LjDeliver" children="Controls">
<Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Panel15" children="Controls">
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslLanternSimple2" children="Controls">
<Property name="Location">1796, 54</Property>
<Property name="Name">HslLanternSimple2</Property>
<Property name="Size">18, 18</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslLanternSimple1" children="Controls">
<Property name="Location">1796, 30</Property>
<Property name="Name">HslLanternSimple1</Property>
<Property name="Size">18, 18</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel350" children="Controls">
<Property name="Format" />
<Property name="TextName" />
@ -18,7 +28,7 @@
<Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">475, 112</Property>
<Property name="Location">1731, 56</Property>
<Property name="Name">MCLabel350</Property>
<Property name="Size">47, 12</Property>
</Object>
@ -39,13 +49,12 @@
<Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">476, 86</Property>
<Property name="Location">1732, 30</Property>
<Property name="Name">MCLabel349</Property>
<Property name="Size">47, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel348" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -60,13 +69,12 @@
<Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口温度</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">357, 111</Property>
<Property name="Location">1613, 55</Property>
<Property name="Name">MCLabel348</Property>
<Property name="Size">89, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel347" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -81,7 +89,7 @@
<Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口粉尘浓度</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">357, 86</Property>
<Property name="Location">1613, 30</Property>
<Property name="Name">MCLabel347</Property>
<Property name="Size">113, 12</Property>
</Object>
@ -4664,9 +4672,9 @@
<Property name="MCEnabled">True</Property>
<Property name="TextAlign">MiddleCenter</Property>
<Property name="BackColor">Lime</Property>
<Property name="Location">1691, 138</Property>
<Property name="Location">1691, 70</Property>
<Property name="Name">SpecialLabelBlue690</Property>
<Property name="Size">1, 87</Property>
<Property name="Size">1, 167</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.RSCREWBIG, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DM1OSF01" children="Controls">
<Property name="Status">ylNormal</Property>

Loading…
Cancel
Save