解决放大无图像问题(尹工)

CJ980606 2 years ago
parent a20bee9665
commit 39c6ecefb5

@ -40,8 +40,9 @@ namespace Diaoyong
udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep); udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep);
udpcSend.Close(); udpcSend.Close();
} }
catch catch (Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }
@ -130,9 +131,10 @@ namespace Diaoyong
} }
} }
} }
catch catch (Exception ex)
{ {
//SOCKETEventArrive("receive:Nullerror"); System.Diagnostics.Debug.WriteLine(ex.Message);
} }
tryLoop++;//1 loop = 100ms tryLoop++;//1 loop = 100ms
if(tryLoop == 50) if(tryLoop == 50)

@ -1 +1 @@
04bf2dc5143223b57ebea0cf2883e39dde73273d 12c1d82ba3f096dfcfda848bfe12ce5b52201374

@ -62,3 +62,29 @@ D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.exe D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.exe
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.pdb D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\Diaoyong\obj\Debug\Diaoyong.pdb
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\Diaoyong.exe.config
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\Diaoyong.exe
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\Diaoyong.pdb
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.csproj.AssemblyReference.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.csproj.SuggestedBindingRedirects.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.ConnectionTest.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.Form1.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.Properties.Resources.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.csproj.GenerateResource.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CoreCompileInputs.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.exe
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Diaoyong\obj\Debug\Diaoyong.pdb
C:\Users\Administrator\Desktop\UDP\Publish\Diaoyong.exe.config
C:\Users\Administrator\Desktop\UDP\Publish\Diaoyong.exe
C:\Users\Administrator\Desktop\UDP\Publish\Diaoyong.pdb
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.AssemblyReference.cache
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.SuggestedBindingRedirects.cache
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.ConnectionTest.resources
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.Form1.resources
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.Properties.Resources.resources
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.GenerateResource.cache
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CoreCompileInputs.cache
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.exe
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.pdb

Binary file not shown.

Binary file not shown.

@ -1,2 +1,2 @@
MonitorIP=192.168.10.119 MonitorIP=192.168.1.169
MonitorPort=3000 MonitorPort=3000

@ -46,27 +46,28 @@ namespace WindowsFormsApp2
public void DisConnection() public void DisConnection()
{ {
m_Done = true;
try try
{ {
if (u != null) if (u != null)
{ {
m_Done = true; //if (recvThread != null)
if (recvThread != null) //{
{ // this.recvThread.Abort();
this.recvThread.Abort(); //}
} //if (recvThreadImage != null)
if (recvThreadImage != null) //{
{ // this.recvThreadImage.Abort();
this.recvThreadImage.Abort(); //}
}
u.Close(); u.Close();
u = null; u = null;
} }
if (uimage != null) if (uimage != null)
uimage.Close(); uimage.Close();
} }
catch (Exception) catch (Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }
@ -184,19 +185,18 @@ namespace WindowsFormsApp2
public void bindCamId(int id) public void bindCamId(int id)
{ {
_bindCamId = id; _bindCamId = id;
m_Done = false;
try try
{ {
e = new IPEndPoint(new IPAddress(localIP), dataPort + _bindCamId); e = new IPEndPoint(new IPAddress(localIP), dataPort + _bindCamId);
u = new UdpClient(e); u = new UdpClient(e);
recvThread = new Thread(new ThreadStart(Received)); recvThread = new Thread(new ThreadStart(Received));
recvThread.Priority = ThreadPriority.Normal; recvThread.Priority = ThreadPriority.Normal;
recvThread.Start(); recvThread.Start();
} }
catch catch(Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex);
} }
try try
{ {
@ -206,9 +206,9 @@ namespace WindowsFormsApp2
recvThreadImage.Priority = ThreadPriority.Normal; recvThreadImage.Priority = ThreadPriority.Normal;
recvThreadImage.Start(); recvThreadImage.Start();
} }
catch catch (Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex);
} }
} }
@ -292,8 +292,9 @@ namespace WindowsFormsApp2
t(receiveString); t(receiveString);
} }
catch catch(Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex);
//SOCKETEventArrive("receive:Nullerror"); //SOCKETEventArrive("receive:Nullerror");
} }
} }
@ -316,8 +317,9 @@ namespace WindowsFormsApp2
bmp = new Bitmap(w, h, w * 3, PixelFormat.Format24bppRgb, pData); bmp = new Bitmap(w, h, w * 3, PixelFormat.Format24bppRgb, pData);
} }
} }
catch (Exception) catch (Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }
@ -352,9 +354,10 @@ namespace WindowsFormsApp2
Marshal.FreeHGlobal(pData); //free tha memory Marshal.FreeHGlobal(pData); //free tha memory
} }
} }
catch catch (Exception ex)
{ {
//SOCKETEventArrive("receive:Nullerror"); System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }
Thread.Sleep(10); //防止系统资源耗尽 Thread.Sleep(10); //防止系统资源耗尽

@ -33,8 +33,10 @@ namespace WindowsFormsApp2
udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep); udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep);
udpcSend.Close(); udpcSend.Close();
} }
catch catch (Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }

@ -28,15 +28,30 @@ namespace WindowsFormsApp2
} }
} }
public void ReleaseUdp()
{
this.singleCam1.closeSocket();
}
public void bindCam(int d) public void bindCam(int d)
{ {
singleCam1.setCamId(d); singleCam1.setCamId(d);
FormClosed += FullScreen_FormClosed;
camid = d; camid = d;
} }
private void FullScreen_FormClosed(object sender, FormClosedEventArgs e)
{
OnFullScreenClose(camid);
}
private void rotate_Click(object sender, EventArgs e) private void rotate_Click(object sender, EventArgs e)
{ {
UserControl1.SendMsg(Convert.ToString(camid)); UserControl1.SendMsg(Convert.ToString(camid));
} }
public Action<int> OnFullScreenClose;
} }
} }

@ -50,8 +50,10 @@ namespace WindowsFormsApp2
udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep); udpcSend.Send(sendbytes, sendbytes.Length, remoteIpep);
udpcSend.Close(); udpcSend.Close();
} }
catch catch(Exception ex)
{ {
System.Diagnostics.Debug.WriteLine(ex.Message);
} }
} }

@ -6,7 +6,7 @@ namespace WindowsFormsApp2
{ {
public partial class displayResult : UserControl public partial class displayResult : UserControl
{ {
public displayResult() public displayResult()
{ {
InitializeComponent(); InitializeComponent();
@ -22,7 +22,33 @@ namespace WindowsFormsApp2
void callback(int id) void callback(int id)
{ {
switch (id)
{
case 0: singleCam1.closeSocket(); break;
case 1: singleCam2.closeSocket(); break;
case 2: singleCam3.closeSocket(); break;
case 3: singleCam4.closeSocket(); break;
case 4: singleCam5.closeSocket(); break;
case 5: singleCam6.closeSocket(); break;
case 6: singleCam7.closeSocket(); break;
case 7: singleCam8.closeSocket(); break;
}
FullScreen dial = new FullScreen(); FullScreen dial = new FullScreen();
dial.OnFullScreenClose = (camid) =>
{
dial.ReleaseUdp();
switch (camid)
{
case 0: singleCam1.setCamId(0); break;
case 1: singleCam2.setCamId(1); break;
case 2: singleCam3.setCamId(2); break;
case 3: singleCam4.setCamId(3); break;
case 4: singleCam5.setCamId(4); break;
case 5: singleCam6.setCamId(5); break;
case 6: singleCam7.setCamId(6); break;
case 7: singleCam8.setCamId(7); break;
}
};
if (id > -1) if (id > -1)
{ {
dial.bindCam(id); dial.bindCam(id);
@ -30,6 +56,11 @@ namespace WindowsFormsApp2
} }
} }
void onclose(int camid)
{
}
public void init() public void init()
{ {
@ -55,7 +86,5 @@ namespace WindowsFormsApp2
singleCam8.closeSocket(); singleCam8.closeSocket();
userControl11.closeSocket(); userControl11.closeSocket();
} }
} }
} }

@ -101,3 +101,45 @@ D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll
D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb D:\烟厂资料\烟厂程序\程序测试\远程端\230519-解决配方、换班设置问题\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\WindowsFormsApp2.dll.config
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\WindowsFormsApp2.dll
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\Publish\WindowsFormsApp2.pdb
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.AssemblyReference.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Alarm_Record.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Camera_glue.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Change_shift.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.displayResult.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Form1.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogSetup.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.FullScreen.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Output_statistic.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Properties.Resources.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam2.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.UserControl1.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogLogin.resources
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.GenerateResource.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll
D:\烟厂资料\程序测试\远程端\230529-最新Cigarette-UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb
C:\Users\Administrator\Desktop\UDP\Publish\WindowsFormsApp2.dll.config
C:\Users\Administrator\Desktop\UDP\Publish\WindowsFormsApp2.dll
C:\Users\Administrator\Desktop\UDP\Publish\WindowsFormsApp2.pdb
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.AssemblyReference.cache
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Alarm_Record.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Camera_glue.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Change_shift.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.displayResult.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Form1.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogSetup.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.FullScreen.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Output_statistic.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Properties.Resources.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam2.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.UserControl1.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogLogin.resources
C:\Users\Administrator\Desktop\UDP\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.GenerateResource.cache
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

@ -61,10 +61,10 @@
// //
this.panel1.Controls.Add(this.groupBox1); this.panel1.Controls.Add(this.groupBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 897); this.panel1.Location = new System.Drawing.Point(0, 718);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1576, 50); this.panel1.Size = new System.Drawing.Size(1182, 40);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// groupBox1 // groupBox1
@ -81,10 +81,10 @@
this.groupBox1.Font = new System.Drawing.Font("宋体", 10F); this.groupBox1.Font = new System.Drawing.Font("宋体", 10F);
this.groupBox1.ForeColor = System.Drawing.Color.White; this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 2, 4, 2); this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupBox1.Size = new System.Drawing.Size(1576, 50); this.groupBox1.Size = new System.Drawing.Size(1182, 40);
this.groupBox1.TabIndex = 9; this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "1#分析结果"; this.groupBox1.Text = "1#分析结果";
@ -95,11 +95,11 @@
this.textBox7.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox7.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox7.Font = new System.Drawing.Font("宋体", 11F); this.textBox7.Font = new System.Drawing.Font("宋体", 11F);
this.textBox7.ForeColor = System.Drawing.Color.White; this.textBox7.ForeColor = System.Drawing.Color.White;
this.textBox7.Location = new System.Drawing.Point(429, 24); this.textBox7.Location = new System.Drawing.Point(322, 19);
this.textBox7.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox7.Name = "textBox7"; this.textBox7.Name = "textBox7";
this.textBox7.ReadOnly = true; this.textBox7.ReadOnly = true;
this.textBox7.Size = new System.Drawing.Size(69, 21); this.textBox7.Size = new System.Drawing.Size(52, 17);
this.textBox7.TabIndex = 18; this.textBox7.TabIndex = 18;
// //
// label7 // label7
@ -107,10 +107,9 @@
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 10F); this.label7.Font = new System.Drawing.Font("宋体", 10F);
this.label7.ForeColor = System.Drawing.Color.White; this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Location = new System.Drawing.Point(345, 24); this.label7.Location = new System.Drawing.Point(259, 19);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(93, 17); this.label7.Size = new System.Drawing.Size(77, 14);
this.label7.TabIndex = 16; this.label7.TabIndex = 16;
this.label7.Text = "识别时间:"; this.label7.Text = "识别时间:";
// //
@ -118,10 +117,9 @@
// //
this.label8.BackColor = System.Drawing.Color.Lime; this.label8.BackColor = System.Drawing.Color.Lime;
this.label8.Font = new System.Drawing.Font("宋体", 15F); this.label8.Font = new System.Drawing.Font("宋体", 15F);
this.label8.Location = new System.Drawing.Point(525, 20); this.label8.Location = new System.Drawing.Point(394, 16);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(60, 24); this.label8.Size = new System.Drawing.Size(45, 19);
this.label8.TabIndex = 15; this.label8.TabIndex = 15;
this.label8.Text = " OK "; this.label8.Text = " OK ";
this.label8.Visible = false; this.label8.Visible = false;
@ -132,11 +130,11 @@
this.textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox6.Font = new System.Drawing.Font("宋体", 11F); this.textBox6.Font = new System.Drawing.Font("宋体", 11F);
this.textBox6.ForeColor = System.Drawing.Color.White; this.textBox6.ForeColor = System.Drawing.Color.White;
this.textBox6.Location = new System.Drawing.Point(260, 22); this.textBox6.Location = new System.Drawing.Point(195, 18);
this.textBox6.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox6.Name = "textBox6"; this.textBox6.Name = "textBox6";
this.textBox6.ReadOnly = true; this.textBox6.ReadOnly = true;
this.textBox6.Size = new System.Drawing.Size(69, 21); this.textBox6.Size = new System.Drawing.Size(52, 17);
this.textBox6.TabIndex = 12; this.textBox6.TabIndex = 12;
// //
// label6 // label6
@ -144,10 +142,9 @@
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 10F); this.label6.Font = new System.Drawing.Font("宋体", 10F);
this.label6.ForeColor = System.Drawing.Color.White; this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Location = new System.Drawing.Point(175, 22); this.label6.Location = new System.Drawing.Point(131, 18);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(93, 17); this.label6.Size = new System.Drawing.Size(77, 14);
this.label6.TabIndex = 11; this.label6.TabIndex = 11;
this.label6.Text = "胶点个数:"; this.label6.Text = "胶点个数:";
// //
@ -157,11 +154,11 @@
this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox5.Font = new System.Drawing.Font("宋体", 11F); this.textBox5.Font = new System.Drawing.Font("宋体", 11F);
this.textBox5.ForeColor = System.Drawing.Color.White; this.textBox5.ForeColor = System.Drawing.Color.White;
this.textBox5.Location = new System.Drawing.Point(91, 23); this.textBox5.Location = new System.Drawing.Point(68, 18);
this.textBox5.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox5.Name = "textBox5"; this.textBox5.Name = "textBox5";
this.textBox5.ReadOnly = true; this.textBox5.ReadOnly = true;
this.textBox5.Size = new System.Drawing.Size(69, 21); this.textBox5.Size = new System.Drawing.Size(52, 17);
this.textBox5.TabIndex = 10; this.textBox5.TabIndex = 10;
// //
// label5 // label5
@ -169,10 +166,9 @@
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 10F); this.label5.Font = new System.Drawing.Font("宋体", 10F);
this.label5.ForeColor = System.Drawing.Color.White; this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(5, 24); this.label5.Location = new System.Drawing.Point(4, 19);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(85, 17); this.label5.Size = new System.Drawing.Size(70, 14);
this.label5.TabIndex = 9; this.label5.TabIndex = 9;
this.label5.Text = "采集速度:"; this.label5.Text = "采集速度:";
// //
@ -182,9 +178,9 @@
this.panel2.Controls.Add(this.panel3); this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1576, 897); this.panel2.Size = new System.Drawing.Size(1182, 718);
this.panel2.TabIndex = 2; this.panel2.TabIndex = 2;
// //
// pictureBox1 // pictureBox1
@ -192,11 +188,11 @@
this.pictureBox1.AccessibleRole = System.Windows.Forms.AccessibleRole.Window; this.pictureBox1.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0); this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.pictureBox1.MaximumSize = new System.Drawing.Size(1400, 900); this.pictureBox1.MaximumSize = new System.Drawing.Size(1050, 720);
this.pictureBox1.MinimumSize = new System.Drawing.Size(400, 150); this.pictureBox1.MinimumSize = new System.Drawing.Size(300, 120);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(1376, 897); this.pictureBox1.Size = new System.Drawing.Size(1032, 718);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1; this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
@ -216,10 +212,10 @@
this.panel3.Dock = System.Windows.Forms.DockStyle.Right; this.panel3.Dock = System.Windows.Forms.DockStyle.Right;
this.panel3.Font = new System.Drawing.Font("宋体", 11F); this.panel3.Font = new System.Drawing.Font("宋体", 11F);
this.panel3.ForeColor = System.Drawing.Color.White; this.panel3.ForeColor = System.Drawing.Color.White;
this.panel3.Location = new System.Drawing.Point(1376, 0); this.panel3.Location = new System.Drawing.Point(1032, 0);
this.panel3.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.panel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(200, 897); this.panel3.Size = new System.Drawing.Size(150, 718);
this.panel3.TabIndex = 0; this.panel3.TabIndex = 0;
// //
// textBox4 // textBox4
@ -227,11 +223,11 @@
this.textBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); 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.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox4.ForeColor = System.Drawing.Color.White; this.textBox4.ForeColor = System.Drawing.Color.White;
this.textBox4.Location = new System.Drawing.Point(120, 120); this.textBox4.Location = new System.Drawing.Point(90, 96);
this.textBox4.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox4.Name = "textBox4"; this.textBox4.Name = "textBox4";
this.textBox4.ReadOnly = true; this.textBox4.ReadOnly = true;
this.textBox4.Size = new System.Drawing.Size(60, 21); this.textBox4.Size = new System.Drawing.Size(45, 17);
this.textBox4.TabIndex = 7; this.textBox4.TabIndex = 7;
this.textBox4.Text = "0"; this.textBox4.Text = "0";
// //
@ -240,11 +236,11 @@
this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); 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.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox3.ForeColor = System.Drawing.Color.White; this.textBox3.ForeColor = System.Drawing.Color.White;
this.textBox3.Location = new System.Drawing.Point(120, 85); this.textBox3.Location = new System.Drawing.Point(90, 68);
this.textBox3.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox3.Name = "textBox3"; this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true; this.textBox3.ReadOnly = true;
this.textBox3.Size = new System.Drawing.Size(60, 21); this.textBox3.Size = new System.Drawing.Size(45, 17);
this.textBox3.TabIndex = 6; this.textBox3.TabIndex = 6;
this.textBox3.Text = "0"; this.textBox3.Text = "0";
// //
@ -253,11 +249,11 @@
this.textBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); 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.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox2.ForeColor = System.Drawing.Color.White; this.textBox2.ForeColor = System.Drawing.Color.White;
this.textBox2.Location = new System.Drawing.Point(120, 50); this.textBox2.Location = new System.Drawing.Point(90, 40);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true; this.textBox2.ReadOnly = true;
this.textBox2.Size = new System.Drawing.Size(60, 21); this.textBox2.Size = new System.Drawing.Size(45, 17);
this.textBox2.TabIndex = 5; this.textBox2.TabIndex = 5;
this.textBox2.Text = "0"; this.textBox2.Text = "0";
// //
@ -266,11 +262,11 @@
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); 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.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.ForeColor = System.Drawing.Color.White; this.textBox1.ForeColor = System.Drawing.Color.White;
this.textBox1.Location = new System.Drawing.Point(120, 15); this.textBox1.Location = new System.Drawing.Point(90, 12);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.textBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true; this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(60, 21); this.textBox1.Size = new System.Drawing.Size(45, 17);
this.textBox1.TabIndex = 4; this.textBox1.TabIndex = 4;
this.textBox1.Text = "0"; this.textBox1.Text = "0";
// //
@ -278,10 +274,9 @@
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.White; this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Location = new System.Drawing.Point(11, 120); this.label4.Location = new System.Drawing.Point(8, 96);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(86, 19); this.label4.Size = new System.Drawing.Size(68, 15);
this.label4.TabIndex = 3; this.label4.TabIndex = 3;
this.label4.Text = "1#剔除数"; this.label4.Text = "1#剔除数";
// //
@ -289,10 +284,9 @@
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.White; this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(11, 85); this.label3.Location = new System.Drawing.Point(8, 68);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 19); this.label3.Size = new System.Drawing.Size(54, 15);
this.label3.TabIndex = 2; this.label3.TabIndex = 2;
this.label3.Text = "1#NG数"; this.label3.Text = "1#NG数";
// //
@ -300,10 +294,9 @@
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.White; this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(11, 50); this.label2.Location = new System.Drawing.Point(8, 40);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(68, 19); this.label2.Size = new System.Drawing.Size(54, 15);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "1#OK数"; this.label2.Text = "1#OK数";
// //
@ -311,23 +304,22 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White; this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(8, 15); this.label1.Location = new System.Drawing.Point(6, 12);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(86, 19); this.label1.Size = new System.Drawing.Size(68, 15);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "1#检测数"; this.label1.Text = "1#检测数";
// //
// singleCam // singleCam
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black; this.BackColor = System.Drawing.Color.Black;
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "singleCam"; this.Name = "singleCam";
this.Size = new System.Drawing.Size(1576, 947); this.Size = new System.Drawing.Size(1182, 758);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();

@ -59,6 +59,7 @@ namespace WindowsFormsApp2
return; return;
} }
} }
private void _update(string data) private void _update(string data)
{ {
string info_frame = "1"; string info_frame = "1";
@ -218,6 +219,7 @@ namespace WindowsFormsApp2
} }
} }
public Action<int> callback = null; public Action<int> callback = null;
private int thisId = -1; private int thisId = -1;
private void pictureBox1_DoubleClick(object sender, EventArgs e) private void pictureBox1_DoubleClick(object sender, EventArgs e)

Loading…
Cancel
Save