Commit 876e97c3 LN

元器件学习界面

1 个父辈 bc94711e
正在显示 37 个修改的文件 包含 1603 行增加648 行删除
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Management" /> <Reference Include="System.Management" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
......
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);
string testFile = Application.StartupPath + "\\XRAY\\model\\8D.03906.H11-R515232020062200253-20200812181219.png";
UpdateCurrImg(testFile, "8D.03906.H11");
}
public void UpdateCurrImg(string fullFName,string PN)
{
CurrFullFileName = fullFName;
CurrPN = PN;
ChangeSelStatus(true);
imgCurrImg.Image = XRayLearnManager.FormImage(fullFName);
}
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
...@@ -28,90 +28,49 @@ ...@@ -28,90 +28,49 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.groupBox1 = new System.Windows.Forms.GroupBox(); 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.imgCurrImg = new Acc.ImageBox.ImageBox();
this.imageBox1 = new Acc.ImageBox.ImageBox(); this.lblPnInfo = new System.Windows.Forms.Label();
this.btnTest = new System.Windows.Forms.Button(); this.btnTest = new System.Windows.Forms.Button();
this.imageBox2 = new Acc.ImageBox.ImageBox(); this.btnNext = new System.Windows.Forms.Button();
this.imageBox3 = new Acc.ImageBox.ImageBox(); this.numWSize = new System.Windows.Forms.NumericUpDown();
this.imageBox4 = new Acc.ImageBox.ImageBox(); this.label3 = new System.Windows.Forms.Label();
this.imageBox5 = new Acc.ImageBox.ImageBox(); this.numTh = new System.Windows.Forms.NumericUpDown();
this.radioButton1 = new System.Windows.Forms.RadioButton(); this.label1 = new System.Windows.Forms.Label();
this.radioButton2 = new System.Windows.Forms.RadioButton(); this.btnEnd = new System.Windows.Forms.Button();
this.radioButton3 = new System.Windows.Forms.RadioButton(); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.radioButton4 = new System.Windows.Forms.RadioButton(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.radioButton5 = new System.Windows.Forms.RadioButton(); this.buttonA = new System.Windows.Forms.Button();
this.radioButton0 = new System.Windows.Forms.RadioButton(); this.buttonB = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.buttonC = new System.Windows.Forms.Button();
this.imageBox0 = new Acc.ImageBox.ImageBox(); this.buttonD = new System.Windows.Forms.Button();
this.btnSaveParam = new System.Windows.Forms.Button(); this.buttonE = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.lblCountInfo = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.lblFolder = new System.Windows.Forms.Label();
this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.lblImgeInfo = new System.Windows.Forms.Label();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numWSize)).BeginInit();
this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numTh)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.groupBox4.SuspendLayout();
((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(); this.SuspendLayout();
// //
// 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)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.lblImgeInfo);
this.groupBox1.Controls.Add(this.lblFolder);
this.groupBox1.Controls.Add(this.lblCountInfo);
this.groupBox1.Controls.Add(this.imgCurrImg); this.groupBox1.Controls.Add(this.imgCurrImg);
this.groupBox1.Controls.Add(this.lblPnInfo); this.groupBox1.Controls.Add(this.lblPnInfo);
this.groupBox1.Controls.Add(this.lblCurrTray); this.groupBox1.Location = new System.Drawing.Point(6, 4);
this.groupBox1.Controls.Add(this.btnTest);
this.groupBox1.Location = new System.Drawing.Point(6, 5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(588, 495); this.groupBox1.Size = new System.Drawing.Size(963, 721);
this.groupBox1.TabIndex = 198; this.groupBox1.TabIndex = 198;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "料盘实时图片"; 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 // imgCurrImg
// //
...@@ -119,284 +78,263 @@ ...@@ -119,284 +78,263 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.imgCurrImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.imgCurrImg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.imgCurrImg.Location = new System.Drawing.Point(6, 21); this.imgCurrImg.Location = new System.Drawing.Point(6, 51);
this.imgCurrImg.Name = "imgCurrImg"; this.imgCurrImg.Name = "imgCurrImg";
this.imgCurrImg.Size = new System.Drawing.Size(576, 387); this.imgCurrImg.Size = new System.Drawing.Size(951, 647);
this.imgCurrImg.TabIndex = 288; this.imgCurrImg.TabIndex = 288;
this.imgCurrImg.Text = "料盘实时图片"; this.imgCurrImg.Text = "料盘图片";
// //
// imageBox1 // lblPnInfo
// //
this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lblPnInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lblPnInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.imageBox1.Location = new System.Drawing.Point(8, 21); this.lblPnInfo.Location = new System.Drawing.Point(8, 25);
this.imageBox1.Name = "imageBox1"; this.lblPnInfo.Name = "lblPnInfo";
this.imageBox1.Size = new System.Drawing.Size(578, 468); this.lblPnInfo.Size = new System.Drawing.Size(949, 20);
this.imageBox1.TabIndex = 289; this.lblPnInfo.TabIndex = 287;
this.imageBox1.Text = "小器件"; this.lblPnInfo.Text = "料盘PN:";
this.lblPnInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// btnTest // 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.BackColor = System.Drawing.Color.White;
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 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.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.Location = new System.Drawing.Point(32, 442);
this.btnTest.Name = "btnTest"; this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(576, 40); this.btnTest.Size = new System.Drawing.Size(235, 46);
this.btnTest.TabIndex = 285; this.btnTest.TabIndex = 285;
this.btnTest.Text = "点料测试"; this.btnTest.Text = "点料测试";
this.btnTest.UseVisualStyleBackColor = false; this.btnTest.UseVisualStyleBackColor = false;
this.btnTest.Click += new System.EventHandler(this.btnTest_Click); this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
// //
// imageBox2 // btnNext
// //
this.imageBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Left) this.btnNext.BackColor = System.Drawing.Color.White;
| System.Windows.Forms.AnchorStyles.Right))); this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.imageBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.btnNext.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.imageBox2.Location = new System.Drawing.Point(8, 21); this.btnNext.Location = new System.Drawing.Point(1009, 593);
this.imageBox2.Name = "imageBox2"; this.btnNext.Name = "btnNext";
this.imageBox2.Size = new System.Drawing.Size(578, 468); this.btnNext.Size = new System.Drawing.Size(133, 50);
this.imageBox2.TabIndex = 290; this.btnNext.TabIndex = 298;
this.imageBox2.Text = "大器件"; this.btnNext.Text = "下一个";
// this.btnNext.UseVisualStyleBackColor = false;
// imageBox3 this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
// //
this.imageBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) // numWSize
| System.Windows.Forms.AnchorStyles.Left) //
| System.Windows.Forms.AnchorStyles.Right))); this.numWSize.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.imageBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.numWSize.Location = new System.Drawing.Point(117, 72);
this.imageBox3.Location = new System.Drawing.Point(8, 21); this.numWSize.Maximum = new decimal(new int[] {
this.imageBox3.Name = "imageBox3"; 1000,
this.imageBox3.Size = new System.Drawing.Size(578, 468); 0,
this.imageBox3.TabIndex = 291; 0,
this.imageBox3.Text = "imageBox3"; 0});
// this.numWSize.Name = "numWSize";
// imageBox4 this.numWSize.Size = new System.Drawing.Size(80, 26);
// this.numWSize.TabIndex = 297;
this.imageBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.numWSize.Value = new decimal(new int[] {
| System.Windows.Forms.AnchorStyles.Left) 3,
| System.Windows.Forms.AnchorStyles.Right))); 0,
this.imageBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 0,
this.imageBox4.Location = new System.Drawing.Point(8, 21); 0});
this.imageBox4.Name = "imageBox4"; //
this.imageBox4.Size = new System.Drawing.Size(578, 468); // label3
this.imageBox4.TabIndex = 292; //
this.imageBox4.Text = "异性三角大器件"; this.label3.AutoSize = true;
// this.label3.Location = new System.Drawing.Point(45, 75);
// imageBox5 this.label3.Name = "label3";
// this.label3.Size = new System.Drawing.Size(68, 20);
this.imageBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.label3.TabIndex = 296;
| System.Windows.Forms.AnchorStyles.Left) this.label3.Text = "窗口大小:";
| System.Windows.Forms.AnchorStyles.Right))); //
this.imageBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; // numTh
this.imageBox5.Location = new System.Drawing.Point(8, 21); //
this.imageBox5.Name = "imageBox5"; this.numTh.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.imageBox5.Size = new System.Drawing.Size(578, 468); this.numTh.Location = new System.Drawing.Point(117, 34);
this.imageBox5.TabIndex = 293; this.numTh.Name = "numTh";
this.imageBox5.Text = "异性长条形器件"; this.numTh.Size = new System.Drawing.Size(80, 26);
// this.numTh.TabIndex = 295;
// radioButton1 this.numTh.Value = new decimal(new int[] {
// 30,
this.radioButton1.AutoSize = true; 0,
this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 0,
this.radioButton1.Location = new System.Drawing.Point(47, 88); 0});
this.radioButton1.Name = "radioButton1"; //
this.radioButton1.Size = new System.Drawing.Size(62, 21); // label1
this.radioButton1.TabIndex = 200; //
this.radioButton1.Text = "小器件"; this.label1.AutoSize = true;
this.radioButton1.UseVisualStyleBackColor = true; this.label1.Location = new System.Drawing.Point(71, 37);
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged); this.label1.Name = "label1";
// this.label1.Size = new System.Drawing.Size(40, 20);
// radioButton2 this.label1.TabIndex = 294;
// this.label1.Text = "阈值:";
this.radioButton2.AutoSize = true; //
this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); // btnEnd
this.radioButton2.Location = new System.Drawing.Point(187, 88); //
this.radioButton2.Name = "radioButton2"; this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.radioButton2.Size = new System.Drawing.Size(62, 21); this.btnEnd.BackColor = System.Drawing.Color.White;
this.radioButton2.TabIndex = 201; this.btnEnd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.radioButton2.Text = "大器件"; this.btnEnd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton2.UseVisualStyleBackColor = true; this.btnEnd.Location = new System.Drawing.Point(1148, 593);
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged); this.btnEnd.Name = "btnEnd";
// this.btnEnd.Size = new System.Drawing.Size(133, 50);
// radioButton3 this.btnEnd.TabIndex = 286;
// this.btnEnd.Text = "完成";
this.radioButton3.AutoSize = true; this.btnEnd.UseVisualStyleBackColor = false;
this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnEnd.Click += new System.EventHandler(this.btnSaveParam_Click);
this.radioButton3.Location = new System.Drawing.Point(327, 88); //
this.radioButton3.Name = "radioButton3"; // timer1
this.radioButton3.Size = new System.Drawing.Size(98, 21); //
this.radioButton3.TabIndex = 202; this.timer1.Interval = 2000;
this.radioButton3.Text = "异形三角器件"; this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
this.radioButton3.UseVisualStyleBackColor = true; //
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged); // groupBox4
// //
// radioButton4 this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
// this.groupBox4.Controls.Add(this.buttonE);
this.radioButton4.AutoSize = true; this.groupBox4.Controls.Add(this.buttonD);
this.radioButton4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Controls.Add(this.buttonC);
this.radioButton4.Location = new System.Drawing.Point(467, 88); this.groupBox4.Controls.Add(this.buttonB);
this.radioButton4.Name = "radioButton4"; this.groupBox4.Controls.Add(this.buttonA);
this.radioButton4.Size = new System.Drawing.Size(110, 21); this.groupBox4.Controls.Add(this.numTh);
this.radioButton4.TabIndex = 203; this.groupBox4.Controls.Add(this.btnTest);
this.radioButton4.Text = "异形三脚大器件"; this.groupBox4.Controls.Add(this.numWSize);
this.radioButton4.UseVisualStyleBackColor = true; this.groupBox4.Controls.Add(this.label3);
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged); this.groupBox4.Controls.Add(this.label1);
// this.groupBox4.Location = new System.Drawing.Point(990, 42);
// radioButton5 this.groupBox4.Name = "groupBox4";
// this.groupBox4.Size = new System.Drawing.Size(308, 512);
this.radioButton5.AutoSize = true; this.groupBox4.TabIndex = 295;
this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.TabStop = false;
this.radioButton5.Location = new System.Drawing.Point(607, 88); this.groupBox4.Text = "请选择参数";
this.radioButton5.Name = "radioButton5"; //
this.radioButton5.Size = new System.Drawing.Size(110, 21); // buttonA
this.radioButton5.TabIndex = 204; //
this.radioButton5.Text = "异形长条形器件"; this.buttonA.BackColor = System.Drawing.Color.White;
this.radioButton5.UseVisualStyleBackColor = true; this.buttonA.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged); this.buttonA.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
// this.buttonA.Location = new System.Drawing.Point(84, 132);
// radioButton0 this.buttonA.Name = "buttonA";
// this.buttonA.Size = new System.Drawing.Size(133, 50);
this.radioButton0.AutoSize = true; this.buttonA.TabIndex = 299;
this.radioButton0.Checked = true; this.buttonA.Text = "算法A";
this.radioButton0.Location = new System.Drawing.Point(776, 47); this.buttonA.UseVisualStyleBackColor = false;
this.radioButton0.Name = "radioButton0"; this.buttonA.Click += new System.EventHandler(this.buttonA_Click);
this.radioButton0.Size = new System.Drawing.Size(125, 24); //
this.radioButton0.TabIndex = 205; // buttonB
this.radioButton0.TabStop = true; //
this.radioButton0.Text = "未找到器件类型"; this.buttonB.BackColor = System.Drawing.Color.White;
this.radioButton0.UseVisualStyleBackColor = true; this.buttonB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.radioButton0.CheckedChanged += new System.EventHandler(this.radioButton0_CheckedChanged); this.buttonB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
// this.buttonB.Location = new System.Drawing.Point(84, 189);
// groupBox3 this.buttonB.Name = "buttonB";
// this.buttonB.Size = new System.Drawing.Size(133, 50);
this.groupBox3.Controls.Add(this.pictureBox5); this.buttonB.TabIndex = 300;
this.groupBox3.Controls.Add(this.pictureBox4); this.buttonB.Text = "算法B";
this.groupBox3.Controls.Add(this.pictureBox3); this.buttonB.UseVisualStyleBackColor = false;
this.groupBox3.Controls.Add(this.pictureBox2); this.buttonB.Click += new System.EventHandler(this.buttonB_Click);
this.groupBox3.Controls.Add(this.pictureBox1); //
this.groupBox3.Controls.Add(this.btnSaveParam); // buttonC
this.groupBox3.Controls.Add(this.radioButton1); //
this.groupBox3.Controls.Add(this.radioButton0); this.buttonC.BackColor = System.Drawing.Color.White;
this.groupBox3.Controls.Add(this.radioButton2); this.buttonC.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.groupBox3.Controls.Add(this.radioButton5); this.buttonC.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Controls.Add(this.radioButton3); this.buttonC.Location = new System.Drawing.Point(84, 246);
this.groupBox3.Controls.Add(this.radioButton4); this.buttonC.Name = "buttonC";
this.groupBox3.Location = new System.Drawing.Point(6, 502); this.buttonC.Size = new System.Drawing.Size(133, 50);
this.groupBox3.Name = "groupBox3"; this.buttonC.TabIndex = 301;
this.groupBox3.Size = new System.Drawing.Size(1184, 116); this.buttonC.Text = "算法C";
this.groupBox3.TabIndex = 206; this.buttonC.UseVisualStyleBackColor = false;
this.groupBox3.TabStop = false; this.buttonC.Click += new System.EventHandler(this.buttonC_Click);
// //
// imageBox0 // buttonD
// //
this.imageBox0.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.buttonD.BackColor = System.Drawing.Color.White;
| System.Windows.Forms.AnchorStyles.Left) this.buttonD.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
| System.Windows.Forms.AnchorStyles.Right))); this.buttonD.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.imageBox0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.buttonD.Location = new System.Drawing.Point(84, 303);
this.imageBox0.Location = new System.Drawing.Point(8, 21); this.buttonD.Name = "buttonD";
this.imageBox0.Name = "imageBox0"; this.buttonD.Size = new System.Drawing.Size(133, 50);
this.imageBox0.Size = new System.Drawing.Size(578, 468); this.buttonD.TabIndex = 302;
this.imageBox0.TabIndex = 294; this.buttonD.Text = "算法D";
this.imageBox0.Text = "未找到器件类型"; this.buttonD.UseVisualStyleBackColor = false;
// this.buttonD.Click += new System.EventHandler(this.buttonD_Click);
// btnSaveParam //
// // buttonE
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.buttonE.BackColor = System.Drawing.Color.White;
this.btnSaveParam.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonE.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.buttonE.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveParam.Location = new System.Drawing.Point(999, 40); this.buttonE.Location = new System.Drawing.Point(84, 360);
this.btnSaveParam.Name = "btnSaveParam"; this.buttonE.Name = "buttonE";
this.btnSaveParam.Size = new System.Drawing.Size(126, 40); this.buttonE.Size = new System.Drawing.Size(133, 50);
this.btnSaveParam.TabIndex = 286; this.buttonE.TabIndex = 303;
this.btnSaveParam.Text = "确认并保存"; this.buttonE.Text = "算法E";
this.btnSaveParam.UseVisualStyleBackColor = false; this.buttonE.UseVisualStyleBackColor = false;
// this.buttonE.Click += new System.EventHandler(this.buttonE_Click);
// pictureBox1 //
// // lblCountInfo
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; //
this.pictureBox1.Location = new System.Drawing.Point(42, 15); this.lblCountInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.Name = "pictureBox1"; this.lblCountInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pictureBox1.Size = new System.Drawing.Size(134, 65); this.lblCountInfo.Location = new System.Drawing.Point(791, 699);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.lblCountInfo.Name = "lblCountInfo";
this.pictureBox1.TabIndex = 287; this.lblCountInfo.Size = new System.Drawing.Size(166, 18);
this.pictureBox1.TabStop = false; this.lblCountInfo.TabIndex = 299;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); this.lblCountInfo.Text = "第1张/共10张";
// this.lblCountInfo.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// pictureBox2 //
// // lblFolder
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; //
this.pictureBox2.Location = new System.Drawing.Point(182, 15); this.lblFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pictureBox2.Name = "pictureBox2"; this.lblFolder.AutoSize = true;
this.pictureBox2.Size = new System.Drawing.Size(134, 65); this.lblFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.lblFolder.Location = new System.Drawing.Point(7, 699);
this.pictureBox2.TabIndex = 288; this.lblFolder.Name = "lblFolder";
this.pictureBox2.TabStop = false; this.lblFolder.Size = new System.Drawing.Size(80, 17);
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click); this.lblFolder.TabIndex = 300;
// this.lblFolder.Text = "当前文件夹:";
// pictureBox3 this.lblFolder.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; // lblImgeInfo
this.pictureBox3.Location = new System.Drawing.Point(322, 15); //
this.pictureBox3.Name = "pictureBox3"; this.lblImgeInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pictureBox3.Size = new System.Drawing.Size(134, 65); this.lblImgeInfo.AutoSize = true;
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.lblImgeInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pictureBox3.TabIndex = 289; this.lblImgeInfo.Location = new System.Drawing.Point(414, 701);
this.pictureBox3.TabStop = false; this.lblImgeInfo.Name = "lblImgeInfo";
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click); this.lblImgeInfo.Size = new System.Drawing.Size(54, 17);
// this.lblImgeInfo.TabIndex = 301;
// pictureBox4 this.lblImgeInfo.Text = "Zoom:";
// this.lblImgeInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
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 // FrmLearning
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1196, 637); this.ClientSize = new System.Drawing.Size(1344, 729);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnEnd);
this.Controls.Add(this.btnNext);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FrmLearning"; this.Name = "FrmLearning";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "元器件种类学习"; this.Text = "元器件种类学习";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmLearning_FormClosing);
this.Load += new System.EventHandler(this.FrmLearning_Load); this.Load += new System.EventHandler(this.FrmLearning_Load);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numWSize)).EndInit();
this.groupBox3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numTh)).EndInit();
this.groupBox3.PerformLayout(); this.groupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.groupBox4.PerformLayout();
((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); this.ResumeLayout(false);
} }
...@@ -404,29 +342,24 @@ ...@@ -404,29 +342,24 @@
#endregion #endregion
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblCurrTray;
private System.Windows.Forms.Label lblPnInfo; private System.Windows.Forms.Label lblPnInfo;
private System.Windows.Forms.GroupBox groupBox2;
private Acc.ImageBox.ImageBox imgCurrImg; private Acc.ImageBox.ImageBox imgCurrImg;
private Acc.ImageBox.ImageBox imageBox1;
private System.Windows.Forms.Button btnTest; private System.Windows.Forms.Button btnTest;
private Acc.ImageBox.ImageBox imageBox5; private System.Windows.Forms.Button btnEnd;
private Acc.ImageBox.ImageBox imageBox4; private System.Windows.Forms.NumericUpDown numWSize;
private Acc.ImageBox.ImageBox imageBox3; private System.Windows.Forms.Label label3;
private Acc.ImageBox.ImageBox imageBox2; private System.Windows.Forms.NumericUpDown numTh;
private Acc.ImageBox.ImageBox imageBox0; private System.Windows.Forms.Label label1;
private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.RadioButton radioButton2; private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.RadioButton radioButton3; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.RadioButton radioButton4; private System.Windows.Forms.Button buttonE;
private System.Windows.Forms.RadioButton radioButton5; private System.Windows.Forms.Button buttonD;
private System.Windows.Forms.RadioButton radioButton0; private System.Windows.Forms.Button buttonC;
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Button buttonB;
private System.Windows.Forms.Button btnSaveParam; private System.Windows.Forms.Button buttonA;
private System.Windows.Forms.PictureBox pictureBox5; private System.Windows.Forms.Label lblCountInfo;
private System.Windows.Forms.PictureBox pictureBox4; private System.Windows.Forms.Label lblFolder;
private System.Windows.Forms.PictureBox pictureBox3; private System.Windows.Forms.Label lblImgeInfo;
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 Acc.ImageBox;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -20,87 +23,143 @@ namespace OnlineStore.AutoCountClient ...@@ -20,87 +23,143 @@ namespace OnlineStore.AutoCountClient
} }
private ImageBox currShowBox = null; private ImageBox currShowBox = null;
private int CurrType = -1; private int CurrType = -1;
private bool IsCanSel = false;
private string CurrFullFileName = ""; private string CurrFullFileName = "";
private string CurrPN = ""; private string CurrPN = "";
internal string ImagePath = ParamManager.NoConfigPath;
private List<Button> SelBtnList = new List<Button>();
private string gouStr = "✔ ";
private void FrmLearning_Load(object sender, EventArgs e) private void FrmLearning_Load(object sender, EventArgs e)
{ {
imageBox0.Image = XRayLearnManager.modelImg_0; SelBtnList.Add(buttonA);
imageBox1.Image = XRayLearnManager.modelImg_1; SelBtnList.Add(buttonB);
imageBox2.Image = XRayLearnManager.modelImg_2; SelBtnList.Add(buttonC);
imageBox3.Image = XRayLearnManager.modelImg_3; SelBtnList.Add(buttonD);
imageBox4.Image = XRayLearnManager.modelImg_4; SelBtnList.Add(buttonE);
imageBox5.Image = XRayLearnManager.modelImg_5; foreach(Button btn in SelBtnList)
{
pictureBox1.Image = XRayLearnManager.smodelImg_1; btn.Tag = btn.Text;
pictureBox2.Image = XRayLearnManager.smodelImg_2; }
pictureBox3.Image = XRayLearnManager.smodelImg_3; LoadImgList();
pictureBox4.Image = XRayLearnManager.smodelImg_4; }
pictureBox5.Image = XRayLearnManager.smodelImg_5;
imageBox0.Text = "未找到元器件类型"; private List<string> ImageList = new List<string>();
imageBox1.Text = "小器件"; private int currIndex = -1;
imageBox2.Text = "大器件"; private void LoadImgList()
imageBox3.Text = "异形三角器件"; {
imageBox4.Text = "异形三脚大器件"; if (!Directory.Exists(ImagePath))
imageBox5.Text = "异形长条形器件"; {
ChangeImage(imageBox0); MessageBox.Show("未找到文件夹:" + ImagePath);
this.Close();
} }
string[] fileList = Directory.GetFiles(ImagePath);
lblFolder.Text = "当前文件夹:" + ImagePath;
List<string> list = (from m in fileList orderby m ascending select m).ToList();
public void UpdateCurrImg(string fullFName) foreach (string f in list)
{ {
string houzhui = Path.GetExtension(f);
if (houzhui.Equals(".png"))
{
ImageList.Add(f);
}
}
string testFile = Application.StartupPath + "\\XRAY\\model\\8D.03906.H11-R515232020062200253-20200812181219.png"; if (ImageList.Count <= 0)
{
MessageBox.Show("未找到有效图片");
this.Close();
} }
currIndex = -1;
ShowNextImg();
timer1_Tick(null, null);
}
private void ChangeSelStatus(bool iscanSel) public void ShowNextImg()
{ {
this.IsCanSel = iscanSel; currIndex++;
ChangeImage(imageBox0, 0, ""); if (currIndex >= ImageList.Count)
groupBox3.Visible = iscanSel; {
btnNext.Enabled = false;
MessageBox.Show("已经是最后一张图片");
return;
} }
string fullFName = ImageList[currIndex];
string filename = Path.GetFileNameWithoutExtension(fullFName);
private bool ChangeImage(ImageBox showImg, int type = 0, string text = "")
{ string[] array = filename.Split('-');
if (CurrType.Equals(type)) if (array.Length >= 3)
{ {
return true; CurrPN = array[0];
} }
CurrType = type; groupBox4.Text = "[" + CurrPN + "] 请选择参数:";
if (currShowBox == null) CurrFullFileName = fullFName;
lblPnInfo.Text = fullFName;
imgCurrImg.Image = KiLighten((Bitmap)ParamManager.FormImage(fullFName), 80);
int winHeight = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
int winWidth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
imgCurrImg.Zoom = winWidth* 40 /1300;
CountParam p = ParamManager.GetOptimalParamByPN(CurrPN);
if (p != null)
{ {
imageBox0.Visible = false; numTh.Value = p.Threshold;
imageBox1.Visible = false; numWSize.Value = p.WindowSize;
imageBox2.Visible = false; ShowType(p.Sign);
imageBox3.Visible = false;
imageBox4.Visible = false;
imageBox5.Visible = false;
} }
else else
{ {
currShowBox.Visible = false; ShowType(0);
} }
showImg.Visible = true; imgCurrImg.HorizontalScroll.Value = 173;
currShowBox = showImg;
if (text.Equals("")) if (currIndex >= ImageList.Count - 1)
{
btnNext.Enabled = false;
}
timer1.Start();
}
private void ShowType(int type)
{
if (CurrType.Equals(type))
{ {
btnTest.Visible = false; return;
}
CurrType = type;
int index = 1;
btnTest.Text = "请选择算法";
foreach (Button btn in SelBtnList)
{
if (index.Equals(type))
{
btn.Text = gouStr + btn.Tag;
btnTest.Text = btn.Tag + "-点料测试";
btn.BackColor = Color.LightGreen;
} }
else else
{ {
btnTest.Text = "使用[" + text + "]模板点料测试"; btn.Text = btn.Tag.ToString();
btnTest.Visible = true; btn.BackColor = Color.White;
} }
return true; index++;
} }
bool isShowBtn = (type > 0);
btnTest.Enabled = isShowBtn;
btnNext.Enabled = isShowBtn;
btnEnd.Enabled = isShowBtn;
}
private void btnTest_Click(object sender, EventArgs e) private void btnTest_Click(object sender, EventArgs e)
{ {
...@@ -110,64 +169,157 @@ namespace OnlineStore.AutoCountClient ...@@ -110,64 +169,157 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show("未加载图片,无法点料"); MessageBox.Show("未加载图片,无法点料");
return; return;
} }
LogUtil.info( Name + "用户点击 "+btnTest.Text);
try
{
btnTest.Enabled = false;
int th = (int)numTh.Value;
int wsize = (int)numWSize.Value;
Asa.API.EyemImage tpDstImg;
CountParam param = new CountParam("", th, wsize, CurrType);
int outCount = RobotManager.robot.XrayBean.GetCountResult(CurrFullFileName, param, out tpDstImg);
btnTest.Text +=" 结果:"+ outCount.ToString();
LogUtil.info( "用户点击 "+ btnTest.Text + "【" + CurrFullFileName + "】【" + th + "】【" + wsize + "】 结果:" + outCount);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
LogUtil.error("点料测试出错:" + ex.ToString());
}
btnTest.Enabled = true;
} }
private void radioButton0_CheckedChanged(object sender, EventArgs e)
private void timer1_Tick(object sender, EventArgs e)
{ {
ChangeImage(imageBox0, 0); if (this.Visible.Equals(false))
{
return;
} }
lblFolder.Text = "当前文件夹:" + ImagePath;
lblCountInfo.Text = " 第" + (currIndex + 1) + "张 / 共" + ImageList.Count + "张 ";
lblImgeInfo.Text = "Zoom:"+imgCurrImg.Zoom + ";" + imgCurrImg.HorizontalScroll.Value + ";" + imgCurrImg.VerticalScroll.Value;
}
private void SaveCurrParam()
{
int th = (int)numTh.Value;
int wsize = (int)numWSize.Value;
CountParam p = new CountParam(CurrPN, th, wsize, CurrType, 0);
private void radioButton1_CheckedChanged(object sender, EventArgs e) ParamManager.UpdateParam(p);
}
private bool IsSave = false;
private void btnSaveParam_Click(object sender, EventArgs e)
{ {
ChangeImage(imageBox1, 1, radioButton1.Text); ParamManager.SaveMapToFile();
IsSave = true;
this.Close();
} }
private void radioButton2_CheckedChanged(object sender, EventArgs e) private void btnNext_Click(object sender, EventArgs e)
{ {
ChangeImage(imageBox2, 2, radioButton2.Text); SaveCurrParam();
ShowNextImg();
} }
private void radioButton3_CheckedChanged(object sender, EventArgs e) private void btnCancel_Click(object sender, EventArgs e)
{ {
ChangeImage(imageBox3, 3, radioButton3.Text); this.Close();
} }
private void radioButton4_CheckedChanged(object sender, EventArgs e) private void FrmLearning_FormClosing(object sender, FormClosingEventArgs e)
{ {
ChangeImage(imageBox4, 4, radioButton4.Text); if (!IsSave)
{
DialogResult result = MessageBox.Show("是否保存参数更改?", "确认是否保存", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);
if (result.Equals(DialogResult.Yes))
{
SaveCurrParam();
ShowNextImg();
}
else
{
LogUtil.info("关闭界面时取消了 保存参数更改");
}
}
} }
private void radioButton5_CheckedChanged(object sender, EventArgs e) public static Bitmap KiLighten(Bitmap b, int degree)
{ {
ChangeImage(imageBox5, 5, radioButton5.Text); if (b == null)
{
return null;
} }
if (degree < -255) degree = -255;
if (degree > 255) degree = 255;
private void pictureBox1_Click(object sender, EventArgs e) try
{ {
radioButton1.Checked = true;
}
private void pictureBox2_Click(object sender, EventArgs e) int width = b.Width;
int height = b.Height;
int pix = 0;
BitmapData data = b.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
unsafe
{
byte* p = (byte*)data.Scan0;
int offset = data.Stride - width * 3;
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{ {
radioButton2.Checked = true; // 处理指定位置像素的亮度
for (int i = 0; i < 3; i++)
{
pix = p[i] + degree;
if (degree < 0) p[i] = (byte)Math.Max(0, pix);
if (degree > 0) p[i] = (byte)Math.Min(255, pix);
} // i
p += 3;
} // x
p += offset;
} // y
} }
private void pictureBox3_Click(object sender, EventArgs e) b.UnlockBits(data);
return b;
}
catch
{ {
radioButton3.Checked = true; return null;
} }
private void pictureBox4_Click(object sender, EventArgs e) } // end of Lighten
private void buttonA_Click(object sender, EventArgs e)
{ {
radioButton4.Checked = true; ShowType(1);
} }
private void buttonB_Click(object sender, EventArgs e)
private void pictureBox5_Click(object sender, EventArgs e) {
ShowType(2);
}
private void buttonC_Click(object sender, EventArgs e)
{
ShowType(3);
}
private void buttonD_Click(object sender, EventArgs e)
{
ShowType(4);
}
private void buttonE_Click(object sender, EventArgs e)
{ {
radioButton5.Checked = true; ShowType(5);
} }
} }
} }
...@@ -117,4 +117,7 @@ ...@@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
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.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);
...@@ -59,6 +57,8 @@ ...@@ -59,6 +57,8 @@
this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.设置TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.设置TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.元器件学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
...@@ -82,17 +82,17 @@ ...@@ -82,17 +82,17 @@
this.开机自动启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.开机自动启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.启用X射线点料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.启用X射线点料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
this.aGVCancelStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aGVCancelStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lblXrayWork = new System.Windows.Forms.Label(); this.lblXrayWork = new System.Windows.Forms.Label();
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.panWork.SuspendLayout(); this.panWork.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPage2.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -103,7 +103,6 @@ ...@@ -103,7 +103,6 @@
| 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);
...@@ -212,25 +211,6 @@ ...@@ -212,25 +211,6 @@
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;
...@@ -365,6 +345,8 @@ ...@@ -365,6 +345,8 @@
// 设置TToolStripMenuItem // 设置TToolStripMenuItem
// //
this.设置TToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.设置TToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.元器件学习ToolStripMenuItem,
this.toolStripSeparator16,
this.二维码学习ToolStripMenuItem, this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7, this.toolStripSeparator7,
this.toolStripMenuItem2, this.toolStripMenuItem2,
...@@ -374,34 +356,46 @@ ...@@ -374,34 +356,46 @@
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25); this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 "; this.设置TToolStripMenuItem.Text = "设备调试 ";
// //
// 元器件学习ToolStripMenuItem
//
this.元器件学习ToolStripMenuItem.Name = "元器件学习ToolStripMenuItem";
this.元器件学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.元器件学习ToolStripMenuItem.Text = "元器件学习";
this.元器件学习ToolStripMenuItem.Click += new System.EventHandler(this.元器件学习ToolStripMenuItem_Click);
//
// toolStripSeparator16
//
this.toolStripSeparator16.Name = "toolStripSeparator16";
this.toolStripSeparator16.Size = new System.Drawing.Size(177, 6);
//
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 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(157, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(160, 26); this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 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(157, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
// //
// 标签编辑ToolStripMenuItem // 标签编辑ToolStripMenuItem
// //
this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem"; this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem";
this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(160, 26); this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(180, 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);
// //
...@@ -548,12 +542,10 @@ ...@@ -548,12 +542,10 @@
this.启用X射线点料ToolStripMenuItem.Text = "✔ 启用X射线点料"; this.启用X射线点料ToolStripMenuItem.Text = "✔ 启用X射线点料";
this.启用X射线点料ToolStripMenuItem.Click += new System.EventHandler(this.启用X射线点料ToolStripMenuItem_Click); this.启用X射线点料ToolStripMenuItem.Click += new System.EventHandler(this.启用X射线点料ToolStripMenuItem_Click);
// //
// 启用蜂鸣器ToolStripMenuItem // toolStripSeparator15
// //
this.启用蜂鸣器ToolStripMenuItem.Name = "启用蜂鸣器ToolStripMenuItem"; this.toolStripSeparator15.Name = "toolStripSeparator15";
this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(213, 26); this.toolStripSeparator15.Size = new System.Drawing.Size(210, 6);
this.启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
this.启用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.启用蜂鸣器ToolStripMenuItem_Click);
// //
// aGVCancelStateToolStripMenuItem // aGVCancelStateToolStripMenuItem
// //
...@@ -567,6 +559,13 @@ ...@@ -567,6 +559,13 @@
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(210, 6); this.toolStripSeparator13.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);
//
// lblXrayWork // lblXrayWork
// //
this.lblXrayWork.AutoSize = true; this.lblXrayWork.AutoSize = true;
...@@ -579,11 +578,6 @@ ...@@ -579,11 +578,6 @@
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;
...@@ -610,7 +604,6 @@ ...@@ -610,7 +604,6 @@
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.tabPage2.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
...@@ -669,8 +662,6 @@ ...@@ -669,8 +662,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
private System.Windows.Forms.ToolStripMenuItem aGVCancelStateToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aGVCancelStateToolStripMenuItem;
private System.Windows.Forms.Panel panWork; 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.ToolStripMenuItem 正常工作模式ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 正常工作模式ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
...@@ -678,6 +669,9 @@ ...@@ -678,6 +669,9 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15; private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripMenuItem 启用蜂鸣器ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 启用蜂鸣器ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 元器件学习ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
} }
} }
...@@ -10,6 +10,7 @@ using System.ComponentModel; ...@@ -10,6 +10,7 @@ using System.ComponentModel;
using System.Data; using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
...@@ -44,7 +45,7 @@ namespace OnlineStore.AutoCountClient ...@@ -44,7 +45,7 @@ namespace OnlineStore.AutoCountClient
{ {
Application.Exit(); Application.Exit();
} }
// AddLearnForm(); //AddLearnForm();
FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip); FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip);
AddForm(" " + robot.inputEquip.Name + " ", frm1); AddForm(" " + robot.inputEquip.Name + " ", frm1);
...@@ -78,16 +79,16 @@ namespace OnlineStore.AutoCountClient ...@@ -78,16 +79,16 @@ namespace OnlineStore.AutoCountClient
tabPageList.Add(lineTabPage); tabPageList.Add(lineTabPage);
tabControl1.Controls.Add(lineTabPage); tabControl1.Controls.Add(lineTabPage);
} }
private void AddLearnForm( ) //private void AddLearnForm( )
{ //{
frmLearn = new FrmLearning(); // frmLearn = new FrmLearning();
frmLearn.FormBorderStyle = FormBorderStyle.None; // frmLearn.FormBorderStyle = FormBorderStyle.None;
frmLearn.TopLevel = false; // frmLearn.TopLevel = false;
frmLearn.Dock = DockStyle.Fill; // frmLearn.Dock = DockStyle.Fill;
frmLearn.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left))); // frmLearn.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
panLearn.Controls.Add(frmLearn); // panLearn.Controls.Add(frmLearn);
frmLearn.Show(); // 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";
...@@ -103,7 +104,7 @@ namespace OnlineStore.AutoCountClient ...@@ -103,7 +104,7 @@ 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);
if(autoValue.Equals(1)) if (autoValue.Equals(1))
{ {
开机自动启动ToolStripMenuItem.Text = gouStr + " 开机自动启动"; 开机自动启动ToolStripMenuItem.Text = gouStr + " 开机自动启动";
} }
...@@ -115,7 +116,7 @@ namespace OnlineStore.AutoCountClient ...@@ -115,7 +116,7 @@ namespace OnlineStore.AutoCountClient
LoadListView(); LoadListView();
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
LoadOk = true; LoadOk = true;
tabPage2.Parent = null; //tabPage2.Parent = null;
// HideForm(); // HideForm();
timer1.Start(); timer1.Start();
} }
...@@ -524,7 +525,7 @@ namespace OnlineStore.AutoCountClient ...@@ -524,7 +525,7 @@ namespace OnlineStore.AutoCountClient
} }
} }
SetItemText(i, item_move_info_index, trayInfo); SetItemText(i, item_move_info_index, trayInfo);
SetItemColor(i, s , equip.alarmType); SetItemColor(i, s, equip.alarmType);
i++; i++;
} }
...@@ -609,7 +610,7 @@ namespace OnlineStore.AutoCountClient ...@@ -609,7 +610,7 @@ 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) } catch (Exception ex)
{ {
LogUtil.error("tabControl1_DrawItem: " + ex.ToString()); LogUtil.error("tabControl1_DrawItem: " + ex.ToString());
} }
...@@ -763,7 +764,7 @@ namespace OnlineStore.AutoCountClient ...@@ -763,7 +764,7 @@ namespace OnlineStore.AutoCountClient
{ {
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 1); ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 1);
ManagerUtil.AutoRun(Application.ExecutablePath, true); ManagerUtil.AutoRun(Application.ExecutablePath, true);
开机自动启动ToolStripMenuItem.Text = gouStr+"开机自动启动"; 开机自动启动ToolStripMenuItem.Text = gouStr + "开机自动启动";
} }
LogUtil.info(Name + " 点击:" + 开机自动启动ToolStripMenuItem.Text); LogUtil.info(Name + " 点击:" + 开机自动启动ToolStripMenuItem.Text);
} }
...@@ -844,41 +845,59 @@ namespace OnlineStore.AutoCountClient ...@@ -844,41 +845,59 @@ namespace OnlineStore.AutoCountClient
private void 正常工作模式ToolStripMenuItem_Click(object sender, EventArgs e) private void 正常工作模式ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!XRayLearnManager.InLearnMode) //if (!XRayLearnManager.InLearnMode)
{ //{
正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式"; // 正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式";
元器件学习模式ToolStripMenuItem.Text = "元器件学习模式"; // 元器件学习模式ToolStripMenuItem.Text = "元器件学习模式";
return; // return;
} //}
LogUtil.info(Name + " 点击:" + 正常工作模式ToolStripMenuItem.Text+ ",设置InLearnMode = false"); //LogUtil.info(Name + " 点击:" + 正常工作模式ToolStripMenuItem.Text + ",设置InLearnMode = false");
XRayLearnManager.InLearnMode = false; //XRayLearnManager.InLearnMode = false;
正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式"; //正常工作模式ToolStripMenuItem.Text = gouStr + " 正常工作模式";
元器件学习模式ToolStripMenuItem.Text ="元器件学习模式"; //元器件学习模式ToolStripMenuItem.Text = "元器件学习模式";
tabPage2.Parent = null; // tabPage2.Parent = null;
tabControl1.TabPages.Insert(0,tabPage1); //tabControl1.TabPages.Insert(0, tabPage1);
tabControl1.SelectedIndex = 0; //tabControl1.SelectedIndex = 0;
//tabPage1.Parent = tabControl1; //tabPage1.Parent = tabControl1;
} }
private void 元器件学习模式ToolStripMenuItem_Click(object sender, EventArgs e) private void 元器件学习模式ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (XRayLearnManager.InLearnMode) //if (XRayLearnManager.InLearnMode)
{ //{
正常工作模式ToolStripMenuItem.Text = "正常工作模式"; // 正常工作模式ToolStripMenuItem.Text = "正常工作模式";
元器件学习模式ToolStripMenuItem.Text = gouStr + " 元器件学习模式"; // 元器件学习模式ToolStripMenuItem.Text = gouStr + " 元器件学习模式";
return; // 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;
} }
LogUtil.info(Name + " 点击:" + 元器件学习模式ToolStripMenuItem.Text + ",设置InLearnMode = true ");
XRayLearnManager.InLearnMode = true;
正常工作模式ToolStripMenuItem.Text = "正常工作模式";
元器件学习模式ToolStripMenuItem.Text = gouStr + " 元器件学习模式";
tabPage1.Parent = null; private void 元器件学习ToolStripMenuItem_Click(object sender, EventArgs e)
tabControl1.TabPages.Insert(0, tabPage2); {
tabControl1.SelectedIndex = 0; string backPath = ParamManager.NoConfigPath;
//tabPage2.Parent = tabControl1;
if (!Directory.Exists(backPath))
{
Directory.CreateDirectory(backPath);
}
folderBrowserDialog1.SelectedPath = backPath;
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result.Equals(DialogResult.OK))
{
string folder = folderBrowserDialog1.SelectedPath;
FrmLearning frm = new FrmLearning();
frm.ImagePath = folder;
frm.ShowDialog();
}
} }
} }
} }
...@@ -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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>510, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>43</value> <value>43</value>
</metadata> </metadata>
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
<Compile Include="bean\BatchMoveBean_Partial.cs" /> <Compile Include="bean\BatchMoveBean_Partial.cs" />
<Compile Include="bean\BatchMoveBean.cs" /> <Compile Include="bean\BatchMoveBean.cs" />
<Compile Include="bean\OutputEquip_Shelf.cs" /> <Compile Include="bean\OutputEquip_Shelf.cs" />
<Compile Include="manager\ParamManager.cs" />
<Compile Include="manager\RobotManager.cs" /> <Compile Include="manager\RobotManager.cs" />
<Compile Include="bean\OutputEquip_Partial.cs" /> <Compile Include="bean\OutputEquip_Partial.cs" />
<Compile Include="bean\InputEquip_InStore.cs" /> <Compile Include="bean\InputEquip_InStore.cs" />
...@@ -105,7 +106,6 @@ ...@@ -105,7 +106,6 @@
<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" />
...@@ -146,39 +146,6 @@ ...@@ -146,39 +146,6 @@
<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>
...@@ -215,6 +182,7 @@ ...@@ -215,6 +182,7 @@
<None Include="XRAY\countParam.csv"> <None Include="XRAY\countParam.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="XRAY\pnDetailedList.csv" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
...@@ -9,7 +9,6 @@ type,sign,value,threshold,windowSize ...@@ -9,7 +9,6 @@ type,sign,value,threshold,windowSize
6C1D1,0,0,0,0 6C1D1,0,0,0,0
6C1H1,0,0,0,0 6C1H1,0,0,0,0
6CEH1,0,0,0,0 6CEH1,0,0,0,0
6C1D1,0,0,0,0
6D551,0,0,0,0 6D551,0,0,0,0
7H1F1,0,0,0,0 7H1F1,0,0,0,0
7H2F1,0,0,0,0 7H2F1,0,0,0,0
...@@ -30,3 +29,15 @@ type,sign,value,threshold,windowSize ...@@ -30,3 +29,15 @@ type,sign,value,threshold,windowSize
6J121,0,0,0,0 6J121,0,0,0,0
6J161,0,0,0,0 6J161,0,0,0,0
6J181,0,0,0,0 6J181,0,0,0,0
6C.47238.1H1,1,0,30,3
6D.10005.6D1,4,0,30,3
6D.10015.6D1,2,0,30,3
6D.15825.6D1,1,0,30,3
6D.93125.6D1,5,0,30,3
6D.R0005.551,1,0,30,3
6D.R0005.6D1,2,0,30,3
6H.47060.0R2,1,0,30,3
6J.42001.091,1,0,30,3
7H.10222.5F1,2,0,30,3
7H.10521.5F1,1,0,30,3
7H.10613.5B1,1,0,30,3

11.3 KB | 宽: | 高:

9.8 KB | 宽: | 高:

RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/1.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/1.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/1.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/1.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

11.6 KB | 宽: | 高:

54.5 KB | 宽: | 高:

RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/2.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/2.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/2.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/2.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

9.6 KB | 宽: | 高:

63.8 KB | 宽: | 高:

RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/3.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/3.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/3.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/3.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

15.6 KB | 宽: | 高:

64.3 KB | 宽: | 高:

RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/4.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/4.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/4.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/4.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

11.2 KB | 宽: | 高:

47.5 KB | 宽: | 高:

RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/5.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/5.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/5.png
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/model/smallmodel/5.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
...@@ -39,7 +39,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,7 +39,6 @@ namespace OnlineStore.DeviceLibrary
private string path2_out = Application.StartupPath + @"\XRAY\out\"; private string path2_out = Application.StartupPath + @"\XRAY\out\";
//private string path3_area = Application.StartupPath + @"\XRAY\area.txt"; //private string path3_area = Application.StartupPath + @"\XRAY\area.txt";
private Dictionary<string, CountParam> countParamMap = new Dictionary<string, CountParam>();
public X_RAY_Equip(string cid, XRay_Config config) public X_RAY_Equip(string cid, XRay_Config config)
{ {
...@@ -93,7 +92,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
{ {
System.IO.Directory.CreateDirectory(path2_out); System.IO.Directory.CreateDirectory(path2_out);
} }
LoadParamMap(); ParamManager.Init();
ResultMinCount = ConfigAppSettings.GetIntValue(Setting_Init.ResultMinCount); ResultMinCount = ConfigAppSettings.GetIntValue(Setting_Init.ResultMinCount);
if (ResultMinCount <= 0) if (ResultMinCount <= 0)
{ {
...@@ -360,92 +359,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -360,92 +359,9 @@ namespace OnlineStore.DeviceLibrary
return msg; return msg;
} }
private void LoadParamMap()
{
countParamMap = new Dictionary<string, CountParam>();
string configPath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.CounParamConfig);
if (File.Exists(configPath))
{
try
{
string[] lines = File.ReadAllLines(configPath);
int index = -1;
foreach (string line in lines)
{
index++;
if (index.Equals(0))
{
continue;
}
CountParam param = CountParam.NewParam(line);
if (param != null)
{
if (!countParamMap.ContainsKey(param.PN))
{
countParamMap.Add(param.PN, param);
}
}
}
}
catch (Exception ex)
{
LogUtil.error("解析点料配置文件【" + configPath + "】出错:" + ex.ToString());
}
LogUtil.info("加载点料参数共【" + countParamMap.Count + "】条有效数据" + configPath);
}
else
{
LogUtil.error("未找到点料参数文件:" + configPath);
}
}
} }
public class CountParam
{
public CountParam(string pn="", int th=0, int size=0,int sign=0,int value=0)
{
this.PN = pn;
this.Threshold = th;
this.WindowSize = size;
this.Sign = sign;
this.Value = value;
}
public string PN = "";
public int Threshold = 0;
public int WindowSize = 0;
public string AreaValue = "";
public int Sign = 0;
public int Value = 0;
public string ToStr()
{
return "【PN=" + PN + ",sign=" + Sign + ",value=" + Value + ",th=" + Threshold + ",wsize=" + WindowSize+"】";
}
internal static CountParam NewParam(string line)
{
try
{
string[] array = line.Split(',');
if (array.Length >= 5)
{
string pn = array[0].Trim();
int sign = Convert.ToInt32(array[1].Trim());
int value = Convert.ToInt32(array[2].Trim());
int th = Convert.ToInt32(array[3].Trim());
int size = Convert.ToInt32(array[4].Trim());
return new CountParam(pn, th, size,sign,value);
}
}
catch (Exception ex)
{
}
return null;
}
}
} }
...@@ -347,7 +347,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,7 +347,7 @@ namespace OnlineStore.DeviceLibrary
bool isNg = false; bool isNg = false;
string NgMsg = ""; string NgMsg = "";
int count = 0; int count = 0;
CountParam lastParam = UpdateParamByPN(Work_ReelInfo.WareCode); CountParam lastParam = ParamManager.GetParamByCode(Work_ReelInfo.WareCode);
if (lastParam != null) if (lastParam != null)
{ {
string fileP = path1_tif + @"\" + lastFileName; string fileP = path1_tif + @"\" + lastFileName;
...@@ -378,8 +378,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -378,8 +378,9 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
isNg = true; isNg = true;
NgMsg = "NG:未找到元器件类型,PN[" + GetCodeStrPN(Work_ReelInfo.WareCode) + "]"; NgMsg = "NG:未找到元器件类型,PN[" +ParamManager. GetCodeStrPN(Work_ReelInfo.WareCode) + "]";
WorkLog("点料:" + NgMsg); WorkLog("点料:" + NgMsg);
BackNoConfigImg();
} }
string outF = path2_out + lastFileName; string outF = path2_out + lastFileName;
...@@ -507,31 +508,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -507,31 +508,6 @@ namespace OnlineStore.DeviceLibrary
} }
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)
{
string[] codeArray = codeStr.Split(';');
if (codeArray.Length.Equals(2))
{
string pn = codeArray[0];
return pn;
}
return "";
}
private void ClearFilePath() private void ClearFilePath()
{ {
try try
...@@ -556,6 +532,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -556,6 +532,28 @@ namespace OnlineStore.DeviceLibrary
} }
private void BackNoConfigImg()
{
//将未找到料号配置的图片保存到新的文件夹
string fileP = path1_tif + @"\" + lastFileName;
string backPath = ParamManager.NoConfigPath ;
string backFile = backPath + lastFileName;
try
{
if (!Directory.Exists(backPath))
{
Directory.CreateDirectory(backPath);
}
System.IO.File.Copy(fileP, backFile);
LogUtil.info("BackNoConfigImg 【" + fileP + "】 -> 【" + backFile + "】");
}
catch (Exception ex)
{
LogUtil.error("X图片备份到【" + backFile + "】错误:" + ex.ToString());
}
}
public int GetCountResult(string fileP, CountParam param,out Asa.API.EyemImage tpDstImg) public int GetCountResult(string fileP, CountParam param,out Asa.API.EyemImage tpDstImg)
{ {
......
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class ParamManager{
public static string NoConfigPath = @"D:\NoConfigImg\";
private static Dictionary<string, CountParam> countParamMap = new Dictionary<string, CountParam>();
private static string ConfigFilePath = "";
internal static void Init()
{
ConfigFilePath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.CounParamConfig);
countParamMap = LoadParamMap( );
}
public static CountParam GetParamByPN(string pn)
{
if (countParamMap.ContainsKey(pn))
{
CountParam lastParam = countParamMap[pn];
LogUtil.debug("【" + pn + "】使用参数 " + lastParam.ToStr() + " ");
return lastParam;
}
return null;
}
public static CountParam GetParamByCode(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;
}
internal static string GetCodeStrPN(string codeStr)
{
string[] codeArray = codeStr.Split(';');
if (codeArray.Length.Equals(2))
{
string pn = codeArray[0];
return pn;
}
return "";
}
private static List<CountParam> ErrPnParamList = new List<CountParam>();
public static void AddErrPNParam(CountParam errParam)
{
}
public static void UpdateParam(CountParam param)
{
try
{
if (countParamMap.ContainsKey(param.PN))
{
countParamMap[param.PN] = param;
}
else
{
countParamMap.Add(param.PN, param);
}
LogUtil.info("UpdateParam 【" + param.ToStr() + "】");
}
catch (Exception ex)
{
LogUtil.error("UpdateParam 出错:" + ex.ToString());
}
}
public static void SaveMapToFile()
{
try
{
List<CountParam> pList = new List<CountParam>(countParamMap.Values);
int length = pList.Count + 1;
List<string> lineList = new List<string>();
lineList.Add(CountParam.GetCSVTitle());
foreach (CountParam p in pList)
{
lineList.Add(p.ToCSVStr());
}
File.WriteAllLines(ConfigFilePath, lineList);
LogUtil.info("SaveMapToFile 【" + ConfigFilePath + "】");
}
catch (Exception ex)
{
LogUtil.error("SaveMapToFile 出错:" + ex.ToString());
}
}
internal static Dictionary<string, CountParam> LoadParamMap( )
{
Dictionary<string, CountParam> countParamMap = new Dictionary<string, CountParam>();
if (File.Exists(ConfigFilePath))
{
try
{
string[] lines = File.ReadAllLines(ConfigFilePath);
int index = -1;
foreach (string line in lines)
{
index++;
if (index.Equals(0))
{
continue;
}
CountParam param = CountParam.NewParam(line);
if (param != null)
{
if (!countParamMap.ContainsKey(param.PN))
{
countParamMap.Add(param.PN, param);
}
}
}
}
catch (Exception ex)
{
LogUtil.error("解析文件【" + ConfigFilePath + "】出错:" + ex.ToString());
}
LogUtil.info("加载点料参数共【" + countParamMap.Count + "】条有效数据" + ConfigFilePath);
}
else
{
LogUtil.error("未找到文件:" + ConfigFilePath);
}
return countParamMap;
}
/// <summary>
/// 获取最优算法
/// </summary>
/// <param name="currPN"></param>
/// <returns></returns>
public static CountParam GetOptimalParamByPN(string currPN)
{
CountParam param = GetParamByPN(currPN);
if (param == null)
{
//TODO
}
return param;
}
public static Image FormImage(string fileName)
{
try
{
Image img = Image.FromFile(fileName);
return img;
}
catch (Exception ex)
{
LogUtil.info(ex.ToString());
}
return null;
}
}
public class CountParam
{
public CountParam(string pn, int th = 0, int size = 0, int sign = 0, int value = 0)
{
this.PN = pn;
this.Threshold = th;
this.WindowSize = size;
this.Sign = sign;
this.Value = value;
}
public string PN = "";
public int Threshold = 0;
public int WindowSize = 0;
public string AreaValue = "";
public int Sign = 0;
public int Value = 0;
public string ToStr()
{
return "【PN=" + PN + ",sign=" + Sign + ",value=" + Value + ",th=" + Threshold + ",wsize=" + WindowSize + "】";
}
public string ToCSVStr()
{
//type,sign,value,threshold,windowSize
return PN + spilt + Sign + spilt + Value + spilt + Threshold + spilt + WindowSize;
}
private static char spilt = ',';
internal static CountParam NewParam(string line)
{
try
{
string[] array = line.Split(spilt);
if (array.Length >= 5)
{
string pn = array[0].Trim();
int sign = Convert.ToInt32(array[1].Trim());
int value = Convert.ToInt32(array[2].Trim());
int th = Convert.ToInt32(array[3].Trim());
int size = Convert.ToInt32(array[4].Trim());
return new CountParam(pn, th, size, sign, value);
}
}
catch (Exception ex)
{
}
return null;
}
internal static string GetCSVTitle()
{
return "type,sign,value,threshold,windowSize";
}
}
}
...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
// XRayLearnManager.Init(); //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 OnlineStore.Common;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
...@@ -40,10 +41,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -40,10 +41,10 @@ namespace OnlineStore.DeviceLibrary
IsInit = true; IsInit = true;
modelImg_0 = Image.FromFile(path + "\\0.jpg"); modelImg_0 = Image.FromFile(path + "\\0.jpg");
modelImg_1 = Image.FromFile(path + "\\1.png"); modelImg_1 = Image.FromFile(path + "\\1.png");
modelImg_2 = Image.FromFile(path + "\\2.jpg"); modelImg_2 = Image.FromFile(path + "\\2.png");
modelImg_3 = Image.FromFile(path + "\\3.jpg"); modelImg_3 = Image.FromFile(path + "\\3.png");
modelImg_4 = Image.FromFile(path + "\\4.jpg"); modelImg_4 = Image.FromFile(path + "\\4.png");
modelImg_5 = Image.FromFile(path + "\\5.jpg"); modelImg_5 = Image.FromFile(path + "\\5.png");
smodelImg_1 = Image.FromFile(path + "\\smallmodel\\1.png"); smodelImg_1 = Image.FromFile(path + "\\smallmodel\\1.png");
...@@ -57,9 +58,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -57,9 +58,10 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
Console.Write(ex.ToString()); LogUtil.info (ex.ToString());
} }
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!