add - 自动增加开关指示

wangsr
wangsr 1 year ago
parent 5a2b9e5c2b
commit 5ad4008138

@ -49,6 +49,11 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
if(ControlsEntity.WaterConfrim == runtime.Sender)
{
if (MessageBox.Show("确认下发水称数据?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
WaterEntity HotA = new WaterEntity();
WaterEntity ColdA = new WaterEntity();
WaterEntity HotB = new WaterEntity();

@ -41,6 +41,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public IBaseControl WetOutDelayTime { get; set; }
public IBaseControl ManualWeight { get; set; }
public IBaseControl ManualTolerance { get; set; }
public IBaseControl State1 { get; set; }
public IBaseControl State2 { get; set; }
public IBaseControl State3 { get; set; }
public IBaseControl State4 { get; set; }
public IBaseControl State5 { get; set; }
public IBaseControl State6 { get; set; }
public IBaseControl State7 { get; set; }
public IBaseControl State8 { get; set; }
public Button WetManualControl { get; set; }
public Button Download { get; set; }

@ -24,6 +24,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
private List<Control> McControls;
Color backColor = Color.Transparent;
public Timer timer;
public void Run(RuntimeParameter runtime)
{
@ -46,6 +48,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ControlInitFromPLC();
timer = new Timer();
timer.Interval = 1000;
timer.Enabled = true;
//timer.Tick += new EventHandler(StateRefresh);//添加事件
}
private void StateRefresh(object sender, EventArgs e)
{
if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0)
{
timer.Stop();
timer.Dispose();
}
}
private void Mcradion_CheckedChanged(object sender, EventArgs e)

@ -20,7 +20,7 @@
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">停止</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">733, 500</Property>
<Property name="Location">733, 533</Property>
<Property name="Name">LineStop</Property>
<Property name="Size">168, 56</Property>
<Property name="TabIndex">7</Property>
@ -45,7 +45,7 @@
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">开始</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">733, 438</Property>
<Property name="Location">733, 471</Property>
<Property name="Name">LineStart</Property>
<Property name="Size">168, 56</Property>
<Property name="TabIndex">6</Property>
@ -70,12 +70,332 @@
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">下传</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">733, 94</Property>
<Property name="Location">733, 127</Property>
<Property name="Name">Download</Property>
<Property name="Size">168, 56</Property>
<Property name="TabIndex">8</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox34" children="Controls">
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State8" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">825, 61</Property>
<Property name="Name">State8</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel37" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">776, 61</Property>
<Property name="Name">MCLabel37</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State7" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">715, 61</Property>
<Property name="Name">State7</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel39" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">666, 61</Property>
<Property name="Name">MCLabel39</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State6" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">605, 61</Property>
<Property name="Name">State6</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel41" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">556, 61</Property>
<Property name="Name">MCLabel41</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State5" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">495, 61</Property>
<Property name="Name">State5</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel43" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">446, 61</Property>
<Property name="Name">MCLabel43</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State4" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">385, 61</Property>
<Property name="Name">State4</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel45" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">336, 61</Property>
<Property name="Name">MCLabel45</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State3" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">275, 61</Property>
<Property name="Name">State3</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel47" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">226, 61</Property>
<Property name="Name">MCLabel47</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State2" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text"></Property>
<Property name="Location">165, 61</Property>
<Property name="Name">State2</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel49" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">116, 61</Property>
<Property name="Name">MCLabel49</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="State1" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">QueryAndModify</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text"></Property>
<Property name="Location">55, 61</Property>
<Property name="Name">State1</Property>
<Property name="Size">24, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel52" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</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="Text">状态:</Property>
<Property name="Location">6, 61</Property>
<Property name="Name">MCLabel52</Property>
<Property name="Size">56, 16</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCRadioButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Line4" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDQ2OUY0RERFQzI5OTRENTY4NDY1QkVBQjZGNjI5RTI5BgYAAAAM5Yi35paw5LqL5Lu2BgcAAAAM5Yi35paw5LqL5Lu2Cw==</Binary>
@ -249,7 +569,7 @@
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">12, 12</Property>
<Property name="Name">GroupBox34</Property>
<Property name="Size">889, 65</Property>
<Property name="Size">889, 98</Property>
<Property name="TabIndex">10</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox1" children="Controls">
@ -1384,7 +1704,7 @@
<Property name="TabStop">False</Property>
<Property name="Text">产线</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">12, 83</Property>
<Property name="Location">12, 116</Property>
<Property name="Name">GroupBox1</Property>
<Property name="Size">715, 478</Property>
<Property name="TabIndex">9</Property>
@ -1405,7 +1725,7 @@
<Property name="MCPurview">False</Property>
<Property name="AllowOriginalSizeShow">False</Property>
<Property name="BackColor">Control</Property>
<Property name="Size">928, 610</Property>
<Property name="Size">928, 641</Property>
<Property name="StartPosition">WindowsDefaultLocation</Property>
<Property name="Text">湿混糊化自动参数控制</Property>
<Property name="WindowState">Normal</Property>

Loading…
Cancel
Save