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

@ -98,7 +98,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
MCLabel MCLabel349; MCLabel MCLabel349;
MCLabel MCLabel350; MCLabel MCLabel350;
HslLanternSimple HslLanternSimple1;
HslLanternSimple HslLanternSimple2;
Color mcCol; Color mcCol;
#region 接口Run方法 #region 接口Run方法
@ -117,7 +118,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
MCLabel349 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel349") as MCLabel; MCLabel349 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel349") as MCLabel;
MCLabel350 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel350") 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(); //wangsr();
AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm"); 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() private void other()
{ {
var a = PlcConnect.Instance.ReadFloat("DB1.1634").Content; var a = PlcConnect.Instance.ReadFloat("DB1.1634").Content;
if (a > 40) MCLabel349.Text = a.ToString("0.00") + " mg/m3";
{
MCLabel349.ForeColor=Color.Red; Other(HslLanternSimple1, a);
var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content;
MCLabel350.Text = b.ToString("0.00") + " ℃";
Other(HslLanternSimple2, b);
} }
else
private void Other(HslLanternSimple simple,float a)
{ {
MCLabel349.ForeColor = mcCol; if(a>=0 && a <= 40)
{
simple.LanternBackground = mcCol;
} }
MCLabel349.Text = a.ToString("0.00") + " mg/m3";
var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content; if (a > 40 && a < 60)
MCLabel350.Text = b.ToString("0.00") + " ℃"; {
simple.LanternBackground = System.Drawing.Color.Yellow;
} }
if (a>60)
{
simple.LanternBackground = System.Drawing.Color.Red;
}
}
#endregion #endregion
#region 方法 #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="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="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"> <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="Format" />
<Property name="TextName" /> <Property name="TextName" />
@ -18,7 +28,7 @@
<Property name="Text">压送罐1</Property> <Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property> <Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</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="Name">MCLabel350</Property>
<Property name="Size">47, 12</Property> <Property name="Size">47, 12</Property>
</Object> </Object>
@ -39,13 +49,12 @@
<Property name="Text">压送罐1</Property> <Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property> <Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</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="Name">MCLabel349</Property>
<Property name="Size">47, 12</Property> <Property name="Size">47, 12</Property>
</Object> </Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel348" children="Controls"> <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 name="Format" />
</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
@ -60,13 +69,12 @@
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口温度</Property> <Property name="Text">大仓排气口温度</Property>
<Property name="ForeColor">ButtonHighlight</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="Name">MCLabel348</Property>
<Property name="Size">89, 12</Property> <Property name="Size">89, 12</Property>
</Object> </Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel347" children="Controls"> <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 name="Format" />
</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="NewFillColor">Red</Property> <Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property> <Property name="OldFillColor">DarkGray</Property>
@ -81,7 +89,7 @@
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口粉尘浓度</Property> <Property name="Text">大仓排气口粉尘浓度</Property>
<Property name="ForeColor">ButtonHighlight</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="Name">MCLabel347</Property>
<Property name="Size">113, 12</Property> <Property name="Size">113, 12</Property>
</Object> </Object>
@ -4664,9 +4672,9 @@
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="TextAlign">MiddleCenter</Property> <Property name="TextAlign">MiddleCenter</Property>
<Property name="BackColor">Lime</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="Name">SpecialLabelBlue690</Property>
<Property name="Size">1, 87</Property> <Property name="Size">1, 167</Property>
</Object> </Object>
<Object type="Mesnac.Controls.ChemicalWeighing.RSCREWBIG, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DM1OSF01" children="Controls"> <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> <Property name="Status">ylNormal</Property>

Loading…
Cancel
Save