Files
SeikoGluing/精工涂胶检测项目/精工涂胶检测项目/LinDeVisionTask.ResultsDisplay.cs

227 lines
12 KiB
C#

// 警告:某些程序集引用无法自动解析。这可能会导致某些部分反编译错误,
// 例如属性 getter/setter 访问。要获得最佳反编译结果,请手动将缺少的引用添加到加载的程序集列表中。
// LinDeVisionTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// LinDeVisionTask.ResultsDisplay
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using Cognex.VisionPro;
using Cognex.VisionPro3D;
using ConVX.VXControl;
public class ResultsDisplay : UserControl
{
private Cog3DDisplayV2 cog3DDisplayV21;
private IContainer components = null;
private VXCircleLEDLight led_CurrentState;
private VXCircleLabel vxCircleLabel8;
private VXCircleLabel lbl_Result;
private Panel panel1;
private TableLayoutPanel tableLayoutPanel1;
private VXCircleLEDLight led_CurrentError;
private VXGroupBox groupBox1;
private ElementHost elementHost1;
public ResultsDisplay()
{
InitializeComponent();
cog3DDisplayV21 = new Cog3DDisplayV2();
cog3DDisplayV21.BackColor = Color.FromArgb(95, 95, 95);
elementHost1.Child = (UIElement)(object)cog3DDisplayV21;
DisplayData(Color.Gray, Color.Gray, "失败");
}
public void DisplayData(Color connectColor, Color statColor, string result)
{
if (base.InvokeRequired)
{
BeginInvoke((Action)delegate
{
DisplayData(connectColor, statColor, result);
});
}
else
{
((Control)(object)lbl_Result).Text = result.ToString();
led_CurrentState.LedColor = connectColor;
led_CurrentError.LedColor = statColor;
}
}
public void Display3DImage(Cog3DBox box, CogImage16Range TrainImage, CogImage16Range image)
{
if (base.InvokeRequired)
{
BeginInvoke((Action)delegate
{
Display3DImage(box, TrainImage, image);
});
return;
}
cog3DDisplayV21.Clear();
Cog3DBoxGraphic cog3DBoxGraphic = new Cog3DBoxGraphic(box);
cog3DBoxGraphic.Opacity = 0.5;
cog3DBoxGraphic.Color = CogColorConstants.Cyan;
cog3DBoxGraphic.DisplayState = Cog3DGraphicDisplayStateConstants.SurfaceWithWireFrame;
Cog3DRangeImageGraphic cog3DRangeImageGraphic = new Cog3DRangeImageGraphic(TrainImage);
cog3DRangeImageGraphic.Color = CogColorConstants.Green;
Cog3DRangeImageGraphic item = new Cog3DRangeImageGraphic(image);
cog3DDisplayV21.Add(item);
cog3DDisplayV21.Add(cog3DRangeImageGraphic);
cog3DDisplayV21.Add(cog3DBoxGraphic, cog3DRangeImageGraphic);
cog3DDisplayV21.BackColor = Color.FromArgb(95, 95, 95);
cog3DDisplayV21.FitView();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Expected O, but got Unknown
this.components = new System.ComponentModel.Container();
this.led_CurrentState = new VXCircleLEDLight();
this.vxCircleLabel8 = new VXCircleLabel();
this.lbl_Result = new VXCircleLabel();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox1 = new VXGroupBox(this.components);
this.elementHost1 = new System.Windows.Forms.Integration.ElementHost();
this.led_CurrentError = new VXCircleLEDLight();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.Windows.Forms.Control)(object)this.groupBox1).SuspendLayout();
base.SuspendLayout();
((System.Windows.Forms.Control)(object)this.led_CurrentState).Anchor = System.Windows.Forms.AnchorStyles.None;
((System.Windows.Forms.Control)(object)this.led_CurrentState).BackColor = System.Drawing.Color.FromArgb(52, 52, 52);
this.led_CurrentState.BorderWidth = 3;
this.led_CurrentState.FillText = "连接状态";
((System.Windows.Forms.Control)(object)this.led_CurrentState).Font = new System.Drawing.Font("微软雅黑", 12f);
this.led_CurrentState.LedColor = System.Drawing.Color.Gray;
((System.Windows.Forms.Control)(object)this.led_CurrentState).Location = new System.Drawing.Point(15, 4);
((System.Windows.Forms.Control)(object)this.led_CurrentState).Name = "led_CurrentState";
((System.Windows.Forms.Control)(object)this.led_CurrentState).Size = new System.Drawing.Size(111, 30);
((System.Windows.Forms.Control)(object)this.led_CurrentState).TabIndex = 38;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).BackColor = System.Drawing.Color.Transparent;
this.vxCircleLabel8.BgColor = System.Drawing.Color.FromArgb(52, 52, 52);
this.vxCircleLabel8.BorderColor = System.Drawing.Color.Gray;
this.vxCircleLabel8.BorderWidth = 0;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Dock = System.Windows.Forms.DockStyle.Left;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Font = new System.Drawing.Font("微软雅黑", 12f);
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).ForeColor = System.Drawing.Color.White;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Location = new System.Drawing.Point(3, 78);
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Name = "vxCircleLabel8";
this.vxCircleLabel8.Radius = 5;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Size = new System.Drawing.Size(136, 39);
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).TabIndex = 41;
((System.Windows.Forms.Control)(object)this.vxCircleLabel8).Text = "检测结果:";
((System.Windows.Forms.Label)(object)this.vxCircleLabel8).TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
((System.Windows.Forms.Control)(object)this.lbl_Result).Anchor = System.Windows.Forms.AnchorStyles.Left;
((System.Windows.Forms.Control)(object)this.lbl_Result).BackColor = System.Drawing.Color.Transparent;
this.lbl_Result.BgColor = System.Drawing.Color.FromArgb(52, 52, 52);
this.lbl_Result.BorderColor = System.Drawing.Color.Gray;
this.lbl_Result.BorderWidth = 1;
((System.Windows.Forms.Control)(object)this.lbl_Result).Font = new System.Drawing.Font("微软雅黑", 12f);
((System.Windows.Forms.Control)(object)this.lbl_Result).ForeColor = System.Drawing.Color.White;
((System.Windows.Forms.Control)(object)this.lbl_Result).Location = new System.Drawing.Point(145, 83);
((System.Windows.Forms.Control)(object)this.lbl_Result).Name = "lbl_Result";
this.lbl_Result.Radius = 5;
((System.Windows.Forms.Control)(object)this.lbl_Result).Size = new System.Drawing.Size(106, 29);
((System.Windows.Forms.Control)(object)this.lbl_Result).TabIndex = 42;
((System.Windows.Forms.Label)(object)this.lbl_Result).TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(3, 585);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(592, 196);
this.panel1.TabIndex = 7;
this.tableLayoutPanel1.ColumnCount = 4;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 23.90572f));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.92593f));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25f));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25f));
this.tableLayoutPanel1.Controls.Add((System.Windows.Forms.Control)(object)this.led_CurrentError, 1, 0);
this.tableLayoutPanel1.Controls.Add((System.Windows.Forms.Control)(object)this.led_CurrentState, 0, 0);
this.tableLayoutPanel1.Controls.Add((System.Windows.Forms.Control)(object)this.lbl_Result, 1, 2);
this.tableLayoutPanel1.Controls.Add((System.Windows.Forms.Control)(object)this.vxCircleLabel8, 0, 2);
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20f));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20f));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20f));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20f));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20f));
this.tableLayoutPanel1.Size = new System.Drawing.Size(594, 196);
this.tableLayoutPanel1.TabIndex = 43;
((System.Windows.Forms.Control)(object)this.groupBox1).BackColor = System.Drawing.Color.FromArgb(52, 52, 52);
this.groupBox1.BorderColor = System.Drawing.Color.FromArgb(64, 64, 64);
((System.Windows.Forms.Control)(object)this.groupBox1).Controls.Add(this.elementHost1);
((System.Windows.Forms.Control)(object)this.groupBox1).Controls.Add(this.panel1);
((System.Windows.Forms.Control)(object)this.groupBox1).Dock = System.Windows.Forms.DockStyle.Fill;
((System.Windows.Forms.GroupBox)(object)this.groupBox1).FlatStyle = System.Windows.Forms.FlatStyle.Flat;
((System.Windows.Forms.Control)(object)this.groupBox1).Font = new System.Drawing.Font("微软雅黑", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
((System.Windows.Forms.Control)(object)this.groupBox1).ForeColor = System.Drawing.Color.White;
((System.Windows.Forms.Control)(object)this.groupBox1).Location = new System.Drawing.Point(0, 0);
((System.Windows.Forms.Control)(object)this.groupBox1).Name = "groupBox1";
((System.Windows.Forms.Control)(object)this.groupBox1).Size = new System.Drawing.Size(598, 784);
((System.Windows.Forms.Control)(object)this.groupBox1).TabIndex = 6;
((System.Windows.Forms.GroupBox)(object)this.groupBox1).TabStop = false;
((System.Windows.Forms.Control)(object)this.groupBox1).Text = "3D型号区分";
this.elementHost1.Dock = System.Windows.Forms.DockStyle.Fill;
this.elementHost1.Location = new System.Drawing.Point(3, 35);
this.elementHost1.Name = "elementHost1";
this.elementHost1.Size = new System.Drawing.Size(592, 550);
this.elementHost1.TabIndex = 5;
this.elementHost1.Text = "elementHost1";
this.elementHost1.Child = null;
((System.Windows.Forms.Control)(object)this.led_CurrentError).Anchor = System.Windows.Forms.AnchorStyles.None;
((System.Windows.Forms.Control)(object)this.led_CurrentError).BackColor = System.Drawing.Color.FromArgb(52, 52, 52);
this.led_CurrentError.BorderWidth = 3;
this.led_CurrentError.FillText = "测量状态";
((System.Windows.Forms.Control)(object)this.led_CurrentError).Font = new System.Drawing.Font("微软雅黑", 12f);
this.led_CurrentError.LedColor = System.Drawing.Color.Gray;
((System.Windows.Forms.Control)(object)this.led_CurrentError).Location = new System.Drawing.Point(163, 4);
((System.Windows.Forms.Control)(object)this.led_CurrentError).Name = "led_CurrentError";
((System.Windows.Forms.Control)(object)this.led_CurrentError).Size = new System.Drawing.Size(111, 30);
((System.Windows.Forms.Control)(object)this.led_CurrentError).TabIndex = 39;
base.AutoScaleDimensions = new System.Drawing.SizeF(9f, 18f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.Controls.Add((System.Windows.Forms.Control)(object)this.groupBox1);
base.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
base.Name = "ResultsDisplay";
base.Size = new System.Drawing.Size(598, 784);
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
((System.Windows.Forms.Control)(object)this.groupBox1).ResumeLayout(false);
base.ResumeLayout(false);
}
}