Commit bc94711e LN

点料未找到PN所属元器件时直接NG

1 个父辈 dc07c277
正在显示 26 个修改的文件 包含 1327 行增加280 行删除
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AccImageBox">
<HintPath>..\..\..\..\..\TSAV-智能组装机\Line-Smart-Workstation\dll\AccImageBox.dll</HintPath>
</Reference>
<Reference Include="Asa.CarerayImage, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.CarerayImage, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath> <HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath>
...@@ -119,6 +122,12 @@ ...@@ -119,6 +122,12 @@
<Compile Include="FrmAnalyze.Designer.cs"> <Compile Include="FrmAnalyze.Designer.cs">
<DependentUpon>FrmAnalyze.cs</DependentUpon> <DependentUpon>FrmAnalyze.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmLearning.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmLearning.Designer.cs">
<DependentUpon>FrmLearning.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisMoveControl.cs"> <Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -182,6 +191,9 @@ ...@@ -182,6 +191,9 @@
<EmbeddedResource Include="FrmAnalyze.resx"> <EmbeddedResource Include="FrmAnalyze.resx">
<DependentUpon>FrmAnalyze.cs</DependentUpon> <DependentUpon>FrmAnalyze.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmLearning.resx">
<DependentUpon>FrmLearning.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
namespace OnlineStore.AutoCountClient
{
partial class FrmLearning
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblCurrTray = new System.Windows.Forms.Label();
this.lblPnInfo = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.imgCurrImg = new Acc.ImageBox.ImageBox();
this.imageBox1 = new Acc.ImageBox.ImageBox();
this.btnTest = new System.Windows.Forms.Button();
this.imageBox2 = new Acc.ImageBox.ImageBox();
this.imageBox3 = new Acc.ImageBox.ImageBox();
this.imageBox4 = new Acc.ImageBox.ImageBox();
this.imageBox5 = new Acc.ImageBox.ImageBox();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.radioButton5 = new System.Windows.Forms.RadioButton();
this.radioButton0 = new System.Windows.Forms.RadioButton();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.imageBox0 = new Acc.ImageBox.ImageBox();
this.btnSaveParam = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.imgCurrImg);
this.groupBox1.Controls.Add(this.lblPnInfo);
this.groupBox1.Controls.Add(this.lblCurrTray);
this.groupBox1.Controls.Add(this.btnTest);
this.groupBox1.Location = new System.Drawing.Point(6, 5);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(588, 495);
this.groupBox1.TabIndex = 198;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "料盘实时图片";
//
// lblCurrTray
//
this.lblCurrTray.AutoSize = true;
this.lblCurrTray.Location = new System.Drawing.Point(6, 411);
this.lblCurrTray.Name = "lblCurrTray";
this.lblCurrTray.Size = new System.Drawing.Size(79, 20);
this.lblCurrTray.TabIndex = 286;
this.lblCurrTray.Text = "料盘信息:";
//
// lblPnInfo
//
this.lblPnInfo.AutoSize = true;
this.lblPnInfo.Location = new System.Drawing.Point(320, 411);
this.lblPnInfo.Name = "lblPnInfo";
this.lblPnInfo.Size = new System.Drawing.Size(71, 20);
this.lblPnInfo.TabIndex = 287;
this.lblPnInfo.Text = "料盘PN:";
//
// 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.Controls.Add(this.imageBox0);
this.groupBox2.Controls.Add(this.imageBox5);
this.groupBox2.Controls.Add(this.imageBox4);
this.groupBox2.Controls.Add(this.imageBox3);
this.groupBox2.Controls.Add(this.imageBox2);
this.groupBox2.Controls.Add(this.imageBox1);
this.groupBox2.Location = new System.Drawing.Point(600, 5);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(590, 495);
this.groupBox2.TabIndex = 199;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "元器件种类图";
//
// imgCurrImg
//
this.imgCurrImg.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.imgCurrImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imgCurrImg.Location = new System.Drawing.Point(6, 21);
this.imgCurrImg.Name = "imgCurrImg";
this.imgCurrImg.Size = new System.Drawing.Size(576, 387);
this.imgCurrImg.TabIndex = 288;
this.imgCurrImg.Text = "料盘实时图片";
//
// imageBox1
//
this.imageBox1.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.imageBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox1.Location = new System.Drawing.Point(8, 21);
this.imageBox1.Name = "imageBox1";
this.imageBox1.Size = new System.Drawing.Size(578, 468);
this.imageBox1.TabIndex = 289;
this.imageBox1.Text = "小器件";
//
// btnTest
//
this.btnTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnTest.BackColor = System.Drawing.Color.White;
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTest.Location = new System.Drawing.Point(6, 449);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(576, 40);
this.btnTest.TabIndex = 285;
this.btnTest.Text = "点料测试";
this.btnTest.UseVisualStyleBackColor = false;
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
//
// imageBox2
//
this.imageBox2.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.imageBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox2.Location = new System.Drawing.Point(8, 21);
this.imageBox2.Name = "imageBox2";
this.imageBox2.Size = new System.Drawing.Size(578, 468);
this.imageBox2.TabIndex = 290;
this.imageBox2.Text = "大器件";
//
// imageBox3
//
this.imageBox3.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.imageBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox3.Location = new System.Drawing.Point(8, 21);
this.imageBox3.Name = "imageBox3";
this.imageBox3.Size = new System.Drawing.Size(578, 468);
this.imageBox3.TabIndex = 291;
this.imageBox3.Text = "imageBox3";
//
// imageBox4
//
this.imageBox4.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.imageBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox4.Location = new System.Drawing.Point(8, 21);
this.imageBox4.Name = "imageBox4";
this.imageBox4.Size = new System.Drawing.Size(578, 468);
this.imageBox4.TabIndex = 292;
this.imageBox4.Text = "异性三角大器件";
//
// imageBox5
//
this.imageBox5.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.imageBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox5.Location = new System.Drawing.Point(8, 21);
this.imageBox5.Name = "imageBox5";
this.imageBox5.Size = new System.Drawing.Size(578, 468);
this.imageBox5.TabIndex = 293;
this.imageBox5.Text = "异性长条形器件";
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton1.Location = new System.Drawing.Point(47, 88);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(62, 21);
this.radioButton1.TabIndex = 200;
this.radioButton1.Text = "小器件";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton2.Location = new System.Drawing.Point(187, 88);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(62, 21);
this.radioButton2.TabIndex = 201;
this.radioButton2.Text = "大器件";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton3
//
this.radioButton3.AutoSize = true;
this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton3.Location = new System.Drawing.Point(327, 88);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(98, 21);
this.radioButton3.TabIndex = 202;
this.radioButton3.Text = "异形三角器件";
this.radioButton3.UseVisualStyleBackColor = true;
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
//
// radioButton4
//
this.radioButton4.AutoSize = true;
this.radioButton4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton4.Location = new System.Drawing.Point(467, 88);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(110, 21);
this.radioButton4.TabIndex = 203;
this.radioButton4.Text = "异形三脚大器件";
this.radioButton4.UseVisualStyleBackColor = true;
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
//
// radioButton5
//
this.radioButton5.AutoSize = true;
this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton5.Location = new System.Drawing.Point(607, 88);
this.radioButton5.Name = "radioButton5";
this.radioButton5.Size = new System.Drawing.Size(110, 21);
this.radioButton5.TabIndex = 204;
this.radioButton5.Text = "异形长条形器件";
this.radioButton5.UseVisualStyleBackColor = true;
this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
//
// radioButton0
//
this.radioButton0.AutoSize = true;
this.radioButton0.Checked = true;
this.radioButton0.Location = new System.Drawing.Point(776, 47);
this.radioButton0.Name = "radioButton0";
this.radioButton0.Size = new System.Drawing.Size(125, 24);
this.radioButton0.TabIndex = 205;
this.radioButton0.TabStop = true;
this.radioButton0.Text = "未找到器件类型";
this.radioButton0.UseVisualStyleBackColor = true;
this.radioButton0.CheckedChanged += new System.EventHandler(this.radioButton0_CheckedChanged);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.pictureBox5);
this.groupBox3.Controls.Add(this.pictureBox4);
this.groupBox3.Controls.Add(this.pictureBox3);
this.groupBox3.Controls.Add(this.pictureBox2);
this.groupBox3.Controls.Add(this.pictureBox1);
this.groupBox3.Controls.Add(this.btnSaveParam);
this.groupBox3.Controls.Add(this.radioButton1);
this.groupBox3.Controls.Add(this.radioButton0);
this.groupBox3.Controls.Add(this.radioButton2);
this.groupBox3.Controls.Add(this.radioButton5);
this.groupBox3.Controls.Add(this.radioButton3);
this.groupBox3.Controls.Add(this.radioButton4);
this.groupBox3.Location = new System.Drawing.Point(6, 502);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(1184, 116);
this.groupBox3.TabIndex = 206;
this.groupBox3.TabStop = false;
//
// imageBox0
//
this.imageBox0.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.imageBox0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imageBox0.Location = new System.Drawing.Point(8, 21);
this.imageBox0.Name = "imageBox0";
this.imageBox0.Size = new System.Drawing.Size(578, 468);
this.imageBox0.TabIndex = 294;
this.imageBox0.Text = "未找到器件类型";
//
// btnSaveParam
//
this.btnSaveParam.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveParam.BackColor = System.Drawing.Color.White;
this.btnSaveParam.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveParam.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveParam.Location = new System.Drawing.Point(999, 40);
this.btnSaveParam.Name = "btnSaveParam";
this.btnSaveParam.Size = new System.Drawing.Size(126, 40);
this.btnSaveParam.TabIndex = 286;
this.btnSaveParam.Text = "确认并保存";
this.btnSaveParam.UseVisualStyleBackColor = false;
//
// pictureBox1
//
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Location = new System.Drawing.Point(42, 15);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(134, 65);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 287;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox2
//
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox2.Location = new System.Drawing.Point(182, 15);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(134, 65);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 288;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
//
// pictureBox3
//
this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox3.Location = new System.Drawing.Point(322, 15);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(134, 65);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 289;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
//
// pictureBox4
//
this.pictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox4.Location = new System.Drawing.Point(462, 15);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(134, 65);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox4.TabIndex = 290;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click);
//
// pictureBox5
//
this.pictureBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox5.Location = new System.Drawing.Point(602, 15);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(134, 65);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox5.TabIndex = 291;
this.pictureBox5.TabStop = false;
this.pictureBox5.Click += new System.EventHandler(this.pictureBox5_Click);
//
// FrmLearning
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1196, 637);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FrmLearning";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "元器件种类学习";
this.Load += new System.EventHandler(this.FrmLearning_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblCurrTray;
private System.Windows.Forms.Label lblPnInfo;
private System.Windows.Forms.GroupBox groupBox2;
private Acc.ImageBox.ImageBox imgCurrImg;
private Acc.ImageBox.ImageBox imageBox1;
private System.Windows.Forms.Button btnTest;
private Acc.ImageBox.ImageBox imageBox5;
private Acc.ImageBox.ImageBox imageBox4;
private Acc.ImageBox.ImageBox imageBox3;
private Acc.ImageBox.ImageBox imageBox2;
private Acc.ImageBox.ImageBox imageBox0;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.RadioButton radioButton5;
private System.Windows.Forms.RadioButton radioButton0;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Button btnSaveParam;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
}
}
\ No newline at end of file \ No newline at end of file
using Acc.ImageBox;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.AutoCountClient
{
public partial class FrmLearning : Form
{
public FrmLearning()
{
InitializeComponent();
}
private ImageBox currShowBox = null;
private int CurrType = -1;
private bool IsCanSel = false;
private string CurrFullFileName = "";
private string CurrPN = "";
private void FrmLearning_Load(object sender, EventArgs e)
{
imageBox0.Image = XRayLearnManager.modelImg_0;
imageBox1.Image = XRayLearnManager.modelImg_1;
imageBox2.Image = XRayLearnManager.modelImg_2;
imageBox3.Image = XRayLearnManager.modelImg_3;
imageBox4.Image = XRayLearnManager.modelImg_4;
imageBox5.Image = XRayLearnManager.modelImg_5;
pictureBox1.Image = XRayLearnManager.smodelImg_1;
pictureBox2.Image = XRayLearnManager.smodelImg_2;
pictureBox3.Image = XRayLearnManager.smodelImg_3;
pictureBox4.Image = XRayLearnManager.smodelImg_4;
pictureBox5.Image = XRayLearnManager.smodelImg_5;
imageBox0.Text = "未找到元器件类型";
imageBox1.Text = "小器件";
imageBox2.Text = "大器件";
imageBox3.Text = "异形三角器件";
imageBox4.Text = "异形三脚大器件";
imageBox5.Text = "异形长条形器件";
ChangeImage(imageBox0);
}
public void UpdateCurrImg(string fullFName)
{
string testFile = Application.StartupPath + "\\XRAY\\model\\8D.03906.H11-R515232020062200253-20200812181219.png";
}
private void ChangeSelStatus(bool iscanSel)
{
this.IsCanSel = iscanSel;
ChangeImage(imageBox0, 0, "");
groupBox3.Visible = iscanSel;
}
private bool ChangeImage(ImageBox showImg, int type = 0, string text = "")
{
if (CurrType.Equals(type))
{
return true;
}
CurrType = type;
if (currShowBox == null)
{
imageBox0.Visible = false;
imageBox1.Visible = false;
imageBox2.Visible = false;
imageBox3.Visible = false;
imageBox4.Visible = false;
imageBox5.Visible = false;
}
else
{
currShowBox.Visible = false;
}
showImg.Visible = true;
currShowBox = showImg;
if (text.Equals(""))
{
btnTest.Visible = false;
}
else
{
btnTest.Text = "使用[" + text + "]模板点料测试";
btnTest.Visible = true;
}
return true;
}
private void btnTest_Click(object sender, EventArgs e)
{
int count = 1;
if (imgCurrImg.Image == null || String.IsNullOrEmpty(CurrFullFileName))
{
MessageBox.Show("未加载图片,无法点料");
return;
}
}
private void radioButton0_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox0, 0);
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox1, 1, radioButton1.Text);
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox2, 2, radioButton2.Text);
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox3, 3, radioButton3.Text);
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox4, 4, radioButton4.Text);
}
private void radioButton5_CheckedChanged(object sender, EventArgs e)
{
ChangeImage(imageBox5, 5, radioButton5.Text);
}
private void pictureBox1_Click(object sender, EventArgs e)
{
radioButton1.Checked = true;
}
private void pictureBox2_Click(object sender, EventArgs e)
{
radioButton2.Checked = true;
}
private void pictureBox3_Click(object sender, EventArgs e)
{
radioButton3.Checked = true;
}
private void pictureBox4_Click(object sender, EventArgs e)
{
radioButton4.Checked = true;
}
private void pictureBox5_Click(object sender, EventArgs e)
{
radioButton5.Checked = true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -32,19 +32,15 @@ ...@@ -32,19 +32,15 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRobotMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRobotMain));
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.panWork = new System.Windows.Forms.Panel();
this.listView1 = new System.Windows.Forms.ListView();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblCurrTray = new System.Windows.Forms.Label(); this.lblCurrTray = new System.Windows.Forms.Label();
this.lblOutTray = new System.Windows.Forms.Label(); this.lblOutTray = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.listView1 = new System.Windows.Forms.ListView();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chbOpenX = new System.Windows.Forms.CheckBox();
this.chbBuzzer = new System.Windows.Forms.CheckBox();
this.chbAGV = new System.Windows.Forms.CheckBox();
this.chbAutoRun = new System.Windows.Forms.CheckBox();
this.btnClearLog = new System.Windows.Forms.Button();
this.chkDebug = new System.Windows.Forms.CheckBox();
this.logBox = new System.Windows.Forms.RichTextBox(); this.logBox = new System.Windows.Forms.RichTextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.panLearn = new System.Windows.Forms.Panel();
this.lblStatus = new System.Windows.Forms.Label(); this.lblStatus = new System.Windows.Forms.Label();
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
...@@ -77,12 +73,26 @@ ...@@ -77,12 +73,26 @@
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.版本号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.版本号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.工作模式ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.正常工作模式ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.元器件学习模式ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.开机自动启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.启用X射线点料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aGVCancelStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.lblXrayWork = new System.Windows.Forms.Label(); this.lblXrayWork = new System.Windows.Forms.Label();
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.panWork.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -93,6 +103,7 @@ ...@@ -93,6 +103,7 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(8, 81); this.tabControl1.Location = new System.Drawing.Point(8, 81);
...@@ -105,10 +116,7 @@ ...@@ -105,10 +116,7 @@
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.panWork);
this.tabPage1.Controls.Add(this.listView1);
this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.logBox);
this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(1328, 609); this.tabPage1.Size = new System.Drawing.Size(1328, 609);
...@@ -116,6 +124,35 @@ ...@@ -116,6 +124,35 @@
this.tabPage1.Text = "状态信息"; this.tabPage1.Text = "状态信息";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// panWork
//
this.panWork.BackColor = System.Drawing.Color.Transparent;
this.panWork.Controls.Add(this.listView1);
this.panWork.Controls.Add(this.groupBox1);
this.panWork.Controls.Add(this.logBox);
this.panWork.Dock = System.Windows.Forms.DockStyle.Fill;
this.panWork.Location = new System.Drawing.Point(0, 0);
this.panWork.Name = "panWork";
this.panWork.Size = new System.Drawing.Size(1328, 609);
this.panWork.TabIndex = 198;
//
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.BackColor = System.Drawing.Color.White;
this.listView1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(3, 3);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(1322, 117);
this.listView1.TabIndex = 191;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// groupBox1 // groupBox1
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
...@@ -123,9 +160,9 @@ ...@@ -123,9 +160,9 @@
this.groupBox1.Controls.Add(this.lblCurrTray); this.groupBox1.Controls.Add(this.lblCurrTray);
this.groupBox1.Controls.Add(this.lblOutTray); this.groupBox1.Controls.Add(this.lblOutTray);
this.groupBox1.Controls.Add(this.pictureBox1); this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Location = new System.Drawing.Point(9, 130); this.groupBox1.Location = new System.Drawing.Point(3, 126);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(588, 476); this.groupBox1.Size = new System.Drawing.Size(596, 480);
this.groupBox1.TabIndex = 197; this.groupBox1.TabIndex = 197;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "点料效果图"; this.groupBox1.Text = "点料效果图";
...@@ -157,134 +194,43 @@ ...@@ -157,134 +194,43 @@
this.pictureBox1.BackColor = System.Drawing.Color.LightGray; this.pictureBox1.BackColor = System.Drawing.Color.LightGray;
this.pictureBox1.Location = new System.Drawing.Point(6, 85); this.pictureBox1.Location = new System.Drawing.Point(6, 85);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(576, 385); this.pictureBox1.Size = new System.Drawing.Size(584, 389);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 284; this.pictureBox1.TabIndex = 284;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
// //
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.BackColor = System.Drawing.Color.White;
this.listView1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(9, 7);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(984, 117);
this.listView1.TabIndex = 191;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.chbOpenX);
this.groupBox2.Controls.Add(this.chbBuzzer);
this.groupBox2.Controls.Add(this.chbAGV);
this.groupBox2.Controls.Add(this.chbAutoRun);
this.groupBox2.Controls.Add(this.btnClearLog);
this.groupBox2.Controls.Add(this.chkDebug);
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(999, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(321, 120);
this.groupBox2.TabIndex = 196;
this.groupBox2.TabStop = false;
//
// chbOpenX
//
this.chbOpenX.AutoSize = true;
this.chbOpenX.BackColor = System.Drawing.Color.Transparent;
this.chbOpenX.Checked = true;
this.chbOpenX.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbOpenX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbOpenX.Location = new System.Drawing.Point(188, 17);
this.chbOpenX.Name = "chbOpenX";
this.chbOpenX.Size = new System.Drawing.Size(121, 24);
this.chbOpenX.TabIndex = 199;
this.chbOpenX.Text = "启用X射线点料";
this.chbOpenX.UseVisualStyleBackColor = false;
this.chbOpenX.CheckedChanged += new System.EventHandler(this.chbOpenX_CheckedChanged);
//
// chbBuzzer
//
this.chbBuzzer.AutoSize = true;
this.chbBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbBuzzer.Location = new System.Drawing.Point(20, 45);
this.chbBuzzer.Name = "chbBuzzer";
this.chbBuzzer.Size = new System.Drawing.Size(98, 24);
this.chbBuzzer.TabIndex = 196;
this.chbBuzzer.Text = "启用蜂鸣器";
this.chbBuzzer.UseVisualStyleBackColor = true;
this.chbBuzzer.CheckedChanged += new System.EventHandler(this.chbBuzzer_CheckedChanged);
//
// chbAGV
//
this.chbAGV.AutoSize = true;
this.chbAGV.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAGV.Location = new System.Drawing.Point(20, 73);
this.chbAGV.Name = "chbAGV";
this.chbAGV.Size = new System.Drawing.Size(138, 24);
this.chbAGV.TabIndex = 198;
this.chbAGV.Text = "AGV cancelState";
this.chbAGV.UseVisualStyleBackColor = true;
this.chbAGV.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// chbAutoRun
//
this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRun.Location = new System.Drawing.Point(20, 17);
this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(112, 24);
this.chbAutoRun.TabIndex = 94;
this.chbAutoRun.Text = "开机自动启动";
this.chbAutoRun.UseVisualStyleBackColor = true;
this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged);
//
// btnClearLog
//
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(204, 68);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190;
this.btnClearLog.Text = "清空日志";
this.btnClearLog.UseVisualStyleBackColor = false;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
//
// chkDebug
//
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(243, 90);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(72, 24);
this.chkDebug.TabIndex = 194;
this.chkDebug.Text = "debug";
this.chkDebug.UseVisualStyleBackColor = true;
this.chkDebug.Visible = false;
//
// logBox // logBox
// //
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(603, 130); this.logBox.Location = new System.Drawing.Point(605, 126);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(720, 476); this.logBox.Size = new System.Drawing.Size(720, 483);
this.logBox.TabIndex = 106; this.logBox.TabIndex = 106;
this.logBox.Text = ""; this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged); this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
// //
// tabPage2
//
this.tabPage2.Controls.Add(this.panLearn);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(1328, 609);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "元器件学习";
this.tabPage2.UseVisualStyleBackColor = true;
//
// panLearn
//
this.panLearn.BackColor = System.Drawing.Color.Transparent;
this.panLearn.Dock = System.Windows.Forms.DockStyle.Fill;
this.panLearn.Location = new System.Drawing.Point(0, 0);
this.panLearn.Name = "panLearn";
this.panLearn.Size = new System.Drawing.Size(1328, 609);
this.panLearn.TabIndex = 200;
//
// lblStatus // lblStatus
// //
this.lblStatus.AutoSize = true; this.lblStatus.AutoSize = true;
...@@ -304,9 +250,9 @@ ...@@ -304,9 +250,9 @@
this.lblWarnMsg.AutoEllipsis = true; this.lblWarnMsg.AutoEllipsis = true;
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(322, 3); this.lblWarnMsg.Location = new System.Drawing.Point(357, 3);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1022, 75); this.lblWarnMsg.Size = new System.Drawing.Size(987, 75);
this.lblWarnMsg.TabIndex = 96; this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -431,31 +377,31 @@ ...@@ -431,31 +377,31 @@
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习"; this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click); this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6);
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem2.Size = new System.Drawing.Size(160, 26);
this.toolStripMenuItem2.Text = "AGV调试"; this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(157, 6);
// //
// 标签编辑ToolStripMenuItem // 标签编辑ToolStripMenuItem
// //
this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem"; this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem";
this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.标签编辑ToolStripMenuItem.Text = "标签编辑"; this.标签编辑ToolStripMenuItem.Text = "标签编辑";
this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click); this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click);
// //
...@@ -476,43 +422,43 @@ ...@@ -476,43 +422,43 @@
// toolStripMenuItem3 // toolStripMenuItem3
// //
this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem3.Size = new System.Drawing.Size(144, 26);
this.toolStripMenuItem3.Text = "历史记录"; this.toolStripMenuItem3.Text = "历史记录";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(141, 6);
// //
// 清空日志ToolStripMenuItem // 清空日志ToolStripMenuItem
// //
this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem"; this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem";
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.清空日志ToolStripMenuItem.Text = "清空日志"; this.清空日志ToolStripMenuItem.Text = "清空日志";
this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click); this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator10.Size = new System.Drawing.Size(141, 6);
// //
// 复制日志ToolStripMenuItem // 复制日志ToolStripMenuItem
// //
this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem"; this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem";
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复制日志ToolStripMenuItem.Text = "复制日志"; this.复制日志ToolStripMenuItem.Text = "复制日志";
this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click); this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
this.toolStripSeparator11.Name = "toolStripSeparator11"; this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator11.Size = new System.Drawing.Size(141, 6);
// //
// 版本号ToolStripMenuItem // 版本号ToolStripMenuItem
// //
this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem"; this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem";
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.版本号ToolStripMenuItem.Text = "关于软件"; this.版本号ToolStripMenuItem.Text = "关于软件";
this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click); this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click);
// //
...@@ -522,6 +468,7 @@ ...@@ -522,6 +468,7 @@
this.menuStrip1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.menuStrip1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.操作ToolStripMenuItem, this.操作ToolStripMenuItem,
this.toolStripMenuItem4,
this.设置TToolStripMenuItem, this.设置TToolStripMenuItem,
this.帮助ToolStripMenuItem}); this.帮助ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
...@@ -530,6 +477,96 @@ ...@@ -530,6 +477,96 @@
this.menuStrip1.TabIndex = 4; this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
// toolStripMenuItem4
//
this.toolStripMenuItem4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.工作模式ToolStripMenuItem,
this.toolStripSeparator12,
this.开机自动启动ToolStripMenuItem,
this.toolStripSeparator9,
this.启用X射线点料ToolStripMenuItem,
this.toolStripSeparator15,
this.aGVCancelStateToolStripMenuItem,
this.toolStripSeparator13,
this.启用蜂鸣器ToolStripMenuItem});
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(86, 25);
this.toolStripMenuItem4.Text = "运行参数";
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
//
// 工作模式ToolStripMenuItem
//
this.工作模式ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.正常工作模式ToolStripMenuItem,
this.toolStripSeparator14,
this.元器件学习模式ToolStripMenuItem});
this.工作模式ToolStripMenuItem.Name = "工作模式ToolStripMenuItem";
this.工作模式ToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.工作模式ToolStripMenuItem.Text = "工作模式";
this.工作模式ToolStripMenuItem.Visible = false;
//
// 正常工作模式ToolStripMenuItem
//
this.正常工作模式ToolStripMenuItem.Name = "正常工作模式ToolStripMenuItem";
this.正常工作模式ToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.正常工作模式ToolStripMenuItem.Text = "✔ 正常工作模式";
this.正常工作模式ToolStripMenuItem.Click += new System.EventHandler(this.正常工作模式ToolStripMenuItem_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(200, 6);
//
// 元器件学习模式ToolStripMenuItem
//
this.元器件学习模式ToolStripMenuItem.Name = "元器件学习模式ToolStripMenuItem";
this.元器件学习模式ToolStripMenuItem.Size = new System.Drawing.Size(203, 26);
this.元器件学习模式ToolStripMenuItem.Text = "元器件学习模式";
this.元器件学习模式ToolStripMenuItem.Click += new System.EventHandler(this.元器件学习模式ToolStripMenuItem_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(210, 6);
//
// 开机自动启动ToolStripMenuItem
//
this.开机自动启动ToolStripMenuItem.Name = "开机自动启动ToolStripMenuItem";
this.开机自动启动ToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.开机自动启动ToolStripMenuItem.Text = "开机自动启动";
this.开机自动启动ToolStripMenuItem.Click += new System.EventHandler(this.开机自动启动ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(210, 6);
//
// 启用X射线点料ToolStripMenuItem
//
this.启用X射线点料ToolStripMenuItem.Name = "启用X射线点料ToolStripMenuItem";
this.启用X射线点料ToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.启用X射线点料ToolStripMenuItem.Text = "✔ 启用X射线点料";
this.启用X射线点料ToolStripMenuItem.Click += new System.EventHandler(this.启用X射线点料ToolStripMenuItem_Click);
//
// 启用蜂鸣器ToolStripMenuItem
//
this.启用蜂鸣器ToolStripMenuItem.Name = "启用蜂鸣器ToolStripMenuItem";
this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
this.启用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.启用蜂鸣器ToolStripMenuItem_Click);
//
// aGVCancelStateToolStripMenuItem
//
this.aGVCancelStateToolStripMenuItem.Name = "aGVCancelStateToolStripMenuItem";
this.aGVCancelStateToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.aGVCancelStateToolStripMenuItem.Text = "AGV cancelState";
this.aGVCancelStateToolStripMenuItem.Click += new System.EventHandler(this.aGVCancelStateToolStripMenuItem_Click);
//
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(210, 6);
//
// lblXrayWork // lblXrayWork
// //
this.lblXrayWork.AutoSize = true; this.lblXrayWork.AutoSize = true;
...@@ -542,6 +579,11 @@ ...@@ -542,6 +579,11 @@
this.lblXrayWork.Text = "警告:点料过程中,请勿开门"; this.lblXrayWork.Text = "警告:点料过程中,请勿开门";
this.lblXrayWork.Visible = false; this.lblXrayWork.Visible = false;
// //
// toolStripSeparator15
//
this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(210, 6);
//
// FrmRobotMain // FrmRobotMain
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -564,11 +606,11 @@ ...@@ -564,11 +606,11 @@
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.panWork.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
...@@ -586,17 +628,11 @@ ...@@ -586,17 +628,11 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
internal System.Windows.Forms.RichTextBox logBox; internal System.Windows.Forms.RichTextBox logBox;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btnClearLog;
private System.Windows.Forms.Label lblStatus; private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.CheckBox chbAutoRun;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Label lblWarnMsg; private System.Windows.Forms.Label lblWarnMsg;
private System.Windows.Forms.CheckBox chkDebug;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox chbAGV;
private System.Windows.Forms.CheckBox chbBuzzer;
private System.Windows.Forms.ToolStripMenuItem 操作ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 操作ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem 启动AToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 启动AToolStripMenuItem;
...@@ -624,9 +660,24 @@ ...@@ -624,9 +660,24 @@
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblCurrTray; private System.Windows.Forms.Label lblCurrTray;
private System.Windows.Forms.Label lblOutTray; private System.Windows.Forms.Label lblOutTray;
private System.Windows.Forms.CheckBox chbOpenX;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private System.Windows.Forms.ToolStripMenuItem 开机自动启动ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem 启用X射线点料ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
private System.Windows.Forms.ToolStripMenuItem aGVCancelStateToolStripMenuItem;
private System.Windows.Forms.Panel panWork;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Panel panLearn;
private System.Windows.Forms.ToolStripMenuItem 工作模式ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 正常工作模式ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
private System.Windows.Forms.ToolStripMenuItem 元器件学习模式ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripMenuItem 启用蜂鸣器ToolStripMenuItem;
} }
} }
...@@ -21,7 +21,7 @@ namespace OnlineStore.AutoCountClient ...@@ -21,7 +21,7 @@ namespace OnlineStore.AutoCountClient
{ {
internal partial class FrmRobotMain : Form internal partial class FrmRobotMain : Form
{ {
private FrmLearning frmLearn = null;
// internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private RobotBean robot = null; private RobotBean robot = null;
private List<TabPage> tabPageList = new List<TabPage>(); private List<TabPage> tabPageList = new List<TabPage>();
...@@ -44,6 +44,7 @@ namespace OnlineStore.AutoCountClient ...@@ -44,6 +44,7 @@ namespace OnlineStore.AutoCountClient
{ {
Application.Exit(); Application.Exit();
} }
// AddLearnForm();
FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip); FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip);
AddForm(" " + robot.inputEquip.Name + " ", frm1); AddForm(" " + robot.inputEquip.Name + " ", frm1);
...@@ -77,6 +78,16 @@ namespace OnlineStore.AutoCountClient ...@@ -77,6 +78,16 @@ namespace OnlineStore.AutoCountClient
tabPageList.Add(lineTabPage); tabPageList.Add(lineTabPage);
tabControl1.Controls.Add(lineTabPage); tabControl1.Controls.Add(lineTabPage);
} }
private void AddLearnForm( )
{
frmLearn = new FrmLearning();
frmLearn.FormBorderStyle = FormBorderStyle.None;
frmLearn.TopLevel = false;
frmLearn.Dock = DockStyle.Fill;
frmLearn.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
panLearn.Controls.Add(frmLearn);
frmLearn.Show();
}
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
//string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png"; //string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
...@@ -92,11 +103,19 @@ namespace OnlineStore.AutoCountClient ...@@ -92,11 +103,19 @@ namespace OnlineStore.AutoCountClient
this.Text = title; this.Text = title;
this.notifyIcon1.Text = title; this.notifyIcon1.Text = title;
int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun); int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
chbAutoRun.Checked = autoValue.Equals(1); if(autoValue.Equals(1))
{
开机自动启动ToolStripMenuItem.Text = gouStr + " 开机自动启动";
}
else
{
开机自动启动ToolStripMenuItem.Text = "开机自动启动";
}
LoadStoreData(); LoadStoreData();
LoadListView(); LoadListView();
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
LoadOk = true; LoadOk = true;
tabPage2.Parent = null;
// HideForm(); // HideForm();
timer1.Start(); timer1.Start();
} }
...@@ -352,12 +371,6 @@ namespace OnlineStore.AutoCountClient ...@@ -352,12 +371,6 @@ namespace OnlineStore.AutoCountClient
{ {
LogUtil.ClearLog(); LogUtil.ClearLog();
} }
private void debug_enable_checkBox_CheckedChanged(object sender, EventArgs e)
{
LogUtil.debug_opened = chkDebug.Checked;
}
private void btnCopyLog_Click(object sender, EventArgs e) private void btnCopyLog_Click(object sender, EventArgs e)
{ {
Clipboard.SetDataObject(logBox.Text); Clipboard.SetDataObject(logBox.Text);
...@@ -457,11 +470,18 @@ namespace OnlineStore.AutoCountClient ...@@ -457,11 +470,18 @@ namespace OnlineStore.AutoCountClient
SetMenuS(复位RToolStripMenuItem, false); SetMenuS(复位RToolStripMenuItem, false);
SetMenuS(停止TToolStripMenuItem, false); SetMenuS(停止TToolStripMenuItem, false);
} }
if (!chbAGV.Checked.Equals(AgvClient.CurrCancelState)) //if (!chbAGV.Checked.Equals(AgvClient.CurrCancelState))
//{
// chbAGV.Checked = AgvClient.CurrCancelState;
//}
if (AgvClient.CurrCancelState)
{ {
chbAGV.Checked = AgvClient.CurrCancelState; aGVCancelStateToolStripMenuItem.Text = gouStr + " AGV cancelState";
}
else
{
aGVCancelStateToolStripMenuItem.Text = "AGV cancelState";
} }
UpdateListBox(); UpdateListBox();
} }
private void UpdateListBox() private void UpdateListBox()
...@@ -562,26 +582,12 @@ namespace OnlineStore.AutoCountClient ...@@ -562,26 +582,12 @@ namespace OnlineStore.AutoCountClient
} }
} }
} }
private void chbAutoRun_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (chbAutoRun.Checked)
{
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 1);
ManagerUtil.AutoRun(Application.ExecutablePath, true);
}
else
{
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 0);
ManagerUtil.AutoRun(Application.ExecutablePath, false);
}
}
private void tabControl1_DrawItem(object sender, DrawItemEventArgs e) private void tabControl1_DrawItem(object sender, DrawItemEventArgs e)
{ {
try
{
Font fntTab; Font fntTab;
Brush bshBack; Brush bshBack;
Brush bshFore; Brush bshFore;
...@@ -603,6 +609,10 @@ namespace OnlineStore.AutoCountClient ...@@ -603,6 +609,10 @@ namespace OnlineStore.AutoCountClient
Rectangle recTab = e.Bounds; Rectangle recTab = e.Bounds;
recTab = new Rectangle(recTab.X, recTab.Y + 4, recTab.Width, recTab.Height - 4); recTab = new Rectangle(recTab.X, recTab.Y + 4, recTab.Width, recTab.Height - 4);
e.Graphics.DrawString(tabName, fntTab, bshFore, recTab, sftTab); e.Graphics.DrawString(tabName, fntTab, bshFore, recTab, sftTab);
}catch(Exception ex)
{
LogUtil.error("tabControl1_DrawItem: " + ex.ToString());
}
} }
private void 版本号ToolStripMenuItem_Click(object sender, EventArgs e) private void 版本号ToolStripMenuItem_Click(object sender, EventArgs e)
...@@ -670,66 +680,205 @@ namespace OnlineStore.AutoCountClient ...@@ -670,66 +680,205 @@ namespace OnlineStore.AutoCountClient
frm.ShowDialog(); frm.ShowDialog();
} }
private void checkBox1_CheckedChanged(object sender, EventArgs e) //private void checkBox1_CheckedChanged(object sender, EventArgs e)
//{
// if (!LoadOk)
// {
// return;
// }
// if (chbAGV.Checked.Equals(AgvClient.CurrCancelState))
// {
// return;
// }
// bool result = chbAGV.Checked;
// AgvClient.SetCancelState(result);
// LogUtil.info("勾选:AgvClient.SetCancelState =" + result);
//}
//private void chbBuzzer_CheckedChanged(object sender, EventArgs e)
//{
// if (!LoadOk)
// {
// return;
// }
// if (chbBuzzer.Checked.Equals(RobotManager.UseBuzzer))
// {
// return;
// }
// RobotManager.UseBuzzer = chbBuzzer.Checked;
// LogUtil.info("勾选:UseBuzzer =" + RobotManager.UseBuzzer);
// ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, (RobotManager.UseBuzzer ? 1 : 0));
//}
private void 标签编辑ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
RobotManager.PrintBean.EditLabel();
}
catch (Exception ex)
{
LogUtil.error("标签编辑错误:" + ex.ToString());
}
}
//private void chbOpenX_CheckedChanged(object sender, EventArgs e)
//{
// if (!LoadOk)
// {
// return;
// }
// if (chbOpenX.Checked.Equals(robot.XrayBean.OpenXLine))
// {
// return;
// }
// robot.XrayBean.OpenXLine = chbOpenX.Checked;
// LogUtil.info("勾选:启用X射线点料 =" + chbOpenX.Checked);
//}
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
FrmAnalyze frm = new FrmAnalyze();
frm.ShowDialog();
}
private void toolStripMenuItem4_Click(object sender, EventArgs e)
{
}
private string gouStr = "✔";
private void 开机自动启动ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!LoadOk) if (!LoadOk)
{ {
return; return;
} }
if (chbAGV.Checked.Equals(AgvClient.CurrCancelState)) if (开机自动启动ToolStripMenuItem.Text.Contains(gouStr))
{ {
return; ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 0);
ManagerUtil.AutoRun(Application.ExecutablePath, false);
开机自动启动ToolStripMenuItem.Text = "开机自动启动";
} }
bool result = chbAGV.Checked; else
AgvClient.SetCancelState(result); {
LogUtil.info("勾选:AgvClient.SetCancelState =" + result); ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 1);
ManagerUtil.AutoRun(Application.ExecutablePath, true);
开机自动启动ToolStripMenuItem.Text = gouStr+"开机自动启动";
}
LogUtil.info(Name + " 点击:" + 开机自动启动ToolStripMenuItem.Text);
} }
private void chbBuzzer_CheckedChanged(object sender, EventArgs e) private void 启用蜂鸣器ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!LoadOk) if (!LoadOk)
{ {
return; return;
} }
if (chbBuzzer.Checked.Equals(RobotManager.UseBuzzer))
bool result = !启用蜂鸣器ToolStripMenuItem.Text.Contains(gouStr);
if (result.Equals(RobotManager.UseBuzzer))
{ {
return; return;
} }
RobotManager.UseBuzzer = chbBuzzer.Checked; RobotManager.UseBuzzer = result;
LogUtil.info("勾选:UseBuzzer =" + RobotManager.UseBuzzer);
ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, (RobotManager.UseBuzzer ? 1 : 0)); ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, (RobotManager.UseBuzzer ? 1 : 0));
if (result)
{
启用蜂鸣器ToolStripMenuItem.Text = gouStr + " 启用蜂鸣器";
}
else
{
启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
}
LogUtil.info(Name + " 点击:" + 启用蜂鸣器ToolStripMenuItem.Text);
} }
private void 标签编辑ToolStripMenuItem_Click(object sender, EventArgs e) private void 启用X射线点料ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
try if (!LoadOk)
{ {
RobotManager.PrintBean.EditLabel(); return;
} }
catch (Exception ex)
bool result = !启用X射线点料ToolStripMenuItem.Text.Contains(gouStr);
if (result.Equals(robot.XrayBean.OpenXLine))
{ {
LogUtil.error("标签编辑错误:" + ex.ToString()); return;
} }
robot.XrayBean.OpenXLine = result;
if (result)
{
启用X射线点料ToolStripMenuItem.Text = gouStr + " 启用X射线点料";
}
else
{
启用X射线点料ToolStripMenuItem.Text = "启用X射线点料";
}
LogUtil.info(Name + " 点击:" + 启用X射线点料ToolStripMenuItem.Text);
} }
private void chbOpenX_CheckedChanged(object sender, EventArgs e) private void aGVCancelStateToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!LoadOk) if (!LoadOk)
{ {
return; return;
} }
if (chbOpenX.Checked.Equals(robot.XrayBean.OpenXLine))
bool result = !aGVCancelStateToolStripMenuItem.Text.Contains(gouStr);
if (result.Equals(AgvClient.CurrCancelState))
{ {
return; return;
} }
robot.XrayBean.OpenXLine = chbOpenX.Checked; AgvClient.SetCancelState(result);
LogUtil.info("勾选:启用X射线点料 =" + chbOpenX.Checked); robot.XrayBean.OpenXLine = result;
if (result)
{
aGVCancelStateToolStripMenuItem.Text = gouStr + " AGV cancelState";
}
else
{
aGVCancelStateToolStripMenuItem.Text = "AGV cancelState";
}
LogUtil.info(Name + " 点击:" + aGVCancelStateToolStripMenuItem.Text);
} }
private void toolStripMenuItem3_Click(object sender, EventArgs e) private void 正常工作模式ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FrmAnalyze frm = new FrmAnalyze(); if (!XRayLearnManager.InLearnMode)
frm.ShowDialog(); {
正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式";
元器件学习模式ToolStripMenuItem.Text = "元器件学习模式";
return;
}
LogUtil.info(Name + " 点击:" + 正常工作模式ToolStripMenuItem.Text+ ",设置InLearnMode = false");
XRayLearnManager.InLearnMode = false;
正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式";
元器件学习模式ToolStripMenuItem.Text ="元器件学习模式";
tabPage2.Parent = null;
tabControl1.TabPages.Insert(0,tabPage1);
tabControl1.SelectedIndex = 0;
//tabPage1.Parent = tabControl1;
}
private void 元器件学习模式ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (XRayLearnManager.InLearnMode)
{
正常工作模式ToolStripMenuItem.Text = "正常工作模式";
元器件学习模式ToolStripMenuItem.Text = gouStr + " 元器件学习模式";
return;
}
LogUtil.info(Name + " 点击:" + 元器件学习模式ToolStripMenuItem.Text + ",设置InLearnMode = true ");
XRayLearnManager.InLearnMode = true;
正常工作模式ToolStripMenuItem.Text = "正常工作模式";
元器件学习模式ToolStripMenuItem.Text = gouStr + " 元器件学习模式";
tabPage1.Parent = null;
tabControl1.TabPages.Insert(0, tabPage2);
tabControl1.SelectedIndex = 0;
//tabPage2.Parent = tabControl1;
} }
} }
} }
...@@ -417,6 +417,9 @@ ...@@ -417,6 +417,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>43</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAA AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAA
......
...@@ -446,24 +446,11 @@ namespace OnlineStore.AutoCountClient ...@@ -446,24 +446,11 @@ namespace OnlineStore.AutoCountClient
txtResult.Text = "点料中..."; txtResult.Text = "点料中...";
int th = (int)numTh.Value; int th = (int)numTh.Value;
int wsize = (int)numWSize.Value; int wsize = (int)numWSize.Value;
int outCount = 0; Asa.API.EyemImage tpDstImg ;
// equipBean.countImage.GetCount(th, out outCount); CountParam param = new CountParam("", th, wsize, DeviceType);
int n = 0; int outCount = equipBean.GetCountResult(filePath, param, out tpDstImg);
if (DeviceType.Equals(0))
{
n = equipBean.carerayImage.GetLocalCount(filePath, th, wsize, out outCount, out Asa.API.EyemImage tpDstImg);
}
else if(DeviceType.Equals(1))
{
n = equipBean.carerayImage.GetLocalCountHuge(filePath, th, wsize, out outCount, out Asa.API.EyemImage tpDstImg);
}
else
{
int type = DeviceType - 2;
n = equipBean.carerayImage.GetLocalCountIrregular(filePath, th, type, wsize, out outCount, out Asa.API.EyemImage dst);
}
txtResult.Text = outCount.ToString(); txtResult.Text = outCount.ToString();
LogUtil.info(equipBean.Name + "用户点击 点料测试【" + filePath + "】【" + th + "】【" + wsize + "】 结果[" + n + "]:" + outCount); LogUtil.info(equipBean.Name + "用户点击 点料测试【" + filePath + "】【" + th + "】【" + wsize + "】 结果:" + outCount);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<Compile Include="bean\InputEquip.cs" /> <Compile Include="bean\InputEquip.cs" />
<Compile Include="manager\RFIDManagercs.cs" /> <Compile Include="manager\RFIDManagercs.cs" />
<Compile Include="manager\SServerManager.cs" /> <Compile Include="manager\SServerManager.cs" />
<Compile Include="manager\XRayLearnManager.cs" />
<Compile Include="model\AxisBean.cs" /> <Compile Include="model\AxisBean.cs" />
<Compile Include="model\WaitUtil.cs" /> <Compile Include="model\WaitUtil.cs" />
<Compile Include="deviceLibrary\halcon\CodeManager.cs" /> <Compile Include="deviceLibrary\halcon\CodeManager.cs" />
...@@ -145,6 +146,39 @@ ...@@ -145,6 +146,39 @@
<Content Include="XRAY\area.txt"> <Content Include="XRAY\area.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="XRAY\model\0.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\2.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\3.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\4.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\5.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\smallmodel\1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\smallmodel\2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\smallmodel\3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\smallmodel\4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\model\smallmodel\5.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\out\out.txt"> <Content Include="XRAY\out\out.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
......
...@@ -49,9 +49,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,9 +49,13 @@ namespace OnlineStore.DeviceLibrary
public static void SetCancelState(bool isCancel) public static void SetCancelState(bool isCancel)
{ {
CurrCancelState = isCancel; CurrCancelState = isCancel;
if (agvClient != null)
{
agvClient.CancelState = isCancel; agvClient.CancelState = isCancel;
} }
}
public static void SetStatus(string id, string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low,bool isMust=false) public static void SetStatus(string id, string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low,bool isMust=false)
{ {
......
...@@ -222,7 +222,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -222,7 +222,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.XW12_XRayStart)) else if (MoveInfo.IsStep(StepEnum.XW12_XRayStart))
{ {
XW13_GetXRayImage(); MoveInfo.NextMoveStep(StepEnum.XW13_GetXRayImage);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(8000));
WorkLog("点料:清理" + path1_tif + "内容,开始获取X射线图形 ");
CapImage();
MoveInfo.EndStepWait();
} }
else if (MoveInfo.IsStep(StepEnum.XW13_GetXRayImage)) else if (MoveInfo.IsStep(StepEnum.XW13_GetXRayImage))
...@@ -317,20 +322,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -317,20 +322,11 @@ namespace OnlineStore.DeviceLibrary
WorkLog("料盘处理:启动X射线[" + result + "],等待1秒"); WorkLog("料盘处理:启动X射线[" + result + "],等待1秒");
} }
private void XW13_GetXRayImage()
{
MoveInfo.NextMoveStep(StepEnum.XW13_GetXRayImage);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(8000));
WorkLog("点料:清理" + path1_tif + "内容,开始获取X射线图形 ");
CapImage();
MoveInfo.EndStepWait();
}
#endregion #endregion
#region 点料处理 #region 点料处理
private string lastFileName = ""; private string lastFileName = "";
private CountParam lastParam = new CountParam();
private void XW15_GetResult() private void XW15_GetResult()
{ {
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.LOW))
...@@ -346,41 +342,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -346,41 +342,27 @@ namespace OnlineStore.DeviceLibrary
{ {
xRay.Stop(); xRay.Stop();
} }
int count = 99999; InXWork = false;
string fileP = path1_tif + @"\" + lastFileName; WorkLog("点料:停止X射线,设置 InXWork = false,开始获取点料结果");
int n = 0;
if (lastParam.Sign.Equals(0))
{
WorkLog("点料:开始调用 carerayImage.GetLocalCount ");
n = carerayImage.GetLocalCount(fileP, lastParam.Threshold, lastParam.WindowSize, out count, out Asa.API.EyemImage tpDstImg);
}
else if(lastParam.Sign.Equals(1))
{
WorkLog("点料:开始调用 carerayImage.GetLocalCountHuge ");
n = carerayImage.GetLocalCountHuge(fileP, lastParam.Threshold, lastParam.WindowSize, out count, out Asa.API.EyemImage tpDstImg);
}
else
{
int type = lastParam.Sign - 2;
WorkLog("点料:开始调用 carerayImage.GetLocalCountIrregular ");
n = carerayImage.GetLocalCountIrregular(fileP, lastParam.Threshold, type, lastParam.WindowSize, out count, out Asa.API.EyemImage dst);
}
bool isNg = false; bool isNg = false;
string NgMsg = ""; string NgMsg = "";
int count = 0;
CountParam lastParam = UpdateParamByPN(Work_ReelInfo.WareCode);
if (lastParam != null)
{
string fileP = path1_tif + @"\" + lastFileName;
count = GetCountResult(fileP, lastParam, out Asa.API.EyemImage tpDstImg);
if (count < ResultMinCount) if (count < ResultMinCount)
{ {
isNg = true; isNg = true;
NgMsg = "NG:点料结果小于" + ResultMinCount; NgMsg = "NG:点料结果小于" + ResultMinCount;
} }
WorkLog("点料:获取点料结果 【" + count + "】 " + lastParam.ToStr() + ",n =" + n + ", " + NgMsg); WorkLog("点料: 调用 GetCountResult 获取点料结果 【" + count + "】 " + lastParam.ToStr() + ", " + NgMsg);
if (Work_ReelInfo.WareCount <= 0) if (Work_ReelInfo.WareCount <= 0)
{ {
MoveInfo.MoveParam.WareCount = count; MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count; Work_ReelInfo.WareCount = count;
} }
InXWork = false;
if (!isNg && SServerManager.CanConnect()) if (!isNg && SServerManager.CanConnect())
{ {
// string msg = "暂不上传"; // string msg = "暂不上传";
...@@ -392,12 +374,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -392,12 +374,12 @@ namespace OnlineStore.DeviceLibrary
NgMsg = msg; NgMsg = msg;
} }
} }
if (isNg) }
else
{ {
MoveInfo.MoveParam.IsNgReel = true; isNg = true;
Work_ReelInfo.IsNgReel = true; NgMsg = "NG:未找到元器件类型,PN[" + GetCodeStrPN(Work_ReelInfo.WareCode) + "]";
MoveInfo.MoveParam.NgMsg = NgMsg; WorkLog("点料:" + NgMsg);
Work_ReelInfo.NgMsg = NgMsg;
} }
string outF = path2_out + lastFileName; string outF = path2_out + lastFileName;
...@@ -407,14 +389,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -407,14 +389,18 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
MoveInfo.MoveParam.IsNgReel = true;
Work_ReelInfo.IsNgReel = true;
MoveInfo.MoveParam.NgMsg = NgMsg;
Work_ReelInfo.NgMsg = NgMsg;
outF = NgMsg; outF = NgMsg;
} }
int c = RobotManager.robot.sQLite.Insert(Work_ReelInfo.WareCode, Work_ReelInfo.PlateW, Work_ReelInfo.PlateH, count, outF); int c = RobotManager.robot.sQLite.Insert(Work_ReelInfo.WareCode, Work_ReelInfo.PlateW, Work_ReelInfo.PlateH, count, outF);
LogUtil.info("插入数据【" + Work_ReelInfo.WareCode + "】【" + count + "】结果:" + c + " ," + RobotManager.robot.sQLite.ErrInfo); LogUtil.info("插入数据【" + Work_ReelInfo.WareCode + "】【" + count + "】【" + outF + "】结果:" + c + " ," + RobotManager.robot.sQLite.ErrInfo);
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("XW15_GetResult出错:"+ex.ToString()); LogUtil.error("XW15_GetResult出错:" + ex.ToString());
} }
MoveInfo.EndStepWait(); MoveInfo.EndStepWait();
} }
...@@ -489,8 +475,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -489,8 +475,6 @@ namespace OnlineStore.DeviceLibrary
} }
WorkLog("点料:获取X射线图形,保存到: " + fileP + ",备份到:" + backFile + ",记录时间" + lastData + ",停止X射线"); WorkLog("点料:获取X射线图形,保存到: " + fileP + ",备份到:" + backFile + ",记录时间" + lastData + ",停止X射线");
GetImageEvent?.Invoke(bmp); GetImageEvent?.Invoke(bmp);
UpdateArea(Work_ReelInfo.WareCode);
} }
else else
{ {
...@@ -523,32 +507,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,32 +507,29 @@ namespace OnlineStore.DeviceLibrary
} }
private void UpdateArea(string codeStr) private CountParam UpdateParamByPN(string codeStr)
{
//bool result = false;
//CountParam lastParam = new CountParam("", ThresholdValue, 3);
string pn = GetCodeStrPN(codeStr);
if (countParamMap.ContainsKey(pn))
{
CountParam lastParam = countParamMap[pn];
LogUtil.debug ("【" + codeStr + "】使用参数 " + lastParam.ToStr() + " ");
return lastParam;
}
return null;
}
private string GetCodeStrPN(string codeStr)
{ {
lastParam = new CountParam("", ThresholdValue, 3);
string[] codeArray = codeStr.Split(';'); string[] codeArray = codeStr.Split(';');
// string fileValue = "";
// string area = "";
if (codeArray.Length.Equals(2)) if (codeArray.Length.Equals(2))
{ {
string pn = codeArray[0]; string pn = codeArray[0];
return pn;
//string type = pn.Substring(0, 2) + pn.Substring(pn.Length - 3, 3);
//if (countParamMap.ContainsKey(pn))
//{
// area = countParamMap[pn].AreaValue;
// fileValue = lastFileName + " " + area;
// lastParam = countParamMap[pn];
//}
//else
if (countParamMap.ContainsKey(pn))
{
lastParam = countParamMap[pn];
}
} }
LogUtil.info("【" + codeStr + "】使用参数 " + lastParam.ToStr() + " "); return "";
//LogUtil.info("【" + codeStr + "】使用参数【" + lastTh + "】【" + area + "】,文件名【" + lastFileName + "】内容【" + fileValue + "】");
//File.WriteAllText(path3_area, fileValue);
} }
private void ClearFilePath() private void ClearFilePath()
...@@ -575,6 +556,41 @@ namespace OnlineStore.DeviceLibrary ...@@ -575,6 +556,41 @@ namespace OnlineStore.DeviceLibrary
} }
public int GetCountResult(string fileP, CountParam param,out Asa.API.EyemImage tpDstImg)
{
int count = 0;
int result = 0;
int type = param.Sign;
int threshold = param.Threshold;
int windowsize = param.WindowSize;
if (param.Sign.Equals(0))
{
result = carerayImage.GetLocalCount(fileP, threshold, windowsize, out count, out tpDstImg);
LogUtil.info("GetCountResult "+ type + " 调用 GetLocalCount 【" + fileP+"】【"+threshold+"】【"+windowsize+"】,返回【"+result+"】,结果【"+count+"】");
}
else if (param.Sign.Equals(1))
{
result = carerayImage.GetLocalCountHuge(fileP, threshold, windowsize, out count, out tpDstImg);
LogUtil.info("GetCountResult " + type + " 调用 GetLocalCount 【" + fileP + "】【" + threshold + "】【" + windowsize + "】,返回【" + result + "】,结果【" + count + "】");
}
else
{
int t = param.Sign - 2;
WorkLog("点料:开始调用 carerayImage.GetLocalCountIrregular ");
result = carerayImage.GetLocalCountIrregular(fileP, threshold, t, windowsize, out count, out tpDstImg);
LogUtil.info("GetCountResult " + type + " 调用 GetLocalCount 【" + fileP + "】【" + threshold + "】["+t+"]【" + windowsize + "】,返回【" + result + "】,结果【" + count + "】");
}
return count;
}
public Bitmap ImgChange(Asa.API.EyemImage tpDstImg)
{
Bitmap bit = null;
return bit;
}
#endregion #endregion
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -47,6 +47,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,6 +47,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
// XRayLearnManager.Init();
if (!isInit) if (!isInit)
{ {
DeviceConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>(); DeviceConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
......
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class XRayLearnManager
{
public static bool InLearnMode = false;
public static Image modelImg_0;
public static Image modelImg_1;
public static Image modelImg_2;
public static Image modelImg_3;
public static Image modelImg_4;
public static Image modelImg_5;
public static Image smodelImg_1;
public static Image smodelImg_2;
public static Image smodelImg_3;
public static Image smodelImg_4;
public static Image smodelImg_5;
public static Image testImg;
/// <summary>
/// 是否已经初始化过了
/// </summary>
public static bool IsInit = false;
public static void Init()
{
string path = Application.StartupPath+ "\\XRAY\\model\\";
try
{
IsInit = true;
modelImg_0 = Image.FromFile(path + "\\0.jpg");
modelImg_1 = Image.FromFile(path + "\\1.png");
modelImg_2 = Image.FromFile(path + "\\2.jpg");
modelImg_3 = Image.FromFile(path + "\\3.jpg");
modelImg_4 = Image.FromFile(path + "\\4.jpg");
modelImg_5 = Image.FromFile(path + "\\5.jpg");
smodelImg_1 = Image.FromFile(path + "\\smallmodel\\1.png");
smodelImg_2 = Image.FromFile(path + "\\smallmodel\\2.png");
smodelImg_3 = Image.FromFile(path + "\\smallmodel\\3.png");
smodelImg_4 = Image.FromFile(path + "\\smallmodel\\4.png");
smodelImg_5 = Image.FromFile(path + "\\smallmodel\\5.png");
testImg = Image.FromFile(path + "\\8D.03906.H11-R515232020062200253-20200812181219.png");
}
catch (Exception ex)
{
Console.Write(ex.ToString());
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!