Commit cf3574bd 几米阳光

工作界面增加实时视频功能

1 个父辈 2d1e738e
......@@ -53,6 +53,10 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Basler.Pylon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e389355f398382ab, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\Basler.Pylon.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\dll\halcondotnet.dll</HintPath>
</Reference>
......@@ -99,6 +103,7 @@
<Compile Include="deviceLibrary\urRobot\URRobotControl.cs" />
<Compile Include="deviceLibrary\urRobot\URRobotClient.cs" />
<Compile Include="deviceLibrary\urRobot\URTcpClient.cs" />
<Compile Include="pylon\Camera.cs" />
<Compile Include="Robot\MoveType.cs" />
<Compile Include="Robot\soldering\AlarmType.cs" />
<Compile Include="bean\BoardManager.cs" />
......
using Basler.Pylon;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace URSoldering.DeviceLibrary
{
public class PylonCamera
{
private Camera cam = null;
private List<ICameraInfo> allCameras;
private PixelDataConverter conv = new PixelDataConverter();
private Stopwatch stopWatch = new Stopwatch();
private System.Windows.Forms.PictureBox pic;
public PylonCamera()
{
allCameras = CameraFinder.Enumerate();
}
~PylonCamera()
{
Close();
}
public int Index { set; get; }
public string ErrInfo { set; get; }
public int CameraCount
{
get { return allCameras.Count; }
}
public bool IsOpen
{
get { return cam != null; }
}
public string[] GetName()
{
string[] s = new string[allCameras.Count];
for (int i = 0; i < s.Length; i++)
s[i] = allCameras[i][CameraInfoKey.FullName].ToString();
return s;
}
public void Close()
{
if (cam != null)
{
cam.Close();
cam.Dispose();
cam = null;
}
}
public bool Open()
{
return Open(Index);
}
public bool Open(int idx)
{
if (idx < 0 || idx >= allCameras.Count) return false;
if (cam != null) Close();
try
{
Index = idx;
cam = new Camera(allCameras[idx]);
cam.ConnectionLost += OnConnectionLost;
cam.CameraOpened += OnCameraOpened;
cam.CameraClosed += OnCameraClosed;
cam.StreamGrabber.GrabStarted += OnGrabStarted;
cam.StreamGrabber.ImageGrabbed += OnImageGrabbed;
cam.StreamGrabber.GrabStopped += OnGrabStopped;
cam.Open();
//加载用户设置1
cam.Parameters[PLCamera.UserSetSelector].SetValue(PLCamera.UserSetSelector.UserSet1);
//执行设置
bool bln = cam.Parameters[PLCamera.UserSetLoad].TryExecute();
return true;
}
catch (Exception ex)
{
ErrInfo = ex.Message;
return false;
}
}
public void Stop()
{
if (cam != null)
{
cam.StreamGrabber.Stop();
}
}
public Bitmap syncShot()
{
cam.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.SingleFrame);
cam.StreamGrabber.Start();
IGrabResult grabResult = cam.StreamGrabber.RetrieveResult(5000, TimeoutHandling.ThrowException);
if (!grabResult.IsValid) return null;
Bitmap bmp = new Bitmap(grabResult.Width, grabResult.Height, PixelFormat.Format32bppRgb);
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, grabResult.Width, grabResult.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb);
conv.OutputPixelFormat = PixelType.BGRA8packed;
IntPtr ptrBmp = bmpData.Scan0;
int picSize = bmpData.Stride * grabResult.Height;
conv.Convert(ptrBmp, picSize, grabResult);
byte[] buff = new byte[picSize];
System.Runtime.InteropServices.Marshal.Copy(ptrBmp, buff, 0, picSize);
bmp.UnlockBits(bmpData);
cam.StreamGrabber.Stop();
return bmp;
}
public void asynShot( )
{
try
{
cam.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.SingleFrame);
cam.StreamGrabber.Start(1, GrabStrategy.OneByOne, GrabLoop.ProvidedByStreamGrabber);
}
catch (Exception ex)
{
ErrInfo = ex.Message;
}
}
public void ContinuousShot( )
{
try
{
cam.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.Continuous);
cam.StreamGrabber.Start(GrabStrategy.OneByOne, GrabLoop.ProvidedByStreamGrabber);
}
catch (Exception ex)
{
ErrInfo = ex.Message;
}
}
private void OnConnectionLost(Object sender, EventArgs e)
{
Close();
}
private void OnCameraOpened(Object sender, EventArgs e)
{
}
private void OnCameraClosed(Object sender, EventArgs e)
{
}
private void OnGrabStarted(Object sender, EventArgs e)
{
stopWatch.Reset();
}
private void OnGrabStopped(Object sender, GrabStopEventArgs e)
{
stopWatch.Reset();
}
private void OnImageGrabbed(Object sender, ImageGrabbedEventArgs e)
{
//IGrabResult grabResult = e.GrabResult;
//if (!grabResult.IsValid)
//{ return; }
//if (!stopWatch.IsRunning || stopWatch.ElapsedMilliseconds > 33)
//{
// stopWatch.Restart();
//}
//Common_Asa.Param.cameraBmp = new Bitmap(grabResult.Width, grabResult.Height, PixelFormat.Format32bppRgb);
//BitmapData bmpData = Common_Asa.Param.cameraBmp.LockBits(new Rectangle(0, 0, grabResult.Width, grabResult.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb);
//conv.OutputPixelFormat = PixelType.BGRA8packed;
//IntPtr ptrBmp = bmpData.Scan0;
//int picSize = bmpData.Stride * grabResult.Height;
//conv.Convert(ptrBmp, picSize, grabResult);
//Common_Asa.Param.cameraBuffer = new byte[picSize];
//System.Runtime.InteropServices.Marshal.Copy(ptrBmp, Common_Asa.Param.cameraBuffer, 0, picSize);
//Common_Asa.Param.cameraBmp.UnlockBits(bmpData);
}
}
}
......@@ -50,9 +50,9 @@ namespace URSoldering.Client
private void btnCodeTest_Click(object sender, EventArgs e)
{
FrmAOISetting frm = new FrmAOISetting(this);
this.Visible = false;
frm.Show();
//FrmAOISetting frm = new FrmAOISetting(this);
//this.Visible = false;
//frm.Show();
}
}
}
......@@ -29,26 +29,25 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmWork));
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea7 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend7 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(1D, 98D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(2D, 2D);
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(1D, 98D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(2D, 2D);
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.timer = new System.Windows.Forms.Timer(this.components);
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.logBox = new System.Windows.Forms.RichTextBox();
this.lblRobot = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.picAOI = new System.Windows.Forms.PictureBox();
this.button1 = new System.Windows.Forms.Button();
this.axCKVisionCtrl1 = new AxCKVisionCtrlLib.AxCKVisionCtrl();
this.lblCodeResult = new System.Windows.Forms.Label();
this.lblMesResult = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
......@@ -62,6 +61,7 @@
this.btnBack = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.chbHigh = new System.Windows.Forms.CheckBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnLook = new System.Windows.Forms.Button();
this.gbBoardInfo = new System.Windows.Forms.GroupBox();
this.listPoint = new System.Windows.Forms.ListView();
......@@ -90,11 +90,21 @@
this.chartSolder = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.chartLine = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.label7 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnStopVideo = new System.Windows.Forms.Button();
this.btnStartVideo = new System.Windows.Forms.Button();
this.picVideo = new System.Windows.Forms.PictureBox();
this.button2 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.axCKVisionCtrl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picAOI)).BeginInit();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.gbBoardInfo.SuspendLayout();
this.panel1.SuspendLayout();
this.groupBox4.SuspendLayout();
......@@ -102,6 +112,8 @@
((System.ComponentModel.ISupportInitialize)(this.chartPersent)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chartSolder)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chartLine)).BeginInit();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picVideo)).BeginInit();
this.SuspendLayout();
//
// timer
......@@ -118,7 +130,7 @@
this.groupBox3.Controls.Add(this.lblRobot);
this.groupBox3.Location = new System.Drawing.Point(16, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(1240, 67);
this.groupBox3.Size = new System.Drawing.Size(1344, 67);
this.groupBox3.TabIndex = 272;
this.groupBox3.TabStop = false;
//
......@@ -144,7 +156,7 @@
this.logBox.Location = new System.Drawing.Point(6, 38);
this.logBox.Name = "logBox";
this.logBox.ReadOnly = true;
this.logBox.Size = new System.Drawing.Size(1231, 24);
this.logBox.Size = new System.Drawing.Size(1335, 24);
this.logBox.TabIndex = 272;
this.logBox.Text = "";
//
......@@ -157,28 +169,40 @@
this.lblRobot.ForeColor = System.Drawing.Color.Green;
this.lblRobot.Location = new System.Drawing.Point(89, 13);
this.lblRobot.Name = "lblRobot";
this.lblRobot.Size = new System.Drawing.Size(771, 19);
this.lblRobot.Size = new System.Drawing.Size(875, 19);
this.lblRobot.TabIndex = 3;
this.lblRobot.Text = "未启动";
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.picAOI);
this.groupBox2.Controls.Add(this.button1);
this.groupBox2.Controls.Add(this.axCKVisionCtrl1);
this.groupBox2.Controls.Add(this.lblCodeResult);
this.groupBox2.Controls.Add(this.lblMesResult);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.lblAOIResult);
this.groupBox2.Location = new System.Drawing.Point(1155, 62);
this.groupBox2.Location = new System.Drawing.Point(1128, 62);
this.groupBox2.MaximumSize = new System.Drawing.Size(1000, 1000);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(99, 595);
this.groupBox2.Size = new System.Drawing.Size(232, 436);
this.groupBox2.TabIndex = 269;
this.groupBox2.TabStop = false;
//
// picAOI
//
this.picAOI.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.picAOI.BackColor = System.Drawing.SystemColors.HotTrack;
this.picAOI.Location = new System.Drawing.Point(4, 45);
this.picAOI.Name = "picAOI";
this.picAOI.Size = new System.Drawing.Size(224, 385);
this.picAOI.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picAOI.TabIndex = 308;
this.picAOI.TabStop = false;
//
// button1
//
this.button1.Location = new System.Drawing.Point(401, 14);
......@@ -190,25 +214,13 @@
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// axCKVisionCtrl1
//
this.axCKVisionCtrl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.axCKVisionCtrl1.Enabled = true;
this.axCKVisionCtrl1.Location = new System.Drawing.Point(4, 43);
this.axCKVisionCtrl1.Name = "axCKVisionCtrl1";
this.axCKVisionCtrl1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCKVisionCtrl1.OcxState")));
this.axCKVisionCtrl1.Size = new System.Drawing.Size(91, 548);
this.axCKVisionCtrl1.TabIndex = 306;
//
// lblCodeResult
//
this.lblCodeResult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblCodeResult.AutoSize = true;
this.lblCodeResult.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCodeResult.ForeColor = System.Drawing.Color.Blue;
this.lblCodeResult.Location = new System.Drawing.Point(183, 172);
this.lblCodeResult.Location = new System.Drawing.Point(140, 12);
this.lblCodeResult.Name = "lblCodeResult";
this.lblCodeResult.Size = new System.Drawing.Size(107, 25);
this.lblCodeResult.TabIndex = 305;
......@@ -233,7 +245,7 @@
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(4, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(134, 31);
this.label1.Size = new System.Drawing.Size(130, 31);
this.label1.TabIndex = 299;
this.label1.Text = "视觉检测";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -244,7 +256,7 @@
this.lblAOIResult.AutoSize = true;
this.lblAOIResult.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAOIResult.ForeColor = System.Drawing.Color.Blue;
this.lblAOIResult.Location = new System.Drawing.Point(183, 173);
this.lblAOIResult.Location = new System.Drawing.Point(183, 14);
this.lblAOIResult.Name = "lblAOIResult";
this.lblAOIResult.Size = new System.Drawing.Size(77, 25);
this.lblAOIResult.TabIndex = 301;
......@@ -261,9 +273,10 @@
this.groupBox1.Controls.Add(this.btnBack);
this.groupBox1.Controls.Add(this.btnStop);
this.groupBox1.Controls.Add(this.chbHigh);
this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Location = new System.Drawing.Point(17, 657);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1238, 77);
this.groupBox1.Size = new System.Drawing.Size(1332, 77);
this.groupBox1.TabIndex = 268;
this.groupBox1.TabStop = false;
//
......@@ -274,7 +287,7 @@
this.chbXunHuan.Checked = true;
this.chbXunHuan.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbXunHuan.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbXunHuan.Location = new System.Drawing.Point(423, 6);
this.chbXunHuan.Location = new System.Drawing.Point(517, 6);
this.chbXunHuan.Name = "chbXunHuan";
this.chbXunHuan.Size = new System.Drawing.Size(93, 25);
this.chbXunHuan.TabIndex = 315;
......@@ -302,7 +315,7 @@
this.panel2.Controls.Add(this.lblRobotWarnMsg);
this.panel2.Location = new System.Drawing.Point(518, 11);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(550, 59);
this.panel2.Size = new System.Drawing.Size(155, 59);
this.panel2.TabIndex = 270;
//
// lblRobotWarnMsg
......@@ -311,9 +324,9 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.lblRobotWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblRobotWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblRobotWarnMsg.Location = new System.Drawing.Point(4, 3);
this.lblRobotWarnMsg.Location = new System.Drawing.Point(5, 5);
this.lblRobotWarnMsg.Name = "lblRobotWarnMsg";
this.lblRobotWarnMsg.Size = new System.Drawing.Size(540, 51);
this.lblRobotWarnMsg.Size = new System.Drawing.Size(139, 51);
this.lblRobotWarnMsg.TabIndex = 4;
//
// btnStart
......@@ -331,7 +344,7 @@
//
this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(1080, 16);
this.btnBack.Location = new System.Drawing.Point(1174, 16);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(150, 52);
this.btnBack.TabIndex = 267;
......@@ -362,11 +375,22 @@
this.chbHigh.UseVisualStyleBackColor = true;
this.chbHigh.CheckedChanged += new System.EventHandler(this.chbHigh_CheckedChanged);
//
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.BackgroundImage = global::URSoldering.Client.Properties.Resources.smart_devices_logo03;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBox1.Location = new System.Drawing.Point(678, 13);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(432, 57);
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
//
// btnLook
//
this.btnLook.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLook.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLook.Location = new System.Drawing.Point(1007, 259);
this.btnLook.Location = new System.Drawing.Point(989, 259);
this.btnLook.Name = "btnLook";
this.btnLook.Size = new System.Drawing.Size(103, 52);
this.btnLook.TabIndex = 315;
......@@ -388,7 +412,7 @@
this.gbBoardInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbBoardInfo.Location = new System.Drawing.Point(16, 499);
this.gbBoardInfo.Name = "gbBoardInfo";
this.gbBoardInfo.Size = new System.Drawing.Size(1124, 158);
this.gbBoardInfo.Size = new System.Drawing.Size(1106, 158);
this.gbBoardInfo.TabIndex = 0;
this.gbBoardInfo.TabStop = false;
//
......@@ -402,7 +426,7 @@
this.listPoint.GridLines = true;
this.listPoint.Location = new System.Drawing.Point(3, 44);
this.listPoint.Name = "listPoint";
this.listPoint.Size = new System.Drawing.Size(1118, 108);
this.listPoint.Size = new System.Drawing.Size(1100, 108);
this.listPoint.TabIndex = 314;
this.listPoint.UseCompatibleStateImageBehavior = false;
this.listPoint.View = System.Windows.Forms.View.Details;
......@@ -410,7 +434,7 @@
// btnAoiTest
//
this.btnAoiTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAoiTest.Location = new System.Drawing.Point(1015, 231);
this.btnAoiTest.Location = new System.Drawing.Point(997, 231);
this.btnAoiTest.Name = "btnAoiTest";
this.btnAoiTest.Size = new System.Drawing.Size(100, 40);
this.btnAoiTest.TabIndex = 294;
......@@ -422,7 +446,7 @@
//
this.btnBlow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBlow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBlow.Location = new System.Drawing.Point(1016, 273);
this.btnBlow.Location = new System.Drawing.Point(998, 273);
this.btnBlow.Name = "btnBlow";
this.btnBlow.Size = new System.Drawing.Size(100, 40);
this.btnBlow.TabIndex = 313;
......@@ -449,7 +473,7 @@
this.panel1.Controls.Add(this.lblMsg);
this.panel1.Location = new System.Drawing.Point(138, 11);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(983, 30);
this.panel1.Size = new System.Drawing.Size(965, 30);
this.panel1.TabIndex = 269;
//
// lblMsg
......@@ -466,7 +490,7 @@
// btnSendWireRecover
//
this.btnSendWireRecover.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSendWireRecover.Location = new System.Drawing.Point(1015, 182);
this.btnSendWireRecover.Location = new System.Drawing.Point(997, 182);
this.btnSendWireRecover.Name = "btnSendWireRecover";
this.btnSendWireRecover.Size = new System.Drawing.Size(100, 40);
this.btnSendWireRecover.TabIndex = 271;
......@@ -482,7 +506,7 @@
this.groupBox4.Controls.Add(this.label7);
this.groupBox4.Location = new System.Drawing.Point(16, 76);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(1124, 428);
this.groupBox4.Size = new System.Drawing.Size(1106, 428);
this.groupBox4.TabIndex = 317;
this.groupBox4.TabStop = false;
//
......@@ -511,7 +535,7 @@
this.panel3.Controls.Add(this.chartLine);
this.panel3.Location = new System.Drawing.Point(1, -4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1121, 426);
this.panel3.Size = new System.Drawing.Size(1103, 426);
this.panel3.TabIndex = 5;
//
// btnChange
......@@ -640,25 +664,25 @@
//
this.chartPersent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
chartArea7.Name = "ChartArea1";
this.chartPersent.ChartAreas.Add(chartArea7);
legend7.Name = "Legend1";
this.chartPersent.Legends.Add(legend7);
chartArea1.Name = "ChartArea1";
this.chartPersent.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chartPersent.Legends.Add(legend1);
this.chartPersent.Location = new System.Drawing.Point(8, 227);
this.chartPersent.Name = "chartPersent";
this.chartPersent.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.Bright;
series7.ChartArea = "ChartArea1";
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
series7.IsValueShownAsLabel = true;
series7.Legend = "Legend1";
series7.Name = "Series1";
dataPoint5.Label = "合格";
dataPoint5.MarkerColor = System.Drawing.Color.DarkGreen;
dataPoint6.Label = "不合格";
dataPoint6.MarkerColor = System.Drawing.Color.Red;
series7.Points.Add(dataPoint5);
series7.Points.Add(dataPoint6);
this.chartPersent.Series.Add(series7);
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
series1.IsValueShownAsLabel = true;
series1.Legend = "Legend1";
series1.Name = "Series1";
dataPoint1.Label = "合格";
dataPoint1.MarkerColor = System.Drawing.Color.DarkGreen;
dataPoint2.Label = "不合格";
dataPoint2.MarkerColor = System.Drawing.Color.Red;
series1.Points.Add(dataPoint1);
series1.Points.Add(dataPoint2);
this.chartPersent.Series.Add(series1);
this.chartPersent.Size = new System.Drawing.Size(286, 187);
this.chartPersent.TabIndex = 303;
this.chartPersent.Text = "烙铁头工作统计:";
......@@ -679,18 +703,18 @@
//
this.chartSolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
chartArea8.Name = "ChartArea1";
this.chartSolder.ChartAreas.Add(chartArea8);
legend8.Name = "Legend1";
this.chartSolder.Legends.Add(legend8);
chartArea2.Name = "ChartArea1";
this.chartSolder.ChartAreas.Add(chartArea2);
legend2.Name = "Legend1";
this.chartSolder.Legends.Add(legend2);
this.chartSolder.Location = new System.Drawing.Point(270, 4);
this.chartSolder.Name = "chartSolder";
series8.ChartArea = "ChartArea1";
series8.IsXValueIndexed = true;
series8.Legend = "Legend1";
series8.Name = "烙铁头统计";
this.chartSolder.Series.Add(series8);
this.chartSolder.Size = new System.Drawing.Size(847, 206);
series2.ChartArea = "ChartArea1";
series2.IsXValueIndexed = true;
series2.Legend = "Legend1";
series2.Name = "烙铁头统计";
this.chartSolder.Series.Add(series2);
this.chartSolder.Size = new System.Drawing.Size(829, 206);
this.chartSolder.TabIndex = 308;
this.chartSolder.Text = "烙铁头工作统计:";
//
......@@ -698,19 +722,19 @@
//
this.chartLine.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
chartArea9.Name = "ChartArea1";
this.chartLine.ChartAreas.Add(chartArea9);
legend9.Name = "Legend1";
this.chartLine.Legends.Add(legend9);
chartArea3.Name = "ChartArea1";
this.chartLine.ChartAreas.Add(chartArea3);
legend3.Name = "Legend1";
this.chartLine.Legends.Add(legend3);
this.chartLine.Location = new System.Drawing.Point(270, 212);
this.chartLine.Name = "chartLine";
this.chartLine.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.EarthTones;
series9.ChartArea = "ChartArea1";
series9.IsXValueIndexed = true;
series9.Legend = "Legend1";
series9.Name = "工作量统计";
this.chartLine.Series.Add(series9);
this.chartLine.Size = new System.Drawing.Size(847, 206);
series3.ChartArea = "ChartArea1";
series3.IsXValueIndexed = true;
series3.Legend = "Legend1";
series3.Name = "工作量统计";
this.chartLine.Series.Add(series3);
this.chartLine.Size = new System.Drawing.Size(829, 206);
this.chartLine.TabIndex = 302;
this.chartLine.Text = "烙铁头工作统计:";
//
......@@ -723,12 +747,126 @@
this.label7.TabIndex = 306;
this.label7.Text = "焊接合格率";
//
// groupBox5
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnStopVideo);
this.groupBox5.Controls.Add(this.btnStartVideo);
this.groupBox5.Controls.Add(this.picVideo);
this.groupBox5.Controls.Add(this.button2);
this.groupBox5.Controls.Add(this.label4);
this.groupBox5.Controls.Add(this.label12);
this.groupBox5.Controls.Add(this.label13);
this.groupBox5.Controls.Add(this.label14);
this.groupBox5.Location = new System.Drawing.Point(1128, 499);
this.groupBox5.MaximumSize = new System.Drawing.Size(1000, 1000);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(232, 158);
this.groupBox5.TabIndex = 318;
this.groupBox5.TabStop = false;
//
// btnStopVideo
//
this.btnStopVideo.FlatAppearance.BorderSize = 0;
this.btnStopVideo.Location = new System.Drawing.Point(208, 10);
this.btnStopVideo.Name = "btnStopVideo";
this.btnStopVideo.Size = new System.Drawing.Size(65, 31);
this.btnStopVideo.TabIndex = 310;
this.btnStopVideo.Text = "停止";
this.btnStopVideo.UseVisualStyleBackColor = true;
this.btnStopVideo.Click += new System.EventHandler(this.btnStopVideo_Click);
//
// btnStartVideo
//
this.btnStartVideo.FlatAppearance.BorderSize = 0;
this.btnStartVideo.Location = new System.Drawing.Point(137, 10);
this.btnStartVideo.Name = "btnStartVideo";
this.btnStartVideo.Size = new System.Drawing.Size(65, 31);
this.btnStartVideo.TabIndex = 309;
this.btnStartVideo.Text = "启动";
this.btnStartVideo.UseVisualStyleBackColor = true;
this.btnStartVideo.Click += new System.EventHandler(this.btnStartVideo_Click);
//
// picVideo
//
this.picVideo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.picVideo.BackColor = System.Drawing.SystemColors.Desktop;
this.picVideo.Location = new System.Drawing.Point(4, 45);
this.picVideo.Name = "picVideo";
this.picVideo.Size = new System.Drawing.Size(224, 107);
this.picVideo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picVideo.TabIndex = 308;
this.picVideo.TabStop = false;
//
// button2
//
this.button2.Location = new System.Drawing.Point(401, 14);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(79, 26);
this.button2.TabIndex = 307;
this.button2.Text = "AOI检测";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.Blue;
this.label4.Location = new System.Drawing.Point(183, -265);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(107, 25);
this.label4.TabIndex = 305;
this.label4.Text = "扫码成功:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label12
//
this.label12.BackColor = System.Drawing.SystemColors.Control;
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.ForeColor = System.Drawing.Color.Red;
this.label12.Location = new System.Drawing.Point(299, 111);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(85, 51);
this.label12.TabIndex = 303;
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label13
//
this.label13.BackColor = System.Drawing.Color.MediumBlue;
this.label13.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.ForeColor = System.Drawing.Color.White;
this.label13.Location = new System.Drawing.Point(4, 10);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(128, 31);
this.label13.TabIndex = 299;
this.label13.Text = "实时视频";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label14
//
this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ForeColor = System.Drawing.Color.Blue;
this.label14.Location = new System.Drawing.Point(183, -264);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(77, 25);
this.label14.TabIndex = 301;
this.label14.Text = "检测OK";
//
// FrmWork
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(1276, 741);
this.ClientSize = new System.Drawing.Size(1370, 741);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.gbBoardInfo);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
......@@ -744,10 +882,11 @@
this.groupBox3.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.axCKVisionCtrl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picAOI)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.gbBoardInfo.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
......@@ -758,6 +897,9 @@
((System.ComponentModel.ISupportInitialize)(this.chartPersent)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.chartSolder)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.chartLine)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picVideo)).EndInit();
this.ResumeLayout(false);
}
......@@ -790,7 +932,6 @@
private System.Windows.Forms.CheckBox chbXunHuan;
private System.Windows.Forms.Button btnBlow;
private System.Windows.Forms.Label lblCodeResult;
private AxCKVisionCtrlLib.AxCKVisionCtrl axCKVisionCtrl1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox4;
......@@ -814,5 +955,16 @@
private System.Windows.Forms.Label lblProName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnWeld;
private System.Windows.Forms.PictureBox picAOI;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.PictureBox picVideo;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button btnStopVideo;
private System.Windows.Forms.Button btnStartVideo;
}
}
\ No newline at end of file
......@@ -19,6 +19,8 @@ namespace URSoldering.Client
{
public partial class FrmWork : FrmBase
{
private PylonCamera camera = new PylonCamera();
private System.Timers.Timer VideoTimer = new System.Timers.Timer();
//private static string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName);
private URSolderingRobot Robot = null;
public FrmWork()
......@@ -64,37 +66,46 @@ namespace URSoldering.Client
btnStop.Enabled = false;
Robot.IsAutoRun = chbXunHuan.Checked;
LoadAOI();
VideoTimer = new System.Timers.Timer();
VideoTimer.Enabled = false;
VideoTimer.AutoReset = true;
VideoTimer.Interval = 300;
VideoTimer.Elapsed += VideoTimer_Elapsed;
}
private bool IsLoad = false;
private void LoadAOI()
{
if (IsLoad)
{
return;
}
//位置配置到文件中
string appPath = Application.StartupPath;
string strFilePathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string path2 = Path.GetDirectoryName(appPath + strFilePathName);
string filePath = path2 + @"\" + BoardManager.CurrBoard.AoiFileName;
if (File.Exists(filePath))
{
try
{
axCKVisionCtrl1.LoadConfigure(filePath);
axCKVisionCtrl1.ZoomView(2);
LogUtil.error("成功加载程序:" + BoardManager.CurrBoard.AoiFileName);
IsLoad = true;
}
catch (Exception ex)
{
LogUtil.error("加载程序【" + BoardManager.CurrBoard.AoiFileName + "】出错:" + ex.ToString());
}
}
else
{
LogUtil.error("未找到AOI程序文件:" + BoardManager.CurrBoard.AoiFileName);
}
//if (IsLoad)
//{
// return;
//}
////位置配置到文件中
//string appPath = Application.StartupPath;
//string strFilePathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
//string path2 = Path.GetDirectoryName(appPath + strFilePathName);
//string filePath = path2 + @"\" + BoardManager.CurrBoard.AoiFileName;
//if (File.Exists(filePath))
//{
// try
// {
// axCKVisionCtrl1.LoadConfigure(filePath);
// axCKVisionCtrl1.ZoomView(2);
// LogUtil.error("成功加载程序:" + BoardManager.CurrBoard.AoiFileName);
// IsLoad = true;
// }
// catch (Exception ex)
// {
// LogUtil.error("加载程序【" + BoardManager.CurrBoard.AoiFileName + "】出错:" + ex.ToString());
// }
//}
//else
//{
// LogUtil.error("未找到AOI程序文件:" + BoardManager.CurrBoard.AoiFileName);
//}
}
private int ShowPointIndex = 5;
private void LoadCountPoint(bool isToday)
......@@ -517,7 +528,8 @@ namespace URSoldering.Client
{
Robot.StopRun();
}
axCKVisionCtrl1.UnloadConfigure();
btnStopVideo_Click(null, null);
//axCKVisionCtrl1.UnloadConfigure();
}
private void btnStart_Click(object sender, EventArgs e)
......@@ -672,42 +684,43 @@ namespace URSoldering.Client
private bool RunAOI(int num)
{
try
{
axCKVisionCtrl1.Execute(num);
axCKVisionCtrl1.ZoomView(2);
axCKVisionCtrl1.Redraw();
Thread.Sleep(1000);
axCKVisionCtrl1.Execute(num);
axCKVisionCtrl1.ZoomView(2);
axCKVisionCtrl1.Redraw();
return true;
}
catch (Exception ex)
{
LogUtil.error("Error: Could not extcute proc. Original error: " + ex.Message);
return false;
}
//try
//{
// axCKVisionCtrl1.Execute(num);
// axCKVisionCtrl1.ZoomView(2);
// axCKVisionCtrl1.Redraw();
// Thread.Sleep(1000);
// axCKVisionCtrl1.Execute(num);
// axCKVisionCtrl1.ZoomView(2);
// axCKVisionCtrl1.Redraw();
// return true;
//}
//catch (Exception ex)
//{
// LogUtil.error("Error: Could not extcute proc. Original error: " + ex.Message);
// return false;
//}
return false;
}
private int CKResult(string name,int dataId)
{
string result = "";
try
{
int idTool = axCKVisionCtrl1.GetTool(name);
//try
//{
// int idTool = axCKVisionCtrl1.GetTool(name);
double value = 0.0;
object objValue = new VariantWrapper(value);
if (axCKVisionCtrl1.GetValue(idTool, dataId, 0, ref objValue) == true)
{
result = objValue.ToString();
}
LogUtil.info("获取【" + name + "】:" + result);
}
catch (Exception ex)
{
LogUtil.error("获取【" + name + "】出错:" + ex.ToString());
}
// double value = 0.0;
// object objValue = new VariantWrapper(value);
// if (axCKVisionCtrl1.GetValue(idTool, dataId, 0, ref objValue) == true)
// {
// result = objValue.ToString();
// }
// LogUtil.info("获取【" + name + "】:" + result);
//}
//catch (Exception ex)
//{
// LogUtil.error("获取【" + name + "】出错:" + ex.ToString());
//}
if (result.ToLower().Equals("true"))
{
......@@ -767,5 +780,56 @@ namespace URSoldering.Client
MessageBox.Show("焊接失败:" + msg);
}
}
private void btnStartVideo_Click(object sender, EventArgs e)
{
string[] nameStr= camera.GetName();
if (nameStr.Length > 0)
{
if (camera.Open(0))
{
VideoTimer.Start();
}
}
}
private void btnStopVideo_Click(object sender, EventArgs e)
{
if (VideoTimer.Enabled)
{
VideoTimer.Start();
camera.Close();
}
}
private bool IsInProcess = false;
private void VideoTimer_Elapsed(object sender, ElapsedEventArgs e)
{
if (IsInProcess)
{
return;
}
IsInProcess = true;
//int index = cmbCamera.SelectedIndex;
//if (index < 0)
//{
// MessageBox.Show("请先选择相机");
// return;
//}
//camera.Open(index);
try
{
Bitmap bit = camera.syncShot();
if (bit != null)
{
this.picVideo.Image = bit;
}
}catch(Exception ex)
{
LogUtil.error(ex.ToString());
}
IsInProcess = false;
///*camera*/.Close();
}
}
}
......@@ -120,14 +120,6 @@
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="axCKVisionCtrl1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAaAkAAKM4AAAAAAAACw==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>38</value>
</metadata>
......
......@@ -63,6 +63,16 @@ namespace URSoldering.Client.Properties {
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap smart_devices_logo03 {
get {
object obj = ResourceManager.GetObject("smart devices logo03", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap TE048_311000 {
get {
object obj = ResourceManager.GetObject("TE048-311000", resourceCulture);
......@@ -79,5 +89,15 @@ namespace URSoldering.Client.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 锐驰科技 {
get {
object obj = ResourceManager.GetObject("锐驰科技", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
......@@ -112,17 +112,22 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TE048-311000" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TE048-311000.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="锐驰科技" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\锐驰科技.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TE075-022030" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TE075-022030.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TE048-311000" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TE048-311000.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="smart devices logo03" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\image\smart devices logo03.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
......@@ -73,12 +73,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FrmAOISetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAOISetting.designer.cs">
<DependentUpon>FrmAOISetting.cs</DependentUpon>
</Compile>
<Compile Include="FrmBase.cs">
<SubType>Form</SubType>
</Compile>
......@@ -177,9 +171,6 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmAOISetting.resx">
<DependentUpon>FrmAOISetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource>
......@@ -278,23 +269,6 @@
<None Include="Resources\TE075-022030.jpg" />
</ItemGroup>
<ItemGroup>
<COMReference Include="AxCKVisionCtrlLib">
<Guid>{6649CE3E-A124-4D88-A05C-75D91DBE4F14}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>aximp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
<COMReference Include="CKVisionCtrlLib">
<Guid>{6649CE3E-A124-4D88-A05C-75D91DBE4F14}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
......@@ -306,6 +280,8 @@
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="image\锐驰科技.png" />
<None Include="image\smart devices logo03.png" />
<Content Include="robot.ico" />
<Content Include="记录.txt" />
</ItemGroup>
......
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!