整体更新

dep_deliver
杨威 6 months ago
parent b5b520b143
commit a4f06c70d8

@ -7,6 +7,7 @@ using Mesnac.Controls.Default;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -89,13 +90,15 @@ namespace Mesnac.Action.ChemicalWeighing.Dan
MCButton MCButton1;
MCButton MCButton2;
List<Control> controll;
Timer timer;
Color backColor;
public void Run(RuntimeParameter runtime)
{
RunIni(runtime);
@ -110,8 +113,15 @@ namespace Mesnac.Action.ChemicalWeighing.Dan
MCButton1 = controll.FirstOrDefault(x => x.Name == "MCButton1") as MCButton;
MCButton2 = controll.FirstOrDefault(x => x.Name == "MCButton2") as MCButton;
MCButton1.Click += MCButton1_Click;
MCButton2.Click += MCButton2_Click;
cbkA = controll.FirstOrDefault(x => x.Name == "cbkA") as MCCheckBox;
cbkB = controll.FirstOrDefault(x => x.Name == "cbkB") as MCCheckBox;
cbkC = controll.FirstOrDefault(x => x.Name == "cbkC") as MCCheckBox;
@ -181,7 +191,46 @@ namespace Mesnac.Action.ChemicalWeighing.Dan
MCButton2_Click(new object(), new EventArgs());
backColor=txtBoxA.BackColor;
cbkA.CheckedChanged += CbkA_CheckedChanged;
}
private void CbkA_CheckedChanged(object sender, EventArgs e)
{
//if (sender == cbkA)
//{
// if (cbkA.Checked)
// {
// txtBoxA.BackColor = Color.Green;
// }
// else
// {
// txtBoxA.BackColor = backColor;
// }
//}
}
private void MCButton2_Click(object sender, EventArgs e)
{
Db2101Helper db = new Db2101Helper();
Ch(cbkA, txtBoxA, HslA, db.SiloA, true);
Ch(cbkB, txtBoxB, HslB, db.SiloB, true);
Ch(cbkC, txtBoxC, HslC, db.SiloC, true);
Ch(cbkD, txtBoxD, HslD, db.SiloD, true);
Ch(cbkE, txtBoxE, HslE, db.SiloE, true);
Ch(cbkF, txtBoxF, HslF, db.SiloF, true);
Ch(cbkG, txtBoxG, HslG, db.SiloG, true);
Ch(cbkH, txtBoxH, HslH, db.SiloH, true);
Ch(cbkI, txtBoxI, HslI, db.SiloI, true);
Ch(cbkJ, txtBoxJ, HslJ, db.SiloJ, true);
Ch(cbkK, txtBoxK, HslK, db.SiloK, true);
Ch(cbkL, txtBoxL, HslL, db.SiloL, true);
Ch(cbkM, txtBoxM, HslM, db.SiloM, true);
Ch(cbkN, txtBoxN, HslN, db.SiloN, true);
Ch(cbkO, txtBoxO, HslO, db.Siloo, true);
}
private void MCButton1_Click(object sender, EventArgs e)
@ -420,28 +469,34 @@ namespace Mesnac.Action.ChemicalWeighing.Dan
Db2101Helper db=new Db2101Helper();
Ch(cbkA, txtBoxA, HslA, db.SiloA);
Ch(cbkB, txtBoxB, HslB, db.SiloB);
Ch(cbkC, txtBoxC, HslC, db.SiloC);
Ch(cbkD, txtBoxD, HslD, db.SiloD);
Ch(cbkE, txtBoxE, HslE, db.SiloE);
Ch(cbkF, txtBoxF, HslF, db.SiloF);
Ch(cbkG, txtBoxG, HslG, db.SiloG);
Ch(cbkH, txtBoxH, HslH, db.SiloH);
Ch(cbkI, txtBoxI, HslI, db.SiloI);
Ch(cbkJ, txtBoxJ, HslJ, db.SiloJ);
Ch(cbkK, txtBoxK, HslK, db.SiloK);
Ch(cbkL, txtBoxL, HslL, db.SiloL);
Ch(cbkM, txtBoxM, HslM, db.SiloM);
Ch(cbkN, txtBoxN, HslN, db.SiloN);
Ch(cbkO, txtBoxO, HslO, db.Siloo);
Ch(cbkA, txtBoxA, HslA, db.SiloA,false);
Ch(cbkB, txtBoxB, HslB, db.SiloB, false);
Ch(cbkC, txtBoxC, HslC, db.SiloC, false);
Ch(cbkD, txtBoxD, HslD, db.SiloD, false);
Ch(cbkE, txtBoxE, HslE, db.SiloE, false);
Ch(cbkF, txtBoxF, HslF, db.SiloF, false);
Ch(cbkG, txtBoxG, HslG, db.SiloG, false);
Ch(cbkH, txtBoxH, HslH, db.SiloH, false);
Ch(cbkI, txtBoxI, HslI, db.SiloI, false);
Ch(cbkJ, txtBoxJ, HslJ, db.SiloJ, false);
Ch(cbkK, txtBoxK, HslK, db.SiloK, false);
Ch(cbkL, txtBoxL, HslL, db.SiloL, false);
Ch(cbkM, txtBoxM, HslM, db.SiloM, false);
Ch(cbkN, txtBoxN, HslN, db.SiloN, false);
Ch(cbkO, txtBoxO, HslO, db.Siloo, false);
}
private void Ch(MCCheckBox cb,MCTextBox cTextBox,HslLanternSimple simple,Db2101Entity entity)
private void Ch(MCCheckBox cb,MCTextBox cTextBox,HslLanternSimple simple,Db2101Entity entity,bool b)
{
cb.Checked = entity.enable;
cTextBox.MCValue = entity.time;
if (b)
{
cb.Checked = entity.enable;
cTextBox.MCValue = entity.time;
}
if (entity.finished) {
simple.LanternBackground = System.Drawing.Color.Green;

@ -1,6 +1,6 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FormDanQi" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton1" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton2" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
@ -14,13 +14,36 @@
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">刷新</Property>
<Property name="Location">407, 292</Property>
<Property name="Name">MCButton2</Property>
<Property name="Size">219, 107</Property>
<Property name="TabIndex">99</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCButton1" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">启动</Property>
<Property name="Location">442, 175</Property>
<Property name="Location">407, 435</Property>
<Property name="Name">MCButton1</Property>
<Property name="Size">219, 107</Property>
<Property name="TabIndex">64</Property>
@ -54,8 +77,7 @@
<Property name="TabIndex">62</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel18" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -124,8 +146,7 @@
<Property name="TabIndex">58</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel12" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -194,8 +215,7 @@
<Property name="TabIndex">54</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel13" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -264,8 +284,7 @@
<Property name="TabIndex">50</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel14" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -334,8 +353,7 @@
<Property name="TabIndex">46</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel15" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -404,8 +422,7 @@
<Property name="TabIndex">42</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel16" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -474,8 +491,7 @@
<Property name="TabIndex">38</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel17" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -544,8 +560,7 @@
<Property name="TabIndex">34</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel8" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -614,8 +629,7 @@
<Property name="TabIndex">30</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel9" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -684,8 +698,7 @@
<Property name="TabIndex">26</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel10" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -754,8 +767,7 @@
<Property name="TabIndex">22</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel11" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -824,8 +836,7 @@
<Property name="TabIndex">18</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel6" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -894,8 +905,7 @@
<Property name="TabIndex">14</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel7" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -964,8 +974,7 @@
<Property name="TabIndex">10</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel5" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -1034,8 +1043,7 @@
<Property name="TabIndex">6</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="大仓A" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -1076,8 +1084,7 @@
<Property name="TabIndex">4</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel4" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -1096,8 +1103,7 @@
<Property name="Size">29, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel3" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -1110,14 +1116,13 @@
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">充氮气时间()</Property>
<Property name="Text">充氮气时间()</Property>
<Property name="Location">196, 39</Property>
<Property name="Name">MCLabel3</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="MCLabel2" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
@ -1136,8 +1141,7 @@
<Property name="Size">29, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel1" children="Controls">
<Property name="Format">
</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>

@ -413,6 +413,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Data\MCProject\nodeDevice.xml" />
<Content Include="Data\MCProject\nodeForm\FormDanQi.xml" />
<Content Include="Data\MCProject\nodeForm\FrmAlarmInfo.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

File diff suppressed because it is too large Load Diff

@ -359,6 +359,7 @@
<Content Include="Data\MCProject\nodeForm\DeviceParamManage.xml" />
<Content Include="Data\MCProject\nodeForm\Form1.xml" />
<Content Include="Data\MCProject\nodeForm\FormAction.xml" />
<Content Include="Data\MCProject\nodeForm\FormDanQi.xml" />
<Content Include="Data\MCProject\nodeForm\FormDeliver.xml" />
<Content Include="Data\MCProject\nodeForm\FormDevice.xml" />
<Content Include="Data\MCProject\nodeForm\FormdeviceDetail.xml" />

Loading…
Cancel
Save