fix - 删除多余包边数据

master
SoulStar 4 months ago
parent 68b0d4f5ee
commit fb3c6af3ca

@ -21,6 +21,7 @@ namespace HighWayIot.Plc.PlcHelper
/// <returns></returns>
public bool UploadToPLC(ZxRecipeParaEntity paraEntity, List<ZxRecipePositionParaEntity> positionParaEntity)
{
//byte[] bytes = new byte[240];
//SPEC编号写入
try
{
@ -45,16 +46,14 @@ namespace HighWayIot.Plc.PlcHelper
//公共参数写入
byte[] bitDatas = new byte[2];
bitDatas[0] = bitDatas[0].SetBoolByIndex(0, paraEntity.S0 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(1, paraEntity.S1 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(2, paraEntity.S2 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(3, paraEntity.S3 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(4, paraEntity.S4 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(5, paraEntity.S5 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(6, paraEntity.S6 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(7, paraEntity.S7 ?? false);
bitDatas[1] = bitDatas[1].SetBoolByIndex(0, paraEntity.S8 ?? false);
bitDatas[1] = bitDatas[1].SetBoolByIndex(1, paraEntity.S9 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(1, paraEntity.S2 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(2, paraEntity.S3 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(3, paraEntity.S4 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(4, paraEntity.S5 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(5, paraEntity.S6 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(6, paraEntity.S7 ?? false);
bitDatas[0] = bitDatas[0].SetBoolByIndex(7, paraEntity.S8 ?? false);
bitDatas[1] = bitDatas[1].SetBoolByIndex(0, paraEntity.S9 ?? false);
ushort bitData = bitDatas.FromBytes();
if (!PlcConnect.PlcWrite2("D390", bitData, DataTypeEnum.UInt16).IsSuccess)
@ -71,6 +70,8 @@ namespace HighWayIot.Plc.PlcHelper
if (!PlcConnect.PlcWrite2("D398", paraEntity.TireWeight ?? 0, DataTypeEnum.Float).IsSuccess)
return false;
//return PlcConnect.MelsecInstance2.Write("D290", bytes).IsSuccess;
return true;
}
@ -91,36 +92,21 @@ namespace HighWayIot.Plc.PlcHelper
if (!SetPositionPara(entity, 320))
return false;
}
else if (entity.Position == 31)
else if (entity.Position == 3)
{
if (!SetPositionPara(entity, 330))
return false;
}
else if (entity.Position == 32)
{
if (!SetPositionPara(entity, 340))
return false;
}
else if (entity.Position == 41)
else if (entity.Position == 4)
{
if (!SetPositionPara(entity, 350))
return false;
}
else if (entity.Position == 42)
{
if (!SetPositionPara(entity, 360))
return false;
}
else if (entity.Position == 51)
else if (entity.Position == 5)
{
if (!SetPositionPara(entity, 370))
return false;
}
else if (entity.Position == 52)
{
if (!SetPositionPara(entity, 380))
return false;
}
else
{
return false;
@ -204,16 +190,14 @@ namespace HighWayIot.Plc.PlcHelper
//公共参数读取
ushort bitData = PlcConnect.MelsecInstance2.ByteTransform.TransUInt16(data, (390 - 290) * 2);
byte[] bitDatas = bitData.ToBytes();
paraEntity.S0 = bitDatas[0].GetBoolByIndex(0);
paraEntity.S1 = bitDatas[0].GetBoolByIndex(1);
paraEntity.S2 = bitDatas[0].GetBoolByIndex(2);
paraEntity.S3 = bitDatas[0].GetBoolByIndex(3);
paraEntity.S4 = bitDatas[0].GetBoolByIndex(4);
paraEntity.S5 = bitDatas[0].GetBoolByIndex(5);
paraEntity.S6 = bitDatas[0].GetBoolByIndex(6);
paraEntity.S7 = bitDatas[0].GetBoolByIndex(7);
paraEntity.S8 = bitDatas[1].GetBoolByIndex(0);
paraEntity.S9 = bitDatas[1].GetBoolByIndex(1);
paraEntity.S2 = bitDatas[0].GetBoolByIndex(1);//390.1
paraEntity.S3 = bitDatas[0].GetBoolByIndex(2);
paraEntity.S4 = bitDatas[0].GetBoolByIndex(3);
paraEntity.S5 = bitDatas[0].GetBoolByIndex(4);
paraEntity.S6 = bitDatas[0].GetBoolByIndex(5);
paraEntity.S7 = bitDatas[0].GetBoolByIndex(6);
paraEntity.S8 = bitDatas[0].GetBoolByIndex(7);
paraEntity.S9 = bitDatas[1].GetBoolByIndex(0);//390.8
paraEntity.RimInch = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (391 - 290) * 2);//("D391");
paraEntity.LightWidth = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (392 - 290) * 2);//("D392");
@ -236,11 +220,8 @@ namespace HighWayIot.Plc.PlcHelper
ReadPositionPara(310-290, data),
ReadPositionPara(320-290, data),
ReadPositionPara(330-290, data),
ReadPositionPara(340-290, data),
ReadPositionPara(350-290, data),
ReadPositionPara(360-290, data),
ReadPositionPara(370-290, data),
ReadPositionPara(380-290, data)
};
@ -260,12 +241,9 @@ namespace HighWayIot.Plc.PlcHelper
if (add == 310 - 290) entity.Position = 1;
if (add == 320 - 290) entity.Position = 2;
if (add == 330 - 290) entity.Position = 31;
if (add == 340 - 290) entity.Position = 32;
if (add == 350 - 290) entity.Position = 41;
if (add == 360 - 290) entity.Position = 42;
if (add == 370 - 290) entity.Position = 51;
if (add == 380 - 290) entity.Position = 52;
if (add == 330 - 290) entity.Position = 3;
if (add == 350 - 290) entity.Position = 4;
if (add == 370 - 290) entity.Position = 5;
for (int i = 1; i <= 10; i++)
{

@ -101,9 +101,6 @@ namespace HighWayIot.Winform.UserControlPages
this.E2TextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.E1TextBox = new System.Windows.Forms.TextBox();
this.SideRadioButtonPanel = new System.Windows.Forms.Panel();
this.SideRadioButton = new System.Windows.Forms.RadioButton();
this.BodyRadioButton = new System.Windows.Forms.RadioButton();
this.PositionRadioButtonPanel = new System.Windows.Forms.Panel();
this.Position5RadioButton = new System.Windows.Forms.RadioButton();
this.Position4RadioButton = new System.Windows.Forms.RadioButton();
@ -111,6 +108,7 @@ namespace HighWayIot.Winform.UserControlPages
this.Position2RadioButton = new System.Windows.Forms.RadioButton();
this.Position1RadioButton = new System.Windows.Forms.RadioButton();
this.groupbox5 = new System.Windows.Forms.GroupBox();
this.label16 = new System.Windows.Forms.Label();
this.PlcSpecNameLabel = new System.Windows.Forms.Label();
this.label34 = new System.Windows.Forms.Label();
this.PlcSpecNoLabel = new System.Windows.Forms.Label();
@ -121,20 +119,16 @@ namespace HighWayIot.Winform.UserControlPages
this.label28 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.S2Check = new System.Windows.Forms.CheckBox();
this.label11 = new System.Windows.Forms.Label();
this.S8Check = new System.Windows.Forms.CheckBox();
this.S9Check = new System.Windows.Forms.CheckBox();
this.S5Check = new System.Windows.Forms.CheckBox();
this.RimInchTextBox = new System.Windows.Forms.TextBox();
this.S1Check = new System.Windows.Forms.CheckBox();
this.label15 = new System.Windows.Forms.Label();
this.S7Check = new System.Windows.Forms.CheckBox();
this.LightWidthTextBox = new System.Windows.Forms.TextBox();
this.S4Check = new System.Windows.Forms.CheckBox();
this.label14 = new System.Windows.Forms.Label();
this.S0Check = new System.Windows.Forms.CheckBox();
this.SlowDistanceTextBox = new System.Windows.Forms.TextBox();
this.S6Check = new System.Windows.Forms.CheckBox();
this.label13 = new System.Windows.Forms.Label();
@ -154,6 +148,7 @@ namespace HighWayIot.Winform.UserControlPages
this.UpdateWeightButton = new System.Windows.Forms.Button();
this.AddWeightButton = new System.Windows.Forms.Button();
this.DeleteWeightButton = new System.Windows.Forms.Button();
this.S2Check = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.WeightDataGridView)).BeginInit();
this.ButtonPanel.SuspendLayout();
this.groupBox1.SuspendLayout();
@ -164,7 +159,6 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel3.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SideRadioButtonPanel.SuspendLayout();
this.PositionRadioButtonPanel.SuspendLayout();
this.groupbox5.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
@ -722,7 +716,6 @@ namespace HighWayIot.Winform.UserControlPages
this.groupBox4.Controls.Add(this.E2TextBox);
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.E1TextBox);
this.groupBox4.Controls.Add(this.SideRadioButtonPanel);
this.groupBox4.Controls.Add(this.PositionRadioButtonPanel);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox4.Location = new System.Drawing.Point(400, 0);
@ -736,7 +729,7 @@ namespace HighWayIot.Winform.UserControlPages
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(403, 136);
this.label6.Location = new System.Drawing.Point(377, 141);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(95, 12);
this.label6.TabIndex = 28;
@ -744,7 +737,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E10TextBox
//
this.E10TextBox.Location = new System.Drawing.Point(504, 132);
this.E10TextBox.Location = new System.Drawing.Point(478, 137);
this.E10TextBox.Name = "E10TextBox";
this.E10TextBox.Size = new System.Drawing.Size(100, 21);
this.E10TextBox.TabIndex = 27;
@ -752,7 +745,7 @@ namespace HighWayIot.Winform.UserControlPages
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(409, 109);
this.label7.Location = new System.Drawing.Point(383, 114);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(89, 12);
this.label7.TabIndex = 26;
@ -760,7 +753,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E9TextBox
//
this.E9TextBox.Location = new System.Drawing.Point(504, 105);
this.E9TextBox.Location = new System.Drawing.Point(478, 110);
this.E9TextBox.Name = "E9TextBox";
this.E9TextBox.Size = new System.Drawing.Size(100, 21);
this.E9TextBox.TabIndex = 25;
@ -768,15 +761,15 @@ namespace HighWayIot.Winform.UserControlPages
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(463, 82);
this.label8.Location = new System.Drawing.Point(353, 87);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(35, 12);
this.label8.Size = new System.Drawing.Size(119, 12);
this.label8.TabIndex = 24;
this.label8.Text = "备用3";
this.label8.Text = "包边宽度(3/4/5工位)";
//
// E8TextBox
//
this.E8TextBox.Location = new System.Drawing.Point(504, 78);
this.E8TextBox.Location = new System.Drawing.Point(478, 83);
this.E8TextBox.Name = "E8TextBox";
this.E8TextBox.Size = new System.Drawing.Size(100, 21);
this.E8TextBox.TabIndex = 23;
@ -784,7 +777,7 @@ namespace HighWayIot.Winform.UserControlPages
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(463, 55);
this.label9.Location = new System.Drawing.Point(437, 60);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 12);
this.label9.TabIndex = 22;
@ -792,7 +785,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E7TextBox
//
this.E7TextBox.Location = new System.Drawing.Point(504, 51);
this.E7TextBox.Location = new System.Drawing.Point(478, 56);
this.E7TextBox.Name = "E7TextBox";
this.E7TextBox.Size = new System.Drawing.Size(100, 21);
this.E7TextBox.TabIndex = 21;
@ -800,7 +793,7 @@ namespace HighWayIot.Winform.UserControlPages
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(463, 28);
this.label10.Location = new System.Drawing.Point(437, 33);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(35, 12);
this.label10.TabIndex = 20;
@ -808,7 +801,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E6TextBox
//
this.E6TextBox.Location = new System.Drawing.Point(504, 24);
this.E6TextBox.Location = new System.Drawing.Point(478, 29);
this.E6TextBox.Name = "E6TextBox";
this.E6TextBox.Size = new System.Drawing.Size(100, 21);
this.E6TextBox.TabIndex = 19;
@ -816,7 +809,7 @@ namespace HighWayIot.Winform.UserControlPages
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(232, 135);
this.label5.Location = new System.Drawing.Point(188, 138);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 18;
@ -824,7 +817,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E5TextBox
//
this.E5TextBox.Location = new System.Drawing.Point(291, 132);
this.E5TextBox.Location = new System.Drawing.Point(247, 135);
this.E5TextBox.Name = "E5TextBox";
this.E5TextBox.Size = new System.Drawing.Size(100, 21);
this.E5TextBox.TabIndex = 17;
@ -832,7 +825,7 @@ namespace HighWayIot.Winform.UserControlPages
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(172, 111);
this.label4.Location = new System.Drawing.Point(128, 114);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(113, 12);
this.label4.TabIndex = 16;
@ -840,7 +833,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E4TextBox
//
this.E4TextBox.Location = new System.Drawing.Point(291, 107);
this.E4TextBox.Location = new System.Drawing.Point(247, 110);
this.E4TextBox.Name = "E4TextBox";
this.E4TextBox.Size = new System.Drawing.Size(100, 21);
this.E4TextBox.TabIndex = 15;
@ -848,7 +841,7 @@ namespace HighWayIot.Winform.UserControlPages
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(160, 85);
this.label3.Location = new System.Drawing.Point(116, 88);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(125, 12);
this.label3.TabIndex = 14;
@ -856,7 +849,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E3TextBox
//
this.E3TextBox.Location = new System.Drawing.Point(291, 80);
this.E3TextBox.Location = new System.Drawing.Point(247, 83);
this.E3TextBox.Name = "E3TextBox";
this.E3TextBox.Size = new System.Drawing.Size(100, 21);
this.E3TextBox.TabIndex = 13;
@ -864,7 +857,7 @@ namespace HighWayIot.Winform.UserControlPages
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(160, 58);
this.label2.Location = new System.Drawing.Point(116, 61);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(125, 12);
this.label2.TabIndex = 12;
@ -872,7 +865,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E2TextBox
//
this.E2TextBox.Location = new System.Drawing.Point(291, 53);
this.E2TextBox.Location = new System.Drawing.Point(247, 56);
this.E2TextBox.Name = "E2TextBox";
this.E2TextBox.Size = new System.Drawing.Size(100, 21);
this.E2TextBox.TabIndex = 11;
@ -880,7 +873,7 @@ namespace HighWayIot.Winform.UserControlPages
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(160, 31);
this.label1.Location = new System.Drawing.Point(116, 34);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 12);
this.label1.TabIndex = 10;
@ -888,51 +881,11 @@ namespace HighWayIot.Winform.UserControlPages
//
// E1TextBox
//
this.E1TextBox.Location = new System.Drawing.Point(291, 26);
this.E1TextBox.Location = new System.Drawing.Point(247, 29);
this.E1TextBox.Name = "E1TextBox";
this.E1TextBox.Size = new System.Drawing.Size(100, 21);
this.E1TextBox.TabIndex = 9;
//
// SideRadioButtonPanel
//
this.SideRadioButtonPanel.Controls.Add(this.SideRadioButton);
this.SideRadioButtonPanel.Controls.Add(this.BodyRadioButton);
this.SideRadioButtonPanel.Location = new System.Drawing.Point(87, 88);
this.SideRadioButtonPanel.Name = "SideRadioButtonPanel";
this.SideRadioButtonPanel.Size = new System.Drawing.Size(63, 66);
this.SideRadioButtonPanel.TabIndex = 8;
//
// SideRadioButton
//
this.SideRadioButton.AutoSize = true;
this.SideRadioButton.Enabled = false;
this.SideRadioButton.Location = new System.Drawing.Point(6, 38);
this.SideRadioButton.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.SideRadioButton.Name = "SideRadioButton";
this.SideRadioButton.Size = new System.Drawing.Size(47, 16);
this.SideRadioButton.TabIndex = 6;
this.SideRadioButton.TabStop = true;
this.SideRadioButton.Text = "包边";
this.SideRadioButton.UseVisualStyleBackColor = true;
this.SideRadioButton.CheckedChanged += new System.EventHandler(this.PositionRadioBoxChange);
this.SideRadioButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PositionRadioButton_MouseDown);
//
// BodyRadioButton
//
this.BodyRadioButton.AutoSize = true;
this.BodyRadioButton.Checked = true;
this.BodyRadioButton.Enabled = false;
this.BodyRadioButton.Location = new System.Drawing.Point(6, 12);
this.BodyRadioButton.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.BodyRadioButton.Name = "BodyRadioButton";
this.BodyRadioButton.Size = new System.Drawing.Size(47, 16);
this.BodyRadioButton.TabIndex = 5;
this.BodyRadioButton.TabStop = true;
this.BodyRadioButton.Text = "胎体";
this.BodyRadioButton.UseVisualStyleBackColor = true;
this.BodyRadioButton.CheckedChanged += new System.EventHandler(this.PositionRadioBoxChange);
this.BodyRadioButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PositionRadioButton_MouseDown);
//
// PositionRadioButtonPanel
//
this.PositionRadioButtonPanel.Controls.Add(this.Position5RadioButton);
@ -1014,6 +967,8 @@ namespace HighWayIot.Winform.UserControlPages
//
// groupbox5
//
this.groupbox5.Controls.Add(this.S2Check);
this.groupbox5.Controls.Add(this.label16);
this.groupbox5.Controls.Add(this.PlcSpecNameLabel);
this.groupbox5.Controls.Add(this.label34);
this.groupbox5.Controls.Add(this.PlcSpecNoLabel);
@ -1024,20 +979,16 @@ namespace HighWayIot.Winform.UserControlPages
this.groupbox5.Controls.Add(this.label28);
this.groupbox5.Controls.Add(this.label22);
this.groupbox5.Controls.Add(this.label21);
this.groupbox5.Controls.Add(this.label20);
this.groupbox5.Controls.Add(this.S2Check);
this.groupbox5.Controls.Add(this.label11);
this.groupbox5.Controls.Add(this.S8Check);
this.groupbox5.Controls.Add(this.S9Check);
this.groupbox5.Controls.Add(this.S5Check);
this.groupbox5.Controls.Add(this.RimInchTextBox);
this.groupbox5.Controls.Add(this.S1Check);
this.groupbox5.Controls.Add(this.label15);
this.groupbox5.Controls.Add(this.S7Check);
this.groupbox5.Controls.Add(this.LightWidthTextBox);
this.groupbox5.Controls.Add(this.S4Check);
this.groupbox5.Controls.Add(this.label14);
this.groupbox5.Controls.Add(this.S0Check);
this.groupbox5.Controls.Add(this.SlowDistanceTextBox);
this.groupbox5.Controls.Add(this.S6Check);
this.groupbox5.Controls.Add(this.label13);
@ -1058,11 +1009,21 @@ namespace HighWayIot.Winform.UserControlPages
this.groupbox5.TabStop = false;
this.groupbox5.Text = "公共参数";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(93, 32);
this.label16.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(17, 12);
this.label16.TabIndex = 69;
this.label16.Text = "1#";
//
// PlcSpecNameLabel
//
this.PlcSpecNameLabel.AutoSize = true;
this.PlcSpecNameLabel.Font = new System.Drawing.Font("宋体", 9F);
this.PlcSpecNameLabel.Location = new System.Drawing.Point(477, 143);
this.PlcSpecNameLabel.Location = new System.Drawing.Point(517, 143);
this.PlcSpecNameLabel.Name = "PlcSpecNameLabel";
this.PlcSpecNameLabel.Size = new System.Drawing.Size(23, 12);
this.PlcSpecNameLabel.TabIndex = 68;
@ -1072,7 +1033,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label34.AutoSize = true;
this.label34.Font = new System.Drawing.Font("宋体", 9F);
this.label34.Location = new System.Drawing.Point(397, 143);
this.label34.Location = new System.Drawing.Point(437, 143);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(83, 12);
this.label34.TabIndex = 67;
@ -1082,7 +1043,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.PlcSpecNoLabel.AutoSize = true;
this.PlcSpecNoLabel.Font = new System.Drawing.Font("宋体", 9F);
this.PlcSpecNoLabel.Location = new System.Drawing.Point(477, 121);
this.PlcSpecNoLabel.Location = new System.Drawing.Point(517, 121);
this.PlcSpecNoLabel.Name = "PlcSpecNoLabel";
this.PlcSpecNoLabel.Size = new System.Drawing.Size(23, 12);
this.PlcSpecNoLabel.TabIndex = 66;
@ -1092,7 +1053,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label32.AutoSize = true;
this.label32.Font = new System.Drawing.Font("宋体", 9F);
this.label32.Location = new System.Drawing.Point(397, 121);
this.label32.Location = new System.Drawing.Point(437, 121);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(71, 12);
this.label32.TabIndex = 65;
@ -1101,7 +1062,7 @@ namespace HighWayIot.Winform.UserControlPages
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(165, 42);
this.label30.Location = new System.Drawing.Point(202, 32);
this.label30.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(17, 12);
@ -1111,7 +1072,7 @@ namespace HighWayIot.Winform.UserControlPages
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(138, 42);
this.label31.Location = new System.Drawing.Point(175, 32);
this.label31.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(17, 12);
@ -1121,7 +1082,7 @@ namespace HighWayIot.Winform.UserControlPages
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(111, 42);
this.label29.Location = new System.Drawing.Point(148, 32);
this.label29.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(17, 12);
@ -1131,7 +1092,7 @@ namespace HighWayIot.Winform.UserControlPages
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(84, 42);
this.label28.Location = new System.Drawing.Point(121, 32);
this.label28.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(17, 12);
@ -1141,7 +1102,7 @@ namespace HighWayIot.Winform.UserControlPages
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(25, 118);
this.label22.Location = new System.Drawing.Point(27, 83);
this.label22.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(53, 12);
@ -1151,37 +1112,17 @@ namespace HighWayIot.Winform.UserControlPages
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(25, 92);
this.label21.Location = new System.Drawing.Point(27, 57);
this.label21.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(53, 12);
this.label21.TabIndex = 59;
this.label21.Text = "工位使用";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(25, 66);
this.label20.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(53, 12);
this.label20.TabIndex = 58;
this.label20.Text = "包边裁切";
//
// S2Check
//
this.S2Check.AutoSize = true;
this.S2Check.Location = new System.Drawing.Point(167, 66);
this.S2Check.Margin = new System.Windows.Forms.Padding(6);
this.S2Check.Name = "S2Check";
this.S2Check.Size = new System.Drawing.Size(15, 14);
this.S2Check.TabIndex = 57;
this.S2Check.UseVisualStyleBackColor = true;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(215, 139);
this.label11.Location = new System.Drawing.Point(255, 139);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(53, 12);
this.label11.TabIndex = 41;
@ -1190,7 +1131,7 @@ namespace HighWayIot.Winform.UserControlPages
// S8Check
//
this.S8Check.AutoSize = true;
this.S8Check.Location = new System.Drawing.Point(167, 118);
this.S8Check.Location = new System.Drawing.Point(177, 82);
this.S8Check.Margin = new System.Windows.Forms.Padding(6);
this.S8Check.Name = "S8Check";
this.S8Check.Size = new System.Drawing.Size(15, 14);
@ -1200,7 +1141,7 @@ namespace HighWayIot.Winform.UserControlPages
// S9Check
//
this.S9Check.AutoSize = true;
this.S9Check.Location = new System.Drawing.Point(86, 92);
this.S9Check.Location = new System.Drawing.Point(204, 82);
this.S9Check.Margin = new System.Windows.Forms.Padding(6);
this.S9Check.Name = "S9Check";
this.S9Check.Size = new System.Drawing.Size(15, 14);
@ -1210,7 +1151,7 @@ namespace HighWayIot.Winform.UserControlPages
// S5Check
//
this.S5Check.AutoSize = true;
this.S5Check.Location = new System.Drawing.Point(167, 92);
this.S5Check.Location = new System.Drawing.Point(177, 56);
this.S5Check.Margin = new System.Windows.Forms.Padding(6);
this.S5Check.Name = "S5Check";
this.S5Check.Size = new System.Drawing.Size(15, 14);
@ -1219,25 +1160,15 @@ namespace HighWayIot.Winform.UserControlPages
//
// RimInchTextBox
//
this.RimInchTextBox.Location = new System.Drawing.Point(274, 27);
this.RimInchTextBox.Location = new System.Drawing.Point(314, 27);
this.RimInchTextBox.Name = "RimInchTextBox";
this.RimInchTextBox.Size = new System.Drawing.Size(100, 21);
this.RimInchTextBox.TabIndex = 32;
//
// S1Check
//
this.S1Check.AutoSize = true;
this.S1Check.Location = new System.Drawing.Point(140, 66);
this.S1Check.Margin = new System.Windows.Forms.Padding(6);
this.S1Check.Name = "S1Check";
this.S1Check.Size = new System.Drawing.Size(15, 14);
this.S1Check.TabIndex = 54;
this.S1Check.UseVisualStyleBackColor = true;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(215, 31);
this.label15.Location = new System.Drawing.Point(255, 31);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(53, 12);
this.label15.TabIndex = 33;
@ -1246,7 +1177,7 @@ namespace HighWayIot.Winform.UserControlPages
// S7Check
//
this.S7Check.AutoSize = true;
this.S7Check.Location = new System.Drawing.Point(140, 118);
this.S7Check.Location = new System.Drawing.Point(150, 82);
this.S7Check.Margin = new System.Windows.Forms.Padding(6);
this.S7Check.Name = "S7Check";
this.S7Check.Size = new System.Drawing.Size(15, 14);
@ -1255,7 +1186,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// LightWidthTextBox
//
this.LightWidthTextBox.Location = new System.Drawing.Point(274, 54);
this.LightWidthTextBox.Location = new System.Drawing.Point(314, 54);
this.LightWidthTextBox.Name = "LightWidthTextBox";
this.LightWidthTextBox.Size = new System.Drawing.Size(100, 21);
this.LightWidthTextBox.TabIndex = 34;
@ -1263,7 +1194,7 @@ namespace HighWayIot.Winform.UserControlPages
// S4Check
//
this.S4Check.AutoSize = true;
this.S4Check.Location = new System.Drawing.Point(140, 92);
this.S4Check.Location = new System.Drawing.Point(150, 56);
this.S4Check.Margin = new System.Windows.Forms.Padding(6);
this.S4Check.Name = "S4Check";
this.S4Check.Size = new System.Drawing.Size(15, 14);
@ -1273,25 +1204,15 @@ namespace HighWayIot.Winform.UserControlPages
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(215, 58);
this.label14.Location = new System.Drawing.Point(255, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(53, 12);
this.label14.TabIndex = 35;
this.label14.Text = "灯标宽度";
//
// S0Check
//
this.S0Check.AutoSize = true;
this.S0Check.Location = new System.Drawing.Point(113, 66);
this.S0Check.Margin = new System.Windows.Forms.Padding(6);
this.S0Check.Name = "S0Check";
this.S0Check.Size = new System.Drawing.Size(15, 14);
this.S0Check.TabIndex = 51;
this.S0Check.UseVisualStyleBackColor = true;
//
// SlowDistanceTextBox
//
this.SlowDistanceTextBox.Location = new System.Drawing.Point(274, 81);
this.SlowDistanceTextBox.Location = new System.Drawing.Point(314, 81);
this.SlowDistanceTextBox.Name = "SlowDistanceTextBox";
this.SlowDistanceTextBox.Size = new System.Drawing.Size(100, 21);
this.SlowDistanceTextBox.TabIndex = 36;
@ -1299,7 +1220,7 @@ namespace HighWayIot.Winform.UserControlPages
// S6Check
//
this.S6Check.AutoSize = true;
this.S6Check.Location = new System.Drawing.Point(113, 118);
this.S6Check.Location = new System.Drawing.Point(204, 56);
this.S6Check.Margin = new System.Windows.Forms.Padding(6);
this.S6Check.Name = "S6Check";
this.S6Check.Size = new System.Drawing.Size(15, 14);
@ -1309,7 +1230,7 @@ namespace HighWayIot.Winform.UserControlPages
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(215, 86);
this.label13.Location = new System.Drawing.Point(255, 86);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(53, 12);
this.label13.TabIndex = 37;
@ -1318,7 +1239,7 @@ namespace HighWayIot.Winform.UserControlPages
// S3Check
//
this.S3Check.AutoSize = true;
this.S3Check.Location = new System.Drawing.Point(113, 92);
this.S3Check.Location = new System.Drawing.Point(123, 56);
this.S3Check.Margin = new System.Windows.Forms.Padding(6);
this.S3Check.Name = "S3Check";
this.S3Check.Size = new System.Drawing.Size(15, 14);
@ -1327,7 +1248,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// StopDistanceTextBox
//
this.StopDistanceTextBox.Location = new System.Drawing.Point(274, 108);
this.StopDistanceTextBox.Location = new System.Drawing.Point(314, 108);
this.StopDistanceTextBox.Name = "StopDistanceTextBox";
this.StopDistanceTextBox.Size = new System.Drawing.Size(100, 21);
this.StopDistanceTextBox.TabIndex = 38;
@ -1335,7 +1256,7 @@ namespace HighWayIot.Winform.UserControlPages
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(215, 112);
this.label12.Location = new System.Drawing.Point(255, 112);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(53, 12);
this.label12.TabIndex = 39;
@ -1343,7 +1264,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// TireWeightTextBox
//
this.TireWeightTextBox.Location = new System.Drawing.Point(274, 135);
this.TireWeightTextBox.Location = new System.Drawing.Point(314, 135);
this.TireWeightTextBox.Name = "TireWeightTextBox";
this.TireWeightTextBox.Size = new System.Drawing.Size(100, 21);
this.TireWeightTextBox.TabIndex = 40;
@ -1352,7 +1273,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.SpecNameLabel.AutoSize = true;
this.SpecNameLabel.Font = new System.Drawing.Font("宋体", 12F);
this.SpecNameLabel.Location = new System.Drawing.Point(396, 96);
this.SpecNameLabel.Location = new System.Drawing.Point(436, 96);
this.SpecNameLabel.Name = "SpecNameLabel";
this.SpecNameLabel.Size = new System.Drawing.Size(31, 16);
this.SpecNameLabel.TabIndex = 46;
@ -1362,7 +1283,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label18.AutoSize = true;
this.label18.Font = new System.Drawing.Font("宋体", 12F);
this.label18.Location = new System.Drawing.Point(396, 28);
this.label18.Location = new System.Drawing.Point(436, 28);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(71, 16);
this.label18.TabIndex = 43;
@ -1372,7 +1293,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.SpecNoLabel.AutoSize = true;
this.SpecNoLabel.Font = new System.Drawing.Font("宋体", 12F);
this.SpecNoLabel.Location = new System.Drawing.Point(396, 50);
this.SpecNoLabel.Location = new System.Drawing.Point(436, 50);
this.SpecNoLabel.Name = "SpecNoLabel";
this.SpecNoLabel.Size = new System.Drawing.Size(31, 16);
this.SpecNoLabel.TabIndex = 45;
@ -1382,7 +1303,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label19.AutoSize = true;
this.label19.Font = new System.Drawing.Font("宋体", 12F);
this.label19.Location = new System.Drawing.Point(396, 74);
this.label19.Location = new System.Drawing.Point(436, 74);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(87, 16);
this.label19.TabIndex = 44;
@ -1484,6 +1405,16 @@ namespace HighWayIot.Winform.UserControlPages
this.DeleteWeightButton.UseVisualStyleBackColor = true;
this.DeleteWeightButton.Click += new System.EventHandler(this.DeleteWeightButton_Click);
//
// S2Check
//
this.S2Check.AutoSize = true;
this.S2Check.Location = new System.Drawing.Point(95, 56);
this.S2Check.Margin = new System.Windows.Forms.Padding(6);
this.S2Check.Name = "S2Check";
this.S2Check.Size = new System.Drawing.Size(15, 14);
this.S2Check.TabIndex = 70;
this.S2Check.UseVisualStyleBackColor = true;
//
// RecipeConfigPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -1508,8 +1439,6 @@ namespace HighWayIot.Winform.UserControlPages
this.groupBox7.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.SideRadioButtonPanel.ResumeLayout(false);
this.SideRadioButtonPanel.PerformLayout();
this.PositionRadioButtonPanel.ResumeLayout(false);
this.PositionRadioButtonPanel.PerformLayout();
this.groupbox5.ResumeLayout(false);
@ -1575,11 +1504,8 @@ namespace HighWayIot.Winform.UserControlPages
private RadioButton Position3RadioButton;
private RadioButton Position2RadioButton;
private RadioButton Position1RadioButton;
private RadioButton SideRadioButton;
private RadioButton BodyRadioButton;
private RadioButton Position5RadioButton;
private RadioButton Position4RadioButton;
private Panel SideRadioButtonPanel;
private Panel PositionRadioButtonPanel;
private Label label1;
private TextBox E1TextBox;
@ -1624,7 +1550,6 @@ namespace HighWayIot.Winform.UserControlPages
private Button DownloadFromPlc;
private CheckBox S8Check;
private CheckBox S5Check;
private CheckBox S1Check;
private CheckBox S7Check;
private CheckBox S4Check;
private CheckBox S6Check;
@ -1636,9 +1561,6 @@ namespace HighWayIot.Winform.UserControlPages
private Label label28;
private Label label22;
private Label label21;
private Label label20;
private CheckBox S0Check;
private CheckBox S2Check;
private Button CopyAllButton;
private Button PasteAllButton;
private Button ClearDirtyData;
@ -1646,5 +1568,7 @@ namespace HighWayIot.Winform.UserControlPages
private Label label34;
private Label PlcSpecNoLabel;
private Label label32;
private Label label16;
private CheckBox S2Check;
}
}

@ -606,32 +606,17 @@ namespace HighWayIot.Winform.UserControlPages
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 31
Position = 3
});
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 32
Position = 4
});
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 41
});
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 42
});
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 51
});
zxRecipePositionParaEntity.Add(new ZxRecipePositionParaEntity()
{
Position = 52
Position = 5
});
}
@ -675,8 +660,6 @@ namespace HighWayIot.Winform.UserControlPages
/// <param name="paraEntity"></param>
private void SetPublicParaValue(ZxRecipeParaEntity paraEntity)
{
S0Check.Checked = paraEntity.S0 ?? false;
S1Check.Checked = paraEntity.S1 ?? false;
S2Check.Checked = paraEntity.S2 ?? false;
S3Check.Checked = paraEntity.S3 ?? false;
S4Check.Checked = paraEntity.S4 ?? false;
@ -725,8 +708,6 @@ namespace HighWayIot.Winform.UserControlPages
/// <returns></returns>
private void GetPublicParaValue()
{
zxRecipeParaEntity.S0 = S0Check.Checked;
zxRecipeParaEntity.S1 = S1Check.Checked;
zxRecipeParaEntity.S2 = S2Check.Checked;
zxRecipeParaEntity.S3 = S3Check.Checked;
zxRecipeParaEntity.S4 = S4Check.Checked;
@ -765,17 +746,6 @@ namespace HighWayIot.Winform.UserControlPages
int flag = GetSelectIndex();
SetPrivateParaValue(zxRecipePositionParaEntity.Where(x => x.Position == flag).FirstOrDefault());
if (flag < 10)
{
BodyRadioButton.Enabled = false;
SideRadioButton.Enabled = false;
}
else
{
BodyRadioButton.Enabled = true;
SideRadioButton.Enabled = true;
}
}
}
@ -797,41 +767,17 @@ namespace HighWayIot.Winform.UserControlPages
if (Position3RadioButton.Checked)
{
if (BodyRadioButton.Checked)
{
return 31;
}
if (SideRadioButton.Checked)
{
return 32;
}
return 3;
}
if (Position4RadioButton.Checked)
{
if (BodyRadioButton.Checked)
{
return 41;
}
if (SideRadioButton.Checked)
{
return 42;
}
return 4;
}
if (Position5RadioButton.Checked)
{
if (BodyRadioButton.Checked)
{
return 51;
}
if (SideRadioButton.Checked)
{
return 52;
}
return 5;
}
return 0;
@ -916,8 +862,6 @@ namespace HighWayIot.Winform.UserControlPages
GetPrivateParaValue(index);
ParaCopyBoard = new ZxRecipeParaEntity()
{
S0 = zxRecipeParaEntity.S0 ?? false,
S1 = zxRecipeParaEntity.S1 ?? false,
S2 = zxRecipeParaEntity.S2 ?? false,
S3 = zxRecipeParaEntity.S3 ?? false,
S4 = zxRecipeParaEntity.S4 ?? false,
@ -1055,5 +999,6 @@ namespace HighWayIot.Winform.UserControlPages
}
#endregion
}
}

@ -150,6 +150,66 @@
<metadata name="WeightIsUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MaterialCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MaterialName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MaterialType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MaterialChildType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SetThickness.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SetWidth.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SetLayer.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SetWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SetError.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="WeightIsUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RecipeCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RecipeName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RecipeSpecCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RecipeSpecName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SizeKind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FixedWidth.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="WeightError.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IsUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

@ -47,7 +47,7 @@
//
// button1
//
this.button1.Location = new System.Drawing.Point(97, 45);
this.button1.Location = new System.Drawing.Point(29, 28);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(93, 51);
this.button1.TabIndex = 0;
@ -57,7 +57,7 @@
//
// button2
//
this.button2.Location = new System.Drawing.Point(216, 45);
this.button2.Location = new System.Drawing.Point(148, 28);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(93, 51);
this.button2.TabIndex = 1;
@ -67,7 +67,7 @@
//
// ReadButton
//
this.ReadButton.Location = new System.Drawing.Point(232, 180);
this.ReadButton.Location = new System.Drawing.Point(134, 141);
this.ReadButton.Name = "ReadButton";
this.ReadButton.Size = new System.Drawing.Size(99, 50);
this.ReadButton.TabIndex = 2;
@ -77,7 +77,7 @@
//
// WriteButton
//
this.WriteButton.Location = new System.Drawing.Point(127, 180);
this.WriteButton.Location = new System.Drawing.Point(29, 141);
this.WriteButton.Name = "WriteButton";
this.WriteButton.Size = new System.Drawing.Size(99, 50);
this.WriteButton.TabIndex = 3;
@ -87,14 +87,14 @@
//
// PlcAddress
//
this.PlcAddress.Location = new System.Drawing.Point(438, 169);
this.PlcAddress.Location = new System.Drawing.Point(292, 118);
this.PlcAddress.Name = "PlcAddress";
this.PlcAddress.Size = new System.Drawing.Size(100, 21);
this.PlcAddress.TabIndex = 4;
//
// PlcValue
//
this.PlcValue.Location = new System.Drawing.Point(438, 196);
this.PlcValue.Location = new System.Drawing.Point(292, 145);
this.PlcValue.Name = "PlcValue";
this.PlcValue.Size = new System.Drawing.Size(100, 21);
this.PlcValue.TabIndex = 5;
@ -102,7 +102,7 @@
// PlcType
//
this.PlcType.FormattingEnabled = true;
this.PlcType.Location = new System.Drawing.Point(438, 223);
this.PlcType.Location = new System.Drawing.Point(292, 172);
this.PlcType.Name = "PlcType";
this.PlcType.Size = new System.Drawing.Size(121, 20);
this.PlcType.TabIndex = 6;
@ -110,7 +110,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(391, 172);
this.label1.Location = new System.Drawing.Point(245, 121);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 7;
@ -119,7 +119,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(391, 199);
this.label2.Location = new System.Drawing.Point(245, 148);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(17, 12);
this.label2.TabIndex = 9;
@ -128,7 +128,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(391, 226);
this.label3.Location = new System.Drawing.Point(245, 175);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 10;
@ -138,7 +138,7 @@
//
this.PlcShowValue.AutoSize = true;
this.PlcShowValue.Font = new System.Drawing.Font("宋体", 18F);
this.PlcShowValue.Location = new System.Drawing.Point(93, 249);
this.PlcShowValue.Location = new System.Drawing.Point(33, 216);
this.PlcShowValue.Name = "PlcShowValue";
this.PlcShowValue.Size = new System.Drawing.Size(46, 24);
this.PlcShowValue.TabIndex = 11;
@ -147,7 +147,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(391, 252);
this.label4.Location = new System.Drawing.Point(245, 201);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 13;
@ -155,14 +155,14 @@
//
// LengthTextBox
//
this.LengthTextBox.Location = new System.Drawing.Point(438, 249);
this.LengthTextBox.Location = new System.Drawing.Point(292, 198);
this.LengthTextBox.Name = "LengthTextBox";
this.LengthTextBox.Size = new System.Drawing.Size(100, 21);
this.LengthTextBox.TabIndex = 12;
//
// button3
//
this.button3.Location = new System.Drawing.Point(337, 45);
this.button3.Location = new System.Drawing.Point(269, 28);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(93, 51);
this.button3.TabIndex = 14;
@ -172,7 +172,7 @@
//
// RFIDtext
//
this.RFIDtext.Location = new System.Drawing.Point(216, 102);
this.RFIDtext.Location = new System.Drawing.Point(148, 85);
this.RFIDtext.Name = "RFIDtext";
this.RFIDtext.Size = new System.Drawing.Size(93, 21);
this.RFIDtext.TabIndex = 15;

@ -34,6 +34,8 @@ namespace HighWayIot.Winform.UserControlPages
/// </summary>
private RfidDataAnalyse _rfidDataAnalyse = new RfidDataAnalyse();
XmlUtil xmlUtil = new XmlUtil();
public TestPage()
{
InitializeComponent();
@ -54,7 +56,11 @@ namespace HighWayIot.Winform.UserControlPages
//PlcType.DataSource = ;
}
XmlUtil xmlUtil = new XmlUtil();
/// <summary>
/// 测试按钮1
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
OperateResult<byte[]> PlcResult = PlcConnect.MelsecInstance1.Read("B230", 2);
@ -83,11 +89,24 @@ namespace HighWayIot.Winform.UserControlPages
//}
}
/// <summary>
/// RFID测试
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void button2_Click(object sender, EventArgs e)
{
var a = await _touchSocketTcpClient.Send($"10.20.48.{RFIDtext.Text}", _rfidDataAnalyse.Send02H(1000));
LogHelper.Instance.Info($"10.20.48.{RFIDtext.Text} 发送" + (a ? "成功" : "失败"));
}
/// <summary>
/// 测试按钮3
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void button3_Click(object sender, EventArgs e)
{
}
@ -167,15 +186,5 @@ namespace HighWayIot.Winform.UserControlPages
PlcShowValue.Text = r.ToString();
}
}
private async void button3_Click(object sender, EventArgs e)
{
bool res = false;
await Task.Run(() =>
{
res = PlcConnect.IsConnect2;
});
PlcShowValue.Text = res.ToString();
}
}
}

Loading…
Cancel
Save