程序无法正常运行,代码中数据改动较多

This commit is contained in:
YZJ 2024-07-13 13:22:37 +08:00
commit a99c3b275d
2 changed files with 192 additions and 96 deletions

View File

@ -29,11 +29,14 @@
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
<<<<<<< HEAD
OpenCvSharp.Mat mat1 = new OpenCvSharp.Mat();
OpenCvSharp.Mat mat2 = new OpenCvSharp.Mat();
OpenCvSharp.Mat mat3 = new OpenCvSharp.Mat();
OpenCvSharp.Mat mat4 = new OpenCvSharp.Mat();
OpenCvSharp.Mat mat5 = new OpenCvSharp.Mat();
=======
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
tabPage2 = new TabPage();
panel1 = new Panel();
@ -219,11 +222,11 @@
// tabPage2
//
tabPage2.Controls.Add(panel1);
tabPage2.Location = new Point(4, 26);
tabPage2.Location = new Point(4, 33);
tabPage2.Margin = new Padding(4, 2, 4, 2);
tabPage2.Name = "tabPage2";
tabPage2.Padding = new Padding(4, 2, 4, 2);
tabPage2.Size = new Size(1276, 719);
tabPage2.Size = new Size(1276, 712);
tabPage2.TabIndex = 1;
tabPage2.Text = "PLC";
tabPage2.UseVisualStyleBackColor = true;
@ -271,7 +274,11 @@
DistanceShow.Margin = new Padding(4, 2, 4, 2);
DistanceShow.Name = "DistanceShow";
DistanceShow.ReadOnly = true;
<<<<<<< HEAD
DistanceShow.Size = new Size(117, 23);
=======
DistanceShow.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
DistanceShow.TabIndex = 10;
//
// label21
@ -280,7 +287,7 @@
label21.Location = new Point(36, 31);
label21.Margin = new Padding(4, 0, 4, 0);
label21.Name = "label21";
label21.Size = new Size(36, 17);
label21.Size = new Size(54, 25);
label21.TabIndex = 0;
label21.Text = "测距";
//
@ -289,7 +296,7 @@
txtSetValue.Location = new Point(738, 73);
txtSetValue.Margin = new Padding(4, 2, 4, 2);
txtSetValue.Name = "txtSetValue";
txtSetValue.Size = new Size(251, 23);
txtSetValue.Size = new Size(251, 31);
txtSetValue.TabIndex = 14;
//
// groupBox4
@ -358,7 +365,11 @@
SetlnEditmiZOP.Location = new Point(526, 296);
SetlnEditmiZOP.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiZOP.Name = "SetlnEditmiZOP";
<<<<<<< HEAD
SetlnEditmiZOP.Size = new Size(116, 23);
=======
SetlnEditmiZOP.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
SetlnEditmiZOP.TabIndex = 27;
//
// SetlnEditmiYOP
@ -366,7 +377,7 @@
SetlnEditmiYOP.Location = new Point(329, 296);
SetlnEditmiYOP.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiYOP.Name = "SetlnEditmiYOP";
SetlnEditmiYOP.Size = new Size(127, 23);
SetlnEditmiYOP.Size = new Size(127, 31);
SetlnEditmiYOP.TabIndex = 26;
//
// SetlnEditmiXOP
@ -374,7 +385,7 @@
SetlnEditmiXOP.Location = new Point(138, 296);
SetlnEditmiXOP.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiXOP.Name = "SetlnEditmiXOP";
SetlnEditmiXOP.Size = new Size(127, 23);
SetlnEditmiXOP.Size = new Size(127, 31);
SetlnEditmiXOP.TabIndex = 25;
//
// SetlnEditmiZH
@ -382,7 +393,11 @@
SetlnEditmiZH.Location = new Point(526, 242);
SetlnEditmiZH.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiZH.Name = "SetlnEditmiZH";
<<<<<<< HEAD
SetlnEditmiZH.Size = new Size(116, 23);
=======
SetlnEditmiZH.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
SetlnEditmiZH.TabIndex = 23;
//
// SetlnEditmiYH
@ -390,7 +405,7 @@
SetlnEditmiYH.Location = new Point(329, 242);
SetlnEditmiYH.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiYH.Name = "SetlnEditmiYH";
SetlnEditmiYH.Size = new Size(127, 23);
SetlnEditmiYH.Size = new Size(127, 31);
SetlnEditmiYH.TabIndex = 22;
//
// SetlnEditmiXH
@ -398,7 +413,7 @@
SetlnEditmiXH.Location = new Point(138, 242);
SetlnEditmiXH.Margin = new Padding(4, 2, 4, 2);
SetlnEditmiXH.Name = "SetlnEditmiXH";
SetlnEditmiXH.Size = new Size(127, 23);
SetlnEditmiXH.Size = new Size(127, 31);
SetlnEditmiXH.TabIndex = 21;
//
// lnEditmiZOP
@ -406,7 +421,11 @@
lnEditmiZOP.Location = new Point(526, 189);
lnEditmiZOP.Margin = new Padding(4, 2, 4, 2);
lnEditmiZOP.Name = "lnEditmiZOP";
<<<<<<< HEAD
lnEditmiZOP.Size = new Size(116, 23);
=======
lnEditmiZOP.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
lnEditmiZOP.TabIndex = 19;
//
// lnEditmiYOP
@ -414,7 +433,7 @@
lnEditmiYOP.Location = new Point(329, 189);
lnEditmiYOP.Margin = new Padding(4, 2, 4, 2);
lnEditmiYOP.Name = "lnEditmiYOP";
lnEditmiYOP.Size = new Size(127, 23);
lnEditmiYOP.Size = new Size(127, 31);
lnEditmiYOP.TabIndex = 18;
//
// lnEditmiXOP
@ -422,7 +441,7 @@
lnEditmiXOP.Location = new Point(138, 189);
lnEditmiXOP.Margin = new Padding(4, 2, 4, 2);
lnEditmiXOP.Name = "lnEditmiXOP";
lnEditmiXOP.Size = new Size(127, 23);
lnEditmiXOP.Size = new Size(127, 31);
lnEditmiXOP.TabIndex = 17;
//
// label17
@ -431,7 +450,7 @@
label17.Location = new Point(41, 191);
label17.Margin = new Padding(4, 0, 4, 0);
label17.Name = "label17";
label17.Size = new Size(64, 17);
label17.Size = new Size(96, 25);
label17.TabIndex = 16;
label17.Text = "定位位置";
//
@ -441,7 +460,11 @@
lnEditmiZS.Margin = new Padding(4, 2, 4, 2);
lnEditmiZS.Name = "lnEditmiZS";
lnEditmiZS.ReadOnly = true;
<<<<<<< HEAD
lnEditmiZS.Size = new Size(116, 23);
=======
lnEditmiZS.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
lnEditmiZS.TabIndex = 15;
//
// lnEditmiYS
@ -450,7 +473,7 @@
lnEditmiYS.Margin = new Padding(4, 2, 4, 2);
lnEditmiYS.Name = "lnEditmiYS";
lnEditmiYS.ReadOnly = true;
lnEditmiYS.Size = new Size(127, 23);
lnEditmiYS.Size = new Size(127, 31);
lnEditmiYS.TabIndex = 14;
//
// lnEditmiXS
@ -459,7 +482,7 @@
lnEditmiXS.Margin = new Padding(4, 2, 4, 2);
lnEditmiXS.Name = "lnEditmiXS";
lnEditmiXS.ReadOnly = true;
lnEditmiXS.Size = new Size(127, 23);
lnEditmiXS.Size = new Size(127, 31);
lnEditmiXS.TabIndex = 13;
//
// label16
@ -468,7 +491,7 @@
label16.Location = new Point(10, 138);
label16.Margin = new Padding(4, 0, 4, 0);
label16.Name = "label16";
label16.Size = new Size(92, 17);
label16.Size = new Size(138, 25);
label16.TabIndex = 12;
label16.Text = "当前定位速度";
//
@ -478,7 +501,11 @@
lnEditmiZHS.Margin = new Padding(4, 2, 4, 2);
lnEditmiZHS.Name = "lnEditmiZHS";
lnEditmiZHS.ReadOnly = true;
<<<<<<< HEAD
lnEditmiZHS.Size = new Size(116, 23);
=======
lnEditmiZHS.Size = new Size(127, 31);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
lnEditmiZHS.TabIndex = 11;
//
// lnEditmiYHS
@ -487,7 +514,7 @@
lnEditmiYHS.Margin = new Padding(4, 2, 4, 2);
lnEditmiYHS.Name = "lnEditmiYHS";
lnEditmiYHS.ReadOnly = true;
lnEditmiYHS.Size = new Size(127, 23);
lnEditmiYHS.Size = new Size(127, 31);
lnEditmiYHS.TabIndex = 10;
//
// lnEditmiXHS
@ -496,7 +523,7 @@
lnEditmiXHS.Margin = new Padding(4, 2, 4, 2);
lnEditmiXHS.Name = "lnEditmiXHS";
lnEditmiXHS.ReadOnly = true;
lnEditmiXHS.Size = new Size(127, 23);
lnEditmiXHS.Size = new Size(127, 31);
lnEditmiXHS.TabIndex = 9;
//
// label15
@ -505,7 +532,7 @@
label15.Location = new Point(10, 85);
label15.Margin = new Padding(4, 0, 4, 0);
label15.Name = "label15";
label15.Size = new Size(92, 17);
label15.Size = new Size(138, 25);
label15.TabIndex = 8;
label15.Text = "当前手动速度";
//
@ -515,7 +542,7 @@
ZPostion.Location = new Point(580, 42);
ZPostion.Margin = new Padding(4, 0, 4, 0);
ZPostion.Name = "ZPostion";
ZPostion.Size = new Size(16, 17);
ZPostion.Size = new Size(24, 25);
ZPostion.TabIndex = 7;
ZPostion.Text = "0";
//
@ -525,7 +552,7 @@
YPostion.Location = new Point(386, 42);
YPostion.Margin = new Padding(4, 0, 4, 0);
YPostion.Name = "YPostion";
YPostion.Size = new Size(16, 17);
YPostion.Size = new Size(24, 25);
YPostion.TabIndex = 6;
YPostion.Text = "0";
//
@ -535,7 +562,7 @@
XPostion.Location = new Point(185, 42);
XPostion.Margin = new Padding(4, 0, 4, 0);
XPostion.Name = "XPostion";
XPostion.Size = new Size(16, 17);
XPostion.Size = new Size(24, 25);
XPostion.TabIndex = 5;
XPostion.Text = "0";
//
@ -545,7 +572,7 @@
XCurrentPostion.Location = new Point(170, 42);
XCurrentPostion.Margin = new Padding(4, 0, 4, 0);
XCurrentPostion.Name = "XCurrentPostion";
XCurrentPostion.Size = new Size(0, 17);
XCurrentPostion.Size = new Size(0, 25);
XCurrentPostion.TabIndex = 4;
//
// label14
@ -554,7 +581,7 @@
label14.Location = new Point(580, 21);
label14.Margin = new Padding(4, 0, 4, 0);
label14.Name = "label14";
label14.Size = new Size(17, 17);
label14.Size = new Size(25, 25);
label14.TabIndex = 3;
label14.Text = "Z";
//
@ -564,7 +591,7 @@
label13.Location = new Point(386, 18);
label13.Margin = new Padding(4, 0, 4, 0);
label13.Name = "label13";
label13.Size = new Size(17, 17);
label13.Size = new Size(27, 25);
label13.TabIndex = 2;
label13.Text = "Y";
//
@ -574,7 +601,7 @@
label12.Location = new Point(184, 18);
label12.Margin = new Padding(4, 0, 4, 0);
label12.Name = "label12";
label12.Size = new Size(17, 17);
label12.Size = new Size(26, 25);
label12.TabIndex = 1;
label12.Text = "X";
//
@ -584,7 +611,7 @@
label11.Location = new Point(41, 42);
label11.Margin = new Padding(4, 0, 4, 0);
label11.Name = "label11";
label11.Size = new Size(64, 17);
label11.Size = new Size(96, 25);
label11.TabIndex = 0;
label11.Text = "当前位置";
//
@ -790,7 +817,7 @@
writePLCValue.Location = new Point(861, 9);
writePLCValue.Margin = new Padding(4, 2, 4, 2);
writePLCValue.Name = "writePLCValue";
writePLCValue.Size = new Size(127, 23);
writePLCValue.Size = new Size(127, 31);
writePLCValue.TabIndex = 11;
//
// label9
@ -799,7 +826,7 @@
label9.Location = new Point(514, 49);
label9.Margin = new Padding(4, 0, 4, 0);
label9.Name = "label9";
label9.Size = new Size(22, 17);
label9.Size = new Size(33, 25);
label9.TabIndex = 10;
label9.Text = "值";
//
@ -809,7 +836,7 @@
label10.Location = new Point(514, 15);
label10.Margin = new Padding(4, 0, 4, 0);
label10.Name = "label10";
label10.Size = new Size(36, 17);
label10.Size = new Size(54, 25);
label10.TabIndex = 9;
label10.Text = "地址";
//
@ -829,7 +856,7 @@
PLCValue.Location = new Point(577, 43);
PLCValue.Margin = new Padding(4, 2, 4, 2);
PLCValue.Name = "PLCValue";
PLCValue.Size = new Size(127, 23);
PLCValue.Size = new Size(127, 31);
PLCValue.TabIndex = 8;
//
// WriteAdress
@ -837,7 +864,7 @@
WriteAdress.Location = new Point(577, 13);
WriteAdress.Margin = new Padding(4, 2, 4, 2);
WriteAdress.Name = "WriteAdress";
WriteAdress.Size = new Size(127, 23);
WriteAdress.Size = new Size(127, 31);
WriteAdress.TabIndex = 6;
//
// label6
@ -846,7 +873,7 @@
label6.Location = new Point(162, 51);
label6.Margin = new Padding(4, 0, 4, 0);
label6.Name = "label6";
label6.Size = new Size(22, 17);
label6.Size = new Size(33, 25);
label6.TabIndex = 5;
label6.Text = "值";
//
@ -856,7 +883,7 @@
label3.Location = new Point(162, 18);
label3.Margin = new Padding(4, 0, 4, 0);
label3.Name = "label3";
label3.Size = new Size(36, 17);
label3.Size = new Size(54, 25);
label3.TabIndex = 4;
label3.Text = "地址";
//
@ -887,7 +914,7 @@
showPLC.Location = new Point(225, 46);
showPLC.Margin = new Padding(4, 2, 4, 2);
showPLC.Name = "showPLC";
showPLC.Size = new Size(127, 23);
showPLC.Size = new Size(127, 31);
showPLC.TabIndex = 3;
//
// readPLc
@ -895,18 +922,18 @@
readPLc.Location = new Point(225, 15);
readPLc.Margin = new Padding(4, 2, 4, 2);
readPLc.Name = "readPLc";
readPLc.Size = new Size(127, 23);
readPLc.Size = new Size(127, 31);
readPLc.TabIndex = 1;
//
// tabPage1
//
tabPage1.Controls.Add(groupBox3);
tabPage1.Controls.Add(groupBox1);
tabPage1.Location = new Point(4, 26);
tabPage1.Location = new Point(4, 34);
tabPage1.Margin = new Padding(4, 2, 4, 2);
tabPage1.Name = "tabPage1";
tabPage1.Padding = new Padding(4, 2, 4, 2);
tabPage1.Size = new Size(1276, 719);
tabPage1.Size = new Size(1276, 711);
tabPage1.TabIndex = 0;
tabPage1.Text = "相机";
tabPage1.UseVisualStyleBackColor = true;
@ -970,7 +997,7 @@
label5.Location = new Point(257, 18);
label5.Margin = new Padding(4, 0, 4, 0);
label5.Name = "label5";
label5.Size = new Size(64, 17);
label5.Size = new Size(96, 25);
label5.TabIndex = 2;
label5.Text = "链接相机";
//
@ -1001,7 +1028,7 @@
tbGain2.Location = new Point(93, 54);
tbGain2.Margin = new Padding(4, 2, 4, 2);
tbGain2.Name = "tbGain2";
tbGain2.Size = new Size(127, 23);
tbGain2.Size = new Size(127, 31);
tbGain2.TabIndex = 4;
//
// tbExposure2
@ -1009,7 +1036,7 @@
tbExposure2.Location = new Point(93, 22);
tbExposure2.Margin = new Padding(4, 2, 4, 2);
tbExposure2.Name = "tbExposure2";
tbExposure2.Size = new Size(127, 23);
tbExposure2.Size = new Size(127, 31);
tbExposure2.TabIndex = 3;
//
// label7
@ -1018,7 +1045,7 @@
label7.Location = new Point(15, 56);
label7.Margin = new Padding(4, 0, 4, 0);
label7.Name = "label7";
label7.Size = new Size(36, 17);
label7.Size = new Size(54, 25);
label7.TabIndex = 1;
label7.Text = "增益";
//
@ -1028,7 +1055,7 @@
label8.Location = new Point(15, 24);
label8.Margin = new Padding(4, 0, 4, 0);
label8.Name = "label8";
label8.Size = new Size(36, 17);
label8.Size = new Size(54, 25);
label8.TabIndex = 0;
label8.Text = "曝光";
//
@ -1093,7 +1120,7 @@
label1.Location = new Point(257, 18);
label1.Margin = new Padding(4, 0, 4, 0);
label1.Name = "label1";
label1.Size = new Size(64, 17);
label1.Size = new Size(96, 25);
label1.TabIndex = 2;
label1.Text = "链接相机";
//
@ -1124,7 +1151,7 @@
tbGain.Location = new Point(93, 54);
tbGain.Margin = new Padding(4, 2, 4, 2);
tbGain.Name = "tbGain";
tbGain.Size = new Size(127, 23);
tbGain.Size = new Size(127, 31);
tbGain.TabIndex = 4;
//
// tbExposure
@ -1132,7 +1159,7 @@
tbExposure.Location = new Point(93, 22);
tbExposure.Margin = new Padding(4, 2, 4, 2);
tbExposure.Name = "tbExposure";
tbExposure.Size = new Size(127, 23);
tbExposure.Size = new Size(127, 31);
tbExposure.TabIndex = 3;
//
// label2
@ -1141,7 +1168,7 @@
label2.Location = new Point(15, 56);
label2.Margin = new Padding(4, 0, 4, 0);
label2.Name = "label2";
label2.Size = new Size(36, 17);
label2.Size = new Size(54, 25);
label2.TabIndex = 1;
label2.Text = "增益";
//
@ -1151,7 +1178,7 @@
label4.Location = new Point(15, 24);
label4.Margin = new Padding(4, 0, 4, 0);
label4.Name = "label4";
label4.Size = new Size(36, 17);
label4.Size = new Size(54, 25);
label4.TabIndex = 0;
label4.Text = "曝光";
//
@ -1172,10 +1199,10 @@
// tabPage5
//
tabPage5.Controls.Add(panel4);
tabPage5.Location = new Point(4, 26);
tabPage5.Location = new Point(4, 34);
tabPage5.Margin = new Padding(4, 2, 4, 2);
tabPage5.Name = "tabPage5";
tabPage5.Size = new Size(1276, 719);
tabPage5.Size = new Size(1276, 711);
tabPage5.TabIndex = 3;
tabPage5.Text = "流程";
tabPage5.UseVisualStyleBackColor = true;
@ -1187,7 +1214,7 @@
panel4.Location = new Point(0, 0);
panel4.Margin = new Padding(4, 2, 4, 2);
panel4.Name = "panel4";
panel4.Size = new Size(1276, 719);
panel4.Size = new Size(1276, 711);
panel4.TabIndex = 0;
//
// panel5
@ -1204,10 +1231,6 @@
// groupBox2
//
groupBox2.AutoSize = true;
groupBox2.Controls.Add(canvas4);
groupBox2.Controls.Add(canvas3);
groupBox2.Controls.Add(canvas2);
groupBox2.Controls.Add(canvas1);
groupBox2.Controls.Add(originMatShow);
groupBox2.Controls.Add(ResultMatShow);
groupBox2.Location = new Point(0, 0);
@ -1326,7 +1349,6 @@
//
// panel8
//
panel8.Controls.Add(canvas5);
panel8.Controls.Add(textBox2);
panel8.Controls.Add(label36);
panel8.Controls.Add(textBox1);
@ -1377,7 +1399,7 @@
textBox2.Margin = new Padding(4, 2, 4, 2);
textBox2.Name = "textBox2";
textBox2.ReadOnly = true;
textBox2.Size = new Size(82, 23);
textBox2.Size = new Size(82, 31);
textBox2.TabIndex = 17;
//
// label36
@ -1385,7 +1407,7 @@
label36.AutoSize = true;
label36.Location = new Point(353, 290);
label36.Name = "label36";
label36.Size = new Size(64, 17);
label36.Size = new Size(96, 25);
label36.TabIndex = 16;
label36.Text = "日误检率";
//
@ -1395,7 +1417,7 @@
textBox1.Margin = new Padding(4, 2, 4, 2);
textBox1.Name = "textBox1";
textBox1.ReadOnly = true;
textBox1.Size = new Size(82, 23);
textBox1.Size = new Size(82, 31);
textBox1.TabIndex = 15;
//
// label35
@ -1403,7 +1425,7 @@
label35.AutoSize = true;
label35.Location = new Point(353, 240);
label35.Name = "label35";
label35.Size = new Size(50, 17);
label35.Size = new Size(75, 25);
label35.TabIndex = 14;
label35.Text = "误检率";
//
@ -1413,7 +1435,7 @@
.Location = new Point(427, 24);
.Margin = new Padding(4, 0, 4, 0);
.Name = "实时显示";
.Size = new Size(64, 17);
.Size = new Size(96, 25);
.TabIndex = 12;
.Text = "实时显示";
//
@ -1433,7 +1455,7 @@
OKDNum.Margin = new Padding(4, 2, 4, 2);
OKDNum.Name = "OKDNum";
OKDNum.ReadOnly = true;
OKDNum.Size = new Size(127, 23);
OKDNum.Size = new Size(127, 31);
OKDNum.TabIndex = 10;
//
// label20
@ -1442,7 +1464,7 @@
label20.Location = new Point(32, 201);
label20.Margin = new Padding(4, 0, 4, 0);
label20.Name = "label20";
label20.Size = new Size(56, 17);
label20.Size = new Size(84, 25);
label20.TabIndex = 9;
label20.Text = "OK个数";
//
@ -1452,7 +1474,7 @@
NGDNum.Margin = new Padding(4, 2, 4, 2);
NGDNum.Name = "NGDNum";
NGDNum.ReadOnly = true;
NGDNum.Size = new Size(127, 23);
NGDNum.Size = new Size(127, 31);
NGDNum.TabIndex = 8;
//
// label19
@ -1461,7 +1483,7 @@
label19.Location = new Point(32, 156);
label19.Margin = new Padding(4, 0, 4, 0);
label19.Name = "label19";
label19.Size = new Size(57, 17);
label19.Size = new Size(85, 25);
label19.TabIndex = 7;
label19.Text = "NG个数";
//
@ -1471,7 +1493,7 @@
AllDSum.Margin = new Padding(4, 2, 4, 2);
AllDSum.Name = "AllDSum";
AllDSum.ReadOnly = true;
AllDSum.Size = new Size(127, 23);
AllDSum.Size = new Size(127, 31);
AllDSum.TabIndex = 6;
//
// label18
@ -1480,7 +1502,7 @@
label18.Location = new Point(32, 114);
label18.Margin = new Padding(4, 0, 4, 0);
label18.Name = "label18";
label18.Size = new Size(50, 17);
label18.Size = new Size(75, 25);
label18.TabIndex = 5;
label18.Text = "总个数";
//
@ -1512,7 +1534,7 @@
DevNameCombo.Location = new Point(32, 22);
DevNameCombo.Margin = new Padding(4, 2, 4, 2);
DevNameCombo.Name = "DevNameCombo";
DevNameCombo.Size = new Size(256, 25);
DevNameCombo.Size = new Size(256, 33);
DevNameCombo.TabIndex = 1;
//
// InitMachine
@ -1529,10 +1551,10 @@
// tabPage3
//
tabPage3.Controls.Add(panel2);
tabPage3.Location = new Point(4, 26);
tabPage3.Location = new Point(4, 33);
tabPage3.Margin = new Padding(4, 2, 4, 2);
tabPage3.Name = "tabPage3";
tabPage3.Size = new Size(1276, 719);
tabPage3.Size = new Size(1276, 712);
tabPage3.TabIndex = 4;
tabPage3.Text = "录入新型号";
tabPage3.UseVisualStyleBackColor = true;
@ -1588,7 +1610,7 @@
WhiteBanCbx.Location = new Point(742, 231);
WhiteBanCbx.Margin = new Padding(4, 2, 4, 2);
WhiteBanCbx.Name = "WhiteBanCbx";
WhiteBanCbx.Size = new Size(41, 21);
WhiteBanCbx.Size = new Size(59, 29);
WhiteBanCbx.TabIndex = 40;
WhiteBanCbx.Text = "是";
WhiteBanCbx.UseVisualStyleBackColor = true;
@ -1599,7 +1621,7 @@
label33.Location = new Point(471, 232);
label33.Margin = new Padding(4, 0, 4, 0);
label33.Name = "label33";
label33.Size = new Size(162, 17);
label33.Size = new Size(243, 25);
label33.TabIndex = 39;
label33.Text = "面板第二块区域是白板吗";
//
@ -1609,7 +1631,7 @@
label28.Location = new Point(23, 187);
label28.Margin = new Padding(4, 0, 4, 0);
label28.Name = "label28";
label28.Size = new Size(101, 17);
label28.Size = new Size(151, 25);
label28.TabIndex = 14;
label28.Text = "第一次拍照Z轴";
//
@ -1629,7 +1651,7 @@
modelChangeCbx.Location = new Point(1059, 14);
modelChangeCbx.Margin = new Padding(4, 2, 4, 2);
modelChangeCbx.Name = "modelChangeCbx";
modelChangeCbx.Size = new Size(241, 23);
modelChangeCbx.Size = new Size(241, 31);
modelChangeCbx.TabIndex = 34;
modelChangeCbx.Text = "D:\\Hisence\\config\\chinese.json";
//
@ -1639,7 +1661,7 @@
label34.Location = new Point(923, 19);
label34.Margin = new Padding(4, 0, 4, 0);
label34.Name = "label34";
label34.Size = new Size(92, 17);
label34.Size = new Size(138, 25);
label34.TabIndex = 33;
label34.Text = "面板语言选择";
//
@ -1681,7 +1703,7 @@
Cam2MatCbx.Location = new Point(608, 190);
Cam2MatCbx.Margin = new Padding(4, 2, 4, 2);
Cam2MatCbx.Name = "Cam2MatCbx";
Cam2MatCbx.Size = new Size(279, 23);
Cam2MatCbx.Size = new Size(279, 31);
Cam2MatCbx.TabIndex = 29;
Cam2MatCbx.Text = "D:\\Hisence\\类型\\Lp\\002jpg";
//
@ -1691,7 +1713,7 @@
label22.Location = new Point(471, 190);
label22.Margin = new Padding(4, 0, 4, 0);
label22.Name = "label22";
label22.Size = new Size(92, 17);
label22.Size = new Size(138, 25);
label22.TabIndex = 28;
label22.Text = "面板第二张图";
//
@ -1700,7 +1722,7 @@
Cam1MatCbx.Location = new Point(608, 142);
Cam1MatCbx.Margin = new Padding(4, 2, 4, 2);
Cam1MatCbx.Name = "Cam1MatCbx";
Cam1MatCbx.Size = new Size(279, 23);
Cam1MatCbx.Size = new Size(279, 31);
Cam1MatCbx.TabIndex = 27;
Cam1MatCbx.Text = "D:\\Hisence\\类型\\Lp\\001.jpg";
//
@ -1710,7 +1732,7 @@
label23.Location = new Point(472, 147);
label23.Margin = new Padding(4, 0, 4, 0);
label23.Name = "label23";
label23.Size = new Size(92, 17);
label23.Size = new Size(138, 25);
label23.TabIndex = 26;
label23.Text = "面板第一张图";
//
@ -1730,7 +1752,7 @@
DetectBArMatbox.Location = new Point(607, 104);
DetectBArMatbox.Margin = new Padding(4, 2, 4, 2);
DetectBArMatbox.Name = "DetectBArMatbox";
DetectBArMatbox.Size = new Size(280, 23);
DetectBArMatbox.Size = new Size(280, 31);
DetectBArMatbox.TabIndex = 24;
DetectBArMatbox.Text = "D:\\Hisence\\类型\\Lp202452414231.jpg";
//
@ -1740,7 +1762,7 @@
label24.Location = new Point(471, 110);
label24.Margin = new Padding(4, 0, 4, 0);
label24.Name = "label24";
label24.Size = new Size(64, 17);
label24.Size = new Size(96, 25);
label24.TabIndex = 23;
label24.Text = "条码录入";
//
@ -1760,7 +1782,7 @@
moveTwoZbox.Location = new Point(607, 56);
moveTwoZbox.Margin = new Padding(4, 2, 4, 2);
moveTwoZbox.Name = "moveTwoZbox";
moveTwoZbox.Size = new Size(280, 23);
moveTwoZbox.Size = new Size(280, 31);
moveTwoZbox.TabIndex = 21;
moveTwoZbox.Text = "0";
//
@ -1770,7 +1792,7 @@
label25.Location = new Point(471, 62);
label25.Margin = new Padding(4, 0, 4, 0);
label25.Name = "label25";
label25.Size = new Size(101, 17);
label25.Size = new Size(151, 25);
label25.TabIndex = 20;
label25.Text = "第二次拍照Z轴";
//
@ -1779,7 +1801,7 @@
moveTwoYbox.Location = new Point(607, 11);
moveTwoYbox.Margin = new Padding(4, 2, 4, 2);
moveTwoYbox.Name = "moveTwoYbox";
moveTwoYbox.Size = new Size(280, 23);
moveTwoYbox.Size = new Size(280, 31);
moveTwoYbox.TabIndex = 19;
moveTwoYbox.Text = "0";
//
@ -1789,7 +1811,7 @@
label26.Location = new Point(471, 17);
label26.Margin = new Padding(4, 0, 4, 0);
label26.Name = "label26";
label26.Size = new Size(101, 17);
label26.Size = new Size(153, 25);
label26.TabIndex = 18;
label26.Text = "第二次拍照Y轴";
//
@ -1798,7 +1820,7 @@
moveTwoXbox.Location = new Point(143, 229);
moveTwoXbox.Margin = new Padding(4, 2, 4, 2);
moveTwoXbox.Name = "moveTwoXbox";
moveTwoXbox.Size = new Size(287, 23);
moveTwoXbox.Size = new Size(287, 31);
moveTwoXbox.TabIndex = 17;
moveTwoXbox.Text = "54964";
//
@ -1808,7 +1830,7 @@
label27.Location = new Point(21, 233);
label27.Margin = new Padding(4, 0, 4, 0);
label27.Name = "label27";
label27.Size = new Size(101, 17);
label27.Size = new Size(152, 25);
label27.TabIndex = 16;
label27.Text = "第二次拍照X轴";
//
@ -1817,7 +1839,7 @@
moveZbox.Location = new Point(143, 182);
moveZbox.Margin = new Padding(4, 2, 4, 2);
moveZbox.Name = "moveZbox";
moveZbox.Size = new Size(287, 23);
moveZbox.Size = new Size(287, 31);
moveZbox.TabIndex = 15;
moveZbox.Text = "0";
//
@ -1826,7 +1848,7 @@
moveYbox.Location = new Point(143, 137);
moveYbox.Margin = new Padding(4, 2, 4, 2);
moveYbox.Name = "moveYbox";
moveYbox.Size = new Size(287, 23);
moveYbox.Size = new Size(287, 31);
moveYbox.TabIndex = 13;
moveYbox.Text = "0";
//
@ -1836,7 +1858,7 @@
label29.Location = new Point(22, 143);
label29.Margin = new Padding(4, 0, 4, 0);
label29.Name = "label29";
label29.Size = new Size(101, 17);
label29.Size = new Size(153, 25);
label29.TabIndex = 12;
label29.Text = "第一次拍照Y轴";
//
@ -1845,7 +1867,7 @@
moveXbox.Location = new Point(143, 98);
moveXbox.Margin = new Padding(4, 2, 4, 2);
moveXbox.Name = "moveXbox";
moveXbox.Size = new Size(287, 23);
moveXbox.Size = new Size(287, 31);
moveXbox.TabIndex = 11;
moveXbox.Text = "8974";
//
@ -1855,7 +1877,7 @@
label30.Location = new Point(22, 104);
label30.Margin = new Padding(4, 0, 4, 0);
label30.Name = "label30";
label30.Size = new Size(101, 17);
label30.Size = new Size(152, 25);
label30.TabIndex = 10;
label30.Text = "第一次拍照X轴";
//
@ -1864,7 +1886,7 @@
OcrBarBox.Location = new Point(143, 50);
OcrBarBox.Margin = new Padding(4, 2, 4, 2);
OcrBarBox.Name = "OcrBarBox";
OcrBarBox.Size = new Size(287, 23);
OcrBarBox.Size = new Size(287, 31);
OcrBarBox.TabIndex = 5;
OcrBarBox.Text = "1234567890";
//
@ -1874,7 +1896,7 @@
label31.Location = new Point(18, 56);
label31.Margin = new Padding(4, 0, 4, 0);
label31.Name = "label31";
label31.Size = new Size(36, 17);
label31.Size = new Size(54, 25);
label31.TabIndex = 4;
label31.Text = "条码";
//
@ -1883,7 +1905,7 @@
TypeBox.Location = new Point(143, 11);
TypeBox.Margin = new Padding(4, 2, 4, 2);
TypeBox.Name = "TypeBox";
TypeBox.Size = new Size(287, 23);
TypeBox.Size = new Size(287, 31);
TypeBox.TabIndex = 3;
TypeBox.Text = "1";
//
@ -1904,7 +1926,7 @@
label32.Location = new Point(18, 17);
label32.Margin = new Padding(4, 0, 4, 0);
label32.Name = "label32";
label32.Size = new Size(36, 17);
label32.Size = new Size(54, 25);
label32.TabIndex = 1;
label32.Text = "类型";
//
@ -1914,6 +1936,7 @@
InsertDataDgv.Location = new Point(15, 264);
InsertDataDgv.Margin = new Padding(4, 2, 4, 2);
InsertDataDgv.Name = "InsertDataDgv";
InsertDataDgv.RowHeadersWidth = 62;
InsertDataDgv.RowTemplate.Height = 25;
InsertDataDgv.Size = new Size(1601, 206);
InsertDataDgv.TabIndex = 0;
@ -1930,12 +1953,13 @@
//
// contextMenuStrip1
//
contextMenuStrip1.ImageScalingSize = new Size(24, 24);
contextMenuStrip1.Name = "contextMenuStrip1";
contextMenuStrip1.Size = new Size(61, 4);
//
// MainForm
//
AutoScaleDimensions = new SizeF(8F, 17F);
AutoScaleDimensions = new SizeF(12F, 25F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = SystemColors.ActiveCaption;
ClientSize = new Size(1284, 920);

View File

@ -374,7 +374,45 @@ namespace HisenceYoloDetection
//string lineBody = "BZ-PC";
//string materialDescript = "皂盒";
<<<<<<< HEAD
//JObject patientInfo = new JObject
=======
/// <summary>
/// 主窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MainForm_Load(object sender, EventArgs e)
{
//报警地址
//string url = "https://inner-apisix.hisense.com/mes-plus/api/Fcc/GetWorkOrderBOMlnfo?user_key=k7gzo1fsfcami7n5hmpxtybyluf9xeue";
////string url = "https://echo.hoppscotch.io";
//string PostUrl = url;
//DateTime dt= DateTime.Now;
//string starttime=string.Format("{0:yyyy_mm_dd}", dt); //17 17 2017 2017
//string startTime = starttime;
//string EndTime = starttime;
//string lineBody = "BZ-PC";
//string MaterialDescripts = "制冷器";
//string MaterialDescripts2 = "工艺管";
//JObject patientinfo = new JObject();
//JArray ids = new JArray();
//ids.Add(MaterialDescripts);
//ids.Add(MaterialDescripts2);
//patientinfo["startTime"] = startTime;
//patientinfo["EndTime"] = EndTime;
//patientinfo["lineBody"] = lineBody;
//patientinfo["MaterialDescripts"] = ids;
//string sendData = JsonConvert.SerializeObject(patientinfo);
////eg: 发送Url需要的格式sendData={"ids":[123],"Name":小黑}
//string resultData = Post(sendData, PostUrl);
//resultData = "{\r\n\t\"Result\": [],\r\n\t\"success\": false,\r\n\t\"ReturnMsg\": \"参数-starttime 不正确!\"\r\n}";
//JObject jo = (JObject)JsonConvert.DeserializeObject(resultData);
//string sucessIf = jo["success"].ToString();
//if(sucessIf.ToLower()=="true")
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
//{
// ["StartTime"] = startTime,
// ["EndTime"] = endTime,
@ -491,8 +529,14 @@ namespace HisenceYoloDetection
OnSpeedShow();//线程开启将速度显示在界面上
OnPostionShow();//线程开启将位置显示在界面上
<<<<<<< HEAD
melsecPLCTCPDriver.WriteInt(YellowLightingAdress, 1);//黄灯
melsecPLCTCPDriver.WriteInt(GreenLightingAdress, 0);//绿灯
=======
melsecPLCTCPDriver.WriteInt("554", 1);//黄灯亮
melsecPLCTCPDriver.WriteInt("552", 0);//其他灯处于灭状态
melsecPLCTCPDriver.WriteInt("556", 0);
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
//t = new System.Timers.Timer(10000);//实例化Timer类设置间隔时间为10000毫秒
//t.Elapsed += new System.Timers.ElapsedEventHandler(Execute);//到达时间的时候执行事件;
//t.AutoReset = true;//设置是执行一次false还是一直执行(true)
@ -792,7 +836,7 @@ namespace HisenceYoloDetection
try
{
//初始化相机
DataSet dataSet = SQLiteHelper.Query("select * from XK_HisenceDet");
//dataGridView1.DataSource = dataSet.Tables[0];
@ -1917,18 +1961,32 @@ namespace HisenceYoloDetection
}
else
{
<<<<<<< HEAD
melsecPLCTCPDriver.WriteInt(RedLightingAdress, 1);//红灯
melsecPLCTCPDriver.WriteInt(YellowLightingAdress, 0);//黄灯
melsecPLCTCPDriver.WriteInt(GreenLightingAdress, 0);//绿灯
melsecPLCTCPDriver.WriteInt(WaringAdress, 1);//报警
=======
melsecPLCTCPDriver.WriteInt("552", 1);//红灯亮
melsecPLCTCPDriver.WriteInt("554", 0);//其他灯灭
melsecPLCTCPDriver.WriteInt("556", 0);
melsecPLCTCPDriver.WriteInt("558", 1);//报警
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
//加上人为判断是否是NG洗衣机
DialogResult dr = MessageBox.Show("是否误检?", "是否误检", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
<<<<<<< HEAD
melsecPLCTCPDriver.WriteInt(RedLightingAdress, 0);//红灯
melsecPLCTCPDriver.WriteInt(YellowLightingAdress, 1);//黄灯
melsecPLCTCPDriver.WriteInt(WaringAdress, 0);//报警
=======
melsecPLCTCPDriver.WriteInt("552", 0);//红灯灭
melsecPLCTCPDriver.WriteInt("554", 1);//黄灯亮
melsecPLCTCPDriver.WriteInt("558", 0);//报警
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
OKDsums++;
WUsums++;
this.Invoke(new Action(() =>
@ -1943,9 +2001,15 @@ namespace HisenceYoloDetection
else
{
NGDsums++;
<<<<<<< HEAD
melsecPLCTCPDriver.WriteInt(WaringAdress, 0);//报警
melsecPLCTCPDriver.WriteInt(RedLightingAdress, 0);//红灯
melsecPLCTCPDriver.WriteInt(YellowLightingAdress, 1);//黄灯
=======
melsecPLCTCPDriver.WriteInt("558", 0);//报警
melsecPLCTCPDriver.WriteInt("552", 0);//红灯灭
melsecPLCTCPDriver.WriteInt("554", 1);//黄灯亮
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
this.Invoke(new Action(() =>
{
@ -2240,11 +2304,19 @@ namespace HisenceYoloDetection
Rect rect2 = new Rect(0, 0, 0, 0);
CheckDiffSciHelper1.CheckDiffSci(path2, pathmat, rect2, rect2, false, "D://Hisence//Test1");
<<<<<<< HEAD
*/
// OnGetBar();
melsecPLCTCPDriver.WriteInt(GreenLightingAdress, 1);//绿灯
melsecPLCTCPDriver.WriteInt(YellowLightingAdress, 0);//黄灯
=======
*/
// OnGetBar();
melsecPLCTCPDriver.WriteInt("556", 1);//绿灯亮
melsecPLCTCPDriver.WriteInt("554", 0);//黄灯灭
>>>>>>> 756d23229c59669d628dd94efb8876679bfe21f7
TriggerCameral2();
ReadyDetect();
myLog("开启流程成功", DateTime.Now);