diff --git a/WindowsFormsApp2/App.config b/WindowsFormsApp2/App.config index 4bfa005..bcb2ae2 100644 --- a/WindowsFormsApp2/App.config +++ b/WindowsFormsApp2/App.config @@ -1,6 +1,14 @@ - + - + + + + + + + + + diff --git a/WindowsFormsApp2/Client.cs b/WindowsFormsApp2/Client.cs index c613ae8..7a04d87 100644 --- a/WindowsFormsApp2/Client.cs +++ b/WindowsFormsApp2/Client.cs @@ -28,8 +28,8 @@ namespace WindowsFormsApp2 //图像大小 - int w = 80, h = 60; - + //int w = 80, h = 60; + int w = 160, h = 120; static Client() { for (int i = 1; i < 16; i++) diff --git a/WindowsFormsApp2/DialogSetup.Designer.cs b/WindowsFormsApp2/DialogSetup.Designer.cs index 56ca110..fef8ecc 100644 --- a/WindowsFormsApp2/DialogSetup.Designer.cs +++ b/WindowsFormsApp2/DialogSetup.Designer.cs @@ -362,7 +362,6 @@ this.label_gain8.Size = new System.Drawing.Size(207, 24); this.label_gain8.TabIndex = 30; this.label_gain8.Text = "8#相机模拟增益(0~64):"; - this.label_gain8.Click += new System.EventHandler(this.label_gain8_Click); // // label_gain7 // @@ -597,7 +596,6 @@ this.label_expo2.Size = new System.Drawing.Size(198, 24); this.label_expo2.TabIndex = 2; this.label_expo2.Text = "2#相机曝光时间(微秒):"; - this.label_expo2.Click += new System.EventHandler(this.label_expo2_Click); // // label_expo1 // diff --git a/WindowsFormsApp2/DialogSetup.cs b/WindowsFormsApp2/DialogSetup.cs index 55af203..51fd177 100644 --- a/WindowsFormsApp2/DialogSetup.cs +++ b/WindowsFormsApp2/DialogSetup.cs @@ -371,7 +371,7 @@ namespace WindowsFormsApp2 private void button3_Click(object sender, EventArgs e) { - // 保存参数 + // 保存参数按钮 String msg = "UPDSETTING:"; msg += NumberOfSupportedCameras.ToString() + ":"; msg += cam_setting.IsAutoOpenCam.ToString() + ":"; @@ -464,15 +464,5 @@ namespace WindowsFormsApp2 { UserControl1.SendMsg("GETCONF"); } - - private void label_expo2_Click(object sender, EventArgs e) - { - - } - - private void label_gain8_Click(object sender, EventArgs e) - { - - } } } diff --git a/WindowsFormsApp2/UserControl1.Designer.cs b/WindowsFormsApp2/UserControl1.Designer.cs index 224ba09..bcfd216 100644 --- a/WindowsFormsApp2/UserControl1.Designer.cs +++ b/WindowsFormsApp2/UserControl1.Designer.cs @@ -213,6 +213,7 @@ this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new System.Drawing.Size(219, 22); this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // toolStripStatusLabel2 // @@ -220,6 +221,10 @@ this.toolStripStatusLabel2.Size = new System.Drawing.Size(167, 22); this.toolStripStatusLabel2.Text = "toolStripStatusLabel2"; // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; @@ -229,7 +234,7 @@ this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; this.label3.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.label3.Size = new System.Drawing.Size(356, 26); + this.label3.Size = new System.Drawing.Size(380, 26); this.label3.TabIndex = 21; this.label3.Text = "上海烟草集团有限责任公司上海卷烟厂"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -239,13 +244,13 @@ this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("宋体", 12F); this.label4.ForeColor = System.Drawing.SystemColors.Control; - this.label4.Location = new System.Drawing.Point(103, 38); + this.label4.Location = new System.Drawing.Point(74, 38); this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; this.label4.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.label4.Size = new System.Drawing.Size(293, 22); + this.label4.Size = new System.Drawing.Size(380, 22); this.label4.TabIndex = 22; - this.label4.Text = "http://www.sh.tobacco.com.cn/"; + this.label4.Text = "http://www.sh.tobacco.com.cn"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label5 @@ -253,14 +258,15 @@ this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Font = new System.Drawing.Font("宋体", 12F); this.label5.ForeColor = System.Drawing.SystemColors.Control; - this.label5.Location = new System.Drawing.Point(1004, 6); + this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label5.Location = new System.Drawing.Point(984, 9); this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; this.label5.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.label5.Size = new System.Drawing.Size(292, 26); + this.label5.Size = new System.Drawing.Size(311, 26); this.label5.TabIndex = 23; - this.label5.Text = "Tel:87907256(0532)青岛维克"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label5.Text = "Tel:87907256(0532) 青岛维克"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label6 // @@ -288,14 +294,14 @@ this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label7.DoubleClick += new System.EventHandler(this.label7_DoubleClick); // - // button_apply + // button1 // this.button1.BackgroundImage = global::WindowsFormsApp2.Properties.Resources.start; this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.Location = new System.Drawing.Point(4, 80); this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); - this.button1.Name = "button_apply"; + this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(104, 91); this.button1.TabIndex = 0; this.button1.UseVisualStyleBackColor = true; diff --git a/WindowsFormsApp2/UserControl1.cs b/WindowsFormsApp2/UserControl1.cs index 5c277e2..be2c77c 100644 --- a/WindowsFormsApp2/UserControl1.cs +++ b/WindowsFormsApp2/UserControl1.cs @@ -228,6 +228,9 @@ namespace WindowsFormsApp2 Byte[] data = u.Receive(ref endpoint); //得到数据的ACSII的字符串形式 String receiveString = ASCII.GetString(data); + + //SendMsg("UDP received:" + receiveString); + if (receiveString != null) { if (receiveString.CompareTo("OpNoLogin") == 0) @@ -429,44 +432,64 @@ namespace WindowsFormsApp2 label7.Text = "无报警"; label7.ForeColor = Color.Lime; } + if (alarm_code == 1) + { + label7.Text = "1#相机丢结果"; + label7.ForeColor = Color.Red; + } + if (alarm_code == 2) + { + label7.Text = "2#相机丢结果"; + label7.ForeColor = Color.Red; + } + if (alarm_code == 3) + { + label7.Text = "1#相机有剔除"; + label7.ForeColor = Color.Red; + } + if (alarm_code == 4) + { + label7.Text = "2#相机有剔除"; + label7.ForeColor = Color.Red; + } if (alarm_code == 5) { - label7.Text = "1#相机断开"; + label7.Text = "1#相机通讯故障"; label7.ForeColor= Color.Red; } if (alarm_code == 6) { - label7.Text = "2#相机断开"; + label7.Text = "2#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 7) { - label7.Text = "3#相机断开"; + label7.Text = "3#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 8) { - label7.Text = "4#相机断开"; + label7.Text = "4#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 9) { - label7.Text = "5#相机断开"; + label7.Text = "5#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 10) { - label7.Text = "6#相机断开"; + label7.Text = "6#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 11) { - label7.Text = "7#相机断开"; + label7.Text = "7#相机通讯故障"; label7.ForeColor = Color.Red; } if (alarm_code == 12) { - label7.Text = "8#相机断开"; + label7.Text = "8#相机通讯故障"; label7.ForeColor = Color.Red; } } @@ -640,6 +663,7 @@ namespace WindowsFormsApp2 private void UserControl1_Load(object sender, EventArgs e) { timer1.Interval = 1000; + timer1.Start(); } diff --git a/WindowsFormsApp2/UserControl1.resx b/WindowsFormsApp2/UserControl1.resx index 72edb66..0cecbc4 100644 --- a/WindowsFormsApp2/UserControl1.resx +++ b/WindowsFormsApp2/UserControl1.resx @@ -171,7 +171,7 @@ RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAAOvgAADr4B6kKxwAAAI+pJREFUeF7Vegd4FOX+ + j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAAOvAAADrwBlbxySQAAI+pJREFUeF7Vegd4FOX+ 9Y/QsSCiSJUiRRREBZQuSBFFpAqCgEAoivQiHSH0HkoSIPQAgQRCEiABQgkkIYWQTnpI74X0urvnf97d RLHcexXv9zzfXZ7DOzM7s5lz3l+deSUqGf8YT9IgD0MLZc12Lzl1MVEiozTyOLRcQisRFq6Rhw+fyi4z F/np7MNh088Fne0609qry4gDzpNXXlzgnlD4cmyxTqIL8VsUQWJLdHLhbq7Y3sqUuAIey4HEPP3v4U8J diff --git a/WindowsFormsApp2/WindowsFormsApp2.csproj b/WindowsFormsApp2/WindowsFormsApp2.csproj index 40a9fa2..c55e135 100644 --- a/WindowsFormsApp2/WindowsFormsApp2.csproj +++ b/WindowsFormsApp2/WindowsFormsApp2.csproj @@ -1,5 +1,6 @@  + Debug @@ -12,6 +13,8 @@ 512 true + + AnyCPU @@ -37,8 +40,38 @@ + + ..\packages\OpenCvSharp4.4.8.0.20230708\lib\net48\OpenCvSharp.dll + + + ..\packages\OpenCvSharp4.WpfExtensions.4.8.0.20230708\lib\net48\OpenCvSharp.WpfExtensions.dll + + + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Drawing.Common.7.0.0\lib\net462\System.Drawing.Common.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + + + @@ -48,6 +81,7 @@ + @@ -172,6 +206,7 @@ DialogLogin.cs + SettingsSingleFileGenerator Settings.Designer.cs @@ -201,4 +236,10 @@ + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + \ No newline at end of file diff --git a/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferences.cache index db93246..c90028f 100644 Binary files a/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 10dea20..1134c78 100644 Binary files a/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/WindowsFormsApp2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.UserControl1.resources b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.UserControl1.resources index 006ff9a..cc4ac99 100644 Binary files a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.UserControl1.resources and b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.UserControl1.resources differ diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache index 6fd3a89..f08a8ef 100644 Binary files a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache and b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.AssemblyReference.cache differ diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache index ec0b5bb..5bb7961 100644 --- a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache +++ b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -efae7d3405c08cd599c1ade1c54aa61a6fa5c3a5 +e59955340ef496cc91298f0dfbe926cd5bb5dc47 diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt index 45c8cb9..2eadaed 100644 --- a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt +++ b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.FileListAbsolute.txt @@ -143,3 +143,29 @@ C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.c C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb +D:\udp\Publish\WindowsFormsApp2.dll.config +D:\udp\Publish\WindowsFormsApp2.dll +D:\udp\Publish\WindowsFormsApp2.pdb +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.AssemblyReference.cache +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Alarm_Record.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Camera_glue.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Change_shift.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.displayResult.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Form1.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogSetup.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.FullScreen.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Output_statistic.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Properties.Resources.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam2.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.UserControl1.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogLogin.resources +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.GenerateResource.cache +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb +D:\udp\Publish\dll\x86\OpenCvSharpExtern.dll +D:\udp\Publish\dll\x86\opencv_videoio_ffmpeg480.dll +D:\udp\Publish\dll\x64\OpenCvSharpExtern.dll +D:\udp\Publish\dll\x64\opencv_videoio_ffmpeg480_64.dll +D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CopyComplete diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache index a9634a1..e2f5286 100644 Binary files a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache and b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.csproj.GenerateResource.cache differ diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.dll b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.dll index ee3cc8c..65358e3 100644 Binary files a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.dll and b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.dll differ diff --git a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb index 9d0bfde..c16f849 100644 Binary files a/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb and b/WindowsFormsApp2/obj/Debug/WindowsFormsApp2.pdb differ diff --git a/WindowsFormsApp2/singleCam.Designer.cs b/WindowsFormsApp2/singleCam.Designer.cs index e1021ca..f206cf1 100644 --- a/WindowsFormsApp2/singleCam.Designer.cs +++ b/WindowsFormsApp2/singleCam.Designer.cs @@ -61,10 +61,10 @@ // this.panel1.Controls.Add(this.groupBox1); this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 718); - this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel1.Location = new System.Drawing.Point(0, 898); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1182, 40); + this.panel1.Size = new System.Drawing.Size(1576, 50); this.panel1.TabIndex = 0; // // groupBox1 @@ -81,10 +81,10 @@ this.groupBox1.Font = new System.Drawing.Font("宋体", 10F); this.groupBox1.ForeColor = System.Drawing.Color.White; this.groupBox1.Location = new System.Drawing.Point(0, 0); - this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.groupBox1.Size = new System.Drawing.Size(1182, 40); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 2, 4, 2); + this.groupBox1.Size = new System.Drawing.Size(1576, 50); this.groupBox1.TabIndex = 9; this.groupBox1.TabStop = false; this.groupBox1.Text = "1#分析结果"; @@ -95,11 +95,11 @@ this.textBox7.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox7.Font = new System.Drawing.Font("宋体", 11F); this.textBox7.ForeColor = System.Drawing.Color.White; - this.textBox7.Location = new System.Drawing.Point(322, 19); - this.textBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox7.Location = new System.Drawing.Point(443, 22); + this.textBox7.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox7.Name = "textBox7"; this.textBox7.ReadOnly = true; - this.textBox7.Size = new System.Drawing.Size(52, 17); + this.textBox7.Size = new System.Drawing.Size(69, 21); this.textBox7.TabIndex = 18; // // label7 @@ -107,9 +107,10 @@ this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("宋体", 10F); this.label7.ForeColor = System.Drawing.Color.White; - this.label7.Location = new System.Drawing.Point(259, 19); + this.label7.Location = new System.Drawing.Point(345, 22); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(77, 14); + this.label7.Size = new System.Drawing.Size(93, 17); this.label7.TabIndex = 16; this.label7.Text = "识别时间:"; // @@ -117,9 +118,10 @@ // this.label8.BackColor = System.Drawing.Color.Lime; this.label8.Font = new System.Drawing.Font("宋体", 15F); - this.label8.Location = new System.Drawing.Point(394, 16); + this.label8.Location = new System.Drawing.Point(525, 20); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(45, 19); + this.label8.Size = new System.Drawing.Size(60, 24); this.label8.TabIndex = 15; this.label8.Text = " OK "; this.label8.Visible = false; @@ -130,11 +132,11 @@ this.textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox6.Font = new System.Drawing.Font("宋体", 11F); this.textBox6.ForeColor = System.Drawing.Color.White; - this.textBox6.Location = new System.Drawing.Point(195, 18); - this.textBox6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox6.Location = new System.Drawing.Point(274, 21); + this.textBox6.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox6.Name = "textBox6"; this.textBox6.ReadOnly = true; - this.textBox6.Size = new System.Drawing.Size(52, 17); + this.textBox6.Size = new System.Drawing.Size(69, 21); this.textBox6.TabIndex = 12; // // label6 @@ -142,9 +144,10 @@ this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("宋体", 10F); this.label6.ForeColor = System.Drawing.Color.White; - this.label6.Location = new System.Drawing.Point(131, 18); + this.label6.Location = new System.Drawing.Point(182, 21); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(77, 14); + this.label6.Size = new System.Drawing.Size(93, 17); this.label6.TabIndex = 11; this.label6.Text = "胶点个数:"; // @@ -154,11 +157,11 @@ this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox5.Font = new System.Drawing.Font("宋体", 11F); this.textBox5.ForeColor = System.Drawing.Color.White; - this.textBox5.Location = new System.Drawing.Point(68, 18); - this.textBox5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox5.Location = new System.Drawing.Point(93, 21); + this.textBox5.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox5.Name = "textBox5"; this.textBox5.ReadOnly = true; - this.textBox5.Size = new System.Drawing.Size(52, 17); + this.textBox5.Size = new System.Drawing.Size(81, 21); this.textBox5.TabIndex = 10; // // label5 @@ -166,9 +169,10 @@ this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("宋体", 10F); this.label5.ForeColor = System.Drawing.Color.White; - this.label5.Location = new System.Drawing.Point(4, 19); + this.label5.Location = new System.Drawing.Point(5, 23); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(70, 14); + this.label5.Size = new System.Drawing.Size(85, 17); this.label5.TabIndex = 9; this.label5.Text = "采集速度:"; // @@ -178,9 +182,9 @@ this.panel2.Controls.Add(this.panel3); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel2.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1182, 718); + this.panel2.Size = new System.Drawing.Size(1576, 898); this.panel2.TabIndex = 2; // // pictureBox1 @@ -188,11 +192,11 @@ this.pictureBox1.AccessibleRole = System.Windows.Forms.AccessibleRole.Window; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox1.Location = new System.Drawing.Point(0, 0); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.pictureBox1.MaximumSize = new System.Drawing.Size(1050, 720); - this.pictureBox1.MinimumSize = new System.Drawing.Size(300, 120); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); + this.pictureBox1.MaximumSize = new System.Drawing.Size(1400, 900); + this.pictureBox1.MinimumSize = new System.Drawing.Size(400, 150); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(1032, 718); + this.pictureBox1.Size = new System.Drawing.Size(1376, 898); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 1; this.pictureBox1.TabStop = false; @@ -212,10 +216,10 @@ this.panel3.Dock = System.Windows.Forms.DockStyle.Right; this.panel3.Font = new System.Drawing.Font("宋体", 11F); this.panel3.ForeColor = System.Drawing.Color.White; - this.panel3.Location = new System.Drawing.Point(1032, 0); - this.panel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel3.Location = new System.Drawing.Point(1376, 0); + this.panel3.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(150, 718); + this.panel3.Size = new System.Drawing.Size(200, 898); this.panel3.TabIndex = 0; // // textBox4 @@ -223,11 +227,11 @@ this.textBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox4.ForeColor = System.Drawing.Color.White; - this.textBox4.Location = new System.Drawing.Point(90, 96); - this.textBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox4.Location = new System.Drawing.Point(120, 120); + this.textBox4.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox4.Name = "textBox4"; this.textBox4.ReadOnly = true; - this.textBox4.Size = new System.Drawing.Size(45, 17); + this.textBox4.Size = new System.Drawing.Size(60, 21); this.textBox4.TabIndex = 7; this.textBox4.Text = "0"; // @@ -236,11 +240,11 @@ this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox3.ForeColor = System.Drawing.Color.White; - this.textBox3.Location = new System.Drawing.Point(90, 68); - this.textBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox3.Location = new System.Drawing.Point(120, 85); + this.textBox3.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; - this.textBox3.Size = new System.Drawing.Size(45, 17); + this.textBox3.Size = new System.Drawing.Size(60, 21); this.textBox3.TabIndex = 6; this.textBox3.Text = "0"; // @@ -249,11 +253,11 @@ this.textBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox2.ForeColor = System.Drawing.Color.White; - this.textBox2.Location = new System.Drawing.Point(90, 40); - this.textBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox2.Location = new System.Drawing.Point(120, 50); + this.textBox2.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; - this.textBox2.Size = new System.Drawing.Size(45, 17); + this.textBox2.Size = new System.Drawing.Size(60, 21); this.textBox2.TabIndex = 5; this.textBox2.Text = "0"; // @@ -262,11 +266,11 @@ this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox1.ForeColor = System.Drawing.Color.White; - this.textBox1.Location = new System.Drawing.Point(90, 12); - this.textBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.textBox1.Location = new System.Drawing.Point(120, 15); + this.textBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(45, 17); + this.textBox1.Size = new System.Drawing.Size(60, 21); this.textBox1.TabIndex = 4; this.textBox1.Text = "0"; // @@ -274,9 +278,10 @@ // this.label4.AutoSize = true; this.label4.ForeColor = System.Drawing.Color.White; - this.label4.Location = new System.Drawing.Point(8, 96); + this.label4.Location = new System.Drawing.Point(11, 120); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(68, 15); + this.label4.Size = new System.Drawing.Size(86, 19); this.label4.TabIndex = 3; this.label4.Text = "1#剔除数"; // @@ -284,9 +289,10 @@ // this.label3.AutoSize = true; this.label3.ForeColor = System.Drawing.Color.White; - this.label3.Location = new System.Drawing.Point(8, 68); + this.label3.Location = new System.Drawing.Point(11, 85); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(54, 15); + this.label3.Size = new System.Drawing.Size(68, 19); this.label3.TabIndex = 2; this.label3.Text = "1#NG数"; // @@ -294,9 +300,10 @@ // this.label2.AutoSize = true; this.label2.ForeColor = System.Drawing.Color.White; - this.label2.Location = new System.Drawing.Point(8, 40); + this.label2.Location = new System.Drawing.Point(11, 50); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(54, 15); + this.label2.Size = new System.Drawing.Size(68, 19); this.label2.TabIndex = 1; this.label2.Text = "1#OK数"; // @@ -304,22 +311,23 @@ // this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.Color.White; - this.label1.Location = new System.Drawing.Point(6, 12); + this.label1.Location = new System.Drawing.Point(8, 15); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(68, 15); + this.label1.Size = new System.Drawing.Size(86, 19); this.label1.TabIndex = 0; this.label1.Text = "1#检测数"; // // singleCam // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Black; this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); - this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.Name = "singleCam"; - this.Size = new System.Drawing.Size(1182, 758); + this.Size = new System.Drawing.Size(1576, 948); this.panel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); diff --git a/WindowsFormsApp2/singleCam.cs b/WindowsFormsApp2/singleCam.cs index 6f8d3f7..e2b9180 100644 --- a/WindowsFormsApp2/singleCam.cs +++ b/WindowsFormsApp2/singleCam.cs @@ -178,7 +178,6 @@ namespace WindowsFormsApp2 { textBox3.Text = data; updateLabel(false); - } } @@ -197,6 +196,10 @@ namespace WindowsFormsApp2 else { if (UserControl1.Stop) + { + label8.Visible = false; + } + else { label8.Visible = true; if (ok) @@ -210,12 +213,7 @@ namespace WindowsFormsApp2 label8.BackColor = Color.Red; } } - else - { - label8.Visible = false; - - } - + } } public Action callback = null;