DryPauseOrReplyColoer

dep
我叫锄头 11 months ago
parent 123a3eea18
commit d2f472e956

@ -479,9 +479,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
DryStartOrStop(ButtonE, RadioE);
}
//DryPauseOrReply
if (ButtonE.DryPauseOrReply == runtime.Sender)
{
DryPauseOrReply(ButtonE, RadioE);
}
if (ButtonE.ZeroClean == runtime.Sender)
if (ButtonE.ZeroClean == runtime.Sender)
{
if (MessageBox.Show("是否车次清零?", "清零确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{

@ -86,6 +86,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public Button DryStartOrStop { get; set; }
public Button DryPauseOrReply { get; set; }
public Button DryDownload { get; set; }
public Button WaterDownload { get; set; }
public Button PasteDry { get; set; }

@ -169,15 +169,44 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ConvertBackColor(dB2105Helper.FeededPdG8);
break;
}
int dryIndex = ControlsHelper.DrySelect(RadioE);
if (dryIndex > 0)
{
var startOrStop = dB2105Helper.GetDryStartOrStop();
bool b = startOrStop[dryIndex - 1];
DryStartOrStopColoer(dryIndex,b);
DB2107Helper dB2107=new DB2107Helper();
bool spare = false;
switch (dryIndex)
{
case 1:
spare = dB2107.NormalStatus.RdyRpt_V1;
break;
case 2:
spare = dB2107.NormalStatus.RdyRpt_V2;
break;
case 3:
spare = dB2107.NormalStatus.RdyRpt_V3;
break;
case 4:
spare = dB2107.NormalStatus.RdyRpt_V4;
break;
}
DryPauseOrReplyColoer(dryIndex, spare);
}
//DryPauseOrReply
}
@ -212,6 +241,25 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
private void DryPauseOrReplyColoer(int no, bool b)
{
//暂停 0 恢复 1
if (b)
{
buttonE.DryPauseOrReply.BackColor = Color.Transparent;
buttonE.DryPauseOrReply.Text = $"干混机{no}(恢复)";
}
else
{
buttonE.DryPauseOrReply.BackColor = Color.Green;
buttonE.DryPauseOrReply.Text = $"干混机{no}(暂停)";
}
}
private string ConvertOnOff(bool state)
{

@ -1213,6 +1213,76 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
public static void DryPauseOrReply(ButtonEntity buttonEntity, MCRadioButtonEntity RadioE)
{
var index = ControlsHelper.DrySelect(RadioE);
if (index <= 0)
{
MessageBox.Show("请选择机台");
return;
}
if (buttonEntity.DryPauseOrReply.Text.Contains("暂停"))
{
if (MessageBox.Show($"是否恢复干混机{index}", "干混机确认",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
switch (index)
{
case 1:
DB2107WriteHelper.Spare1(true);
break;
case 2:
DB2107WriteHelper.Spare2(true);
break;
case 3:
DB2107WriteHelper.Spare3(true);
break;
case 4:
DB2107WriteHelper.Spare4(true);
break;
}
}
else
{
if (buttonEntity.DryPauseOrReply.Text.Contains("恢复"))
{
if (MessageBox.Show($"是否暂停干混机{index}", "干混机确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
}
switch (index)
{
case 1:
DB2107WriteHelper.Spare1(false);
break;
case 2:
DB2107WriteHelper.Spare2(false);
break;
case 3:
DB2107WriteHelper.Spare3(false);
break;
case 4:
DB2107WriteHelper.Spare4(false);
break;
}
}
}
#endregion
#region 湿混机物料封装

@ -25,5 +25,31 @@ namespace DataBlockHelper.DBHelpers
var siemensS7Net = PlcConnect.Instance;
siemensS7Net.Write($"{DbName}.5.{dian}", false);
}
public static void Spare1(bool b)
{
var siemensS7Net = PlcConnect.Instance;
siemensS7Net.Write($"{DbName}.4.5", b);
}
public static void Spare2(bool b)
{
var siemensS7Net = PlcConnect.Instance;
siemensS7Net.Write($"{DbName}.4.6", b);
}
public static void Spare3(bool b)
{
var siemensS7Net = PlcConnect.Instance;
siemensS7Net.Write($"{DbName}.4.7", b);
}
public static void Spare4(bool b)
{
var siemensS7Net = PlcConnect.Instance;
siemensS7Net.Write($"{DbName}.5.0", b);
}
}
}

@ -1000,6 +1000,30 @@
<Property name="TabIndex">63</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox50" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DryPauseOrReply" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2BgcAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2Cw==</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">6, 404</Property>
<Property name="Name">DryPauseOrReply</Property>
<Property name="Size">158, 40</Property>
<Property name="TabIndex">151</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DryStartOrStop" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2BgcAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2Cw==</Binary>
@ -1019,9 +1043,9 @@
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">干混机</Property>
<Property name="Location">6, 405</Property>
<Property name="Location">6, 361</Property>
<Property name="Name">DryStartOrStop</Property>
<Property name="Size">158, 42</Property>
<Property name="Size">158, 37</Property>
<Property name="TabIndex">151</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="PasteDry" children="Controls">
@ -1043,9 +1067,9 @@
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">粘贴配方</Property>
<Property name="Location">6, 345</Property>
<Property name="Location">6, 317</Property>
<Property name="Name">PasteDry</Property>
<Property name="Size">158, 42</Property>
<Property name="Size">158, 34</Property>
<Property name="TabIndex">149</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel109" children="Controls">
@ -1064,7 +1088,7 @@
<Property name="MCEnabled">True</Property>
<Property name="Text">产线选择</Property>
<Property name="Font">宋体, 9pt</Property>
<Property name="Location">10, 322</Property>
<Property name="Location">11, 295</Property>
<Property name="Name">MCLabel109</Property>
<Property name="Size">53, 12</Property>
</Object>
@ -1090,7 +1114,7 @@
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Location">69, 315</Property>
<Property name="Location">70, 288</Property>
<Property name="Name">PasteChooseDry</Property>
<Property name="Size">82, 24</Property>
<Property name="TabIndex">147</Property>
@ -1117,7 +1141,7 @@
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">6, 255</Property>
<Property name="Name">DryDownload</Property>
<Property name="Size">158, 54</Property>
<Property name="Size">158, 30</Property>
<Property name="TabIndex">62</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox51" children="Controls">

Loading…
Cancel
Save