1、解决因在debug目录下放置多余的dll导致反射时报错的问题

2、解决显示窗口滑动时,坐标及灰度值不实时更新的问题
3、解决模板匹配工具,模板图像不更新的问题
4、将各工具的生成位置改至主程序的debug目录下
This commit is contained in:
liu.wenjie
2022-10-26 15:55:48 +08:00
parent 900ea68f69
commit a5b6142bad
30 changed files with 1697 additions and 1600 deletions

Binary file not shown.

View File

@@ -84,6 +84,8 @@ namespace CaliperTool
/// 新的跟随姿态变化后的预期线信息
/// </summary>
HTuple newExpectRecStartRow = new HTuple(200), newExpectRecStartColumn = new HTuple(200), newExpectPhi = new HTuple(0);
[NonSerialized]
public HDrawingObject calibDrawObject = new HDrawingObject();
/// <summary>
/// 查找到的线的起点行坐标
/// </summary>
@@ -134,10 +136,6 @@ namespace CaliperTool
templatePose.Y = inputPose.Y;
templatePose.U = inputPose.U;
}
// 输入
FormCaliper.Instance.tbx_expectCenterRow.Text = expectRecStartRow.TupleString("10.3f");
FormCaliper.Instance.tbx_expectCenterCol.Text = expectRecStartColumn.TupleString("10.3f");
FormCaliper.Instance.tbx_expectPhi.Text = expectAngle.TupleString("10.3f");
// 参数
FormCaliper.Instance.tbx_caliperLength1.Text = length1.TupleString("10.3f");
FormCaliper.Instance.tbx_caliperLength2.Text = length2.TupleString("10.3f");
@@ -267,19 +265,5 @@ namespace CaliperTool
//显示找到的线
// window.DispObj(LineDisp, "green");
}
public void SetToolStatusDisp()
{
FormCaliper.Instance.lb_RunStatus.Text = toolRunStatu == ToolRunStatu.Succeed ? "工具运行成功!" : $"工具运行异常, 异常原因:{runMessage}";
FormCaliper.Instance.lb_RunTime.Text = runTime;
if (toolRunStatu == ToolRunStatu.Succeed)
{
FormCaliper.Instance.statusStrip.BackColor = System.Drawing.Color.LimeGreen;
}
else
{
FormCaliper.Instance.statusStrip.BackColor = System.Drawing.Color.Red;
}
}
}
}

View File

@@ -17,10 +17,11 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

View File

@@ -29,230 +29,109 @@ namespace CaliperTool
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCaliper));
this.tbx_resultStartRow = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.tbx_caliperLength2 = new System.Windows.Forms.TextBox();
this.tbx_Sigma = new System.Windows.Forms.TextBox();
this.tbx_caliperLength1 = new System.Windows.Forms.TextBox();
this.tbx_threshold = new System.Windows.Forms.TextBox();
this.cbx_polarity = new System.Windows.Forms.ComboBox();
this.btn_runCaliperool = new System.Windows.Forms.Button();
this.btn_moveCliperRegion = new System.Windows.Forms.Button();
this.cbx_edgeSelect = new System.Windows.Forms.ComboBox();
this.tbx_resultStartCol = new System.Windows.Forms.TextBox();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbtRunTool = new System.Windows.Forms.ToolStripButton();
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.lb_RunStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.lb_RunTime = new System.Windows.Forms.ToolStripStatusLabel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label14 = new System.Windows.Forms.Label();
this.cbx_edgeSelect = new System.Windows.Forms.ComboBox();
this.cbx_polarity = new System.Windows.Forms.ComboBox();
this.tbx_threshold = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.tbx_caliperLength1 = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.tbx_Sigma = new System.Windows.Forms.TextBox();
this.tbx_caliperLength2 = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chBDispCaliperROI = new System.Windows.Forms.CheckBox();
this.chBDispCross = new System.Windows.Forms.CheckBox();
this.chBDispRec = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tbx_expectPhi = new System.Windows.Forms.TextBox();
this.tbx_expectCenterCol = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbx_expectCenterRow = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tbx_resultStartRow = new System.Windows.Forms.TextBox();
this.tbx_resultStartCol = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.lb_RunStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.lb_Split = new System.Windows.Forms.ToolStripStatusLabel();
this.lb_RunTime = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStrip1.SuspendLayout();
this.statusStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.statusStrip.SuspendLayout();
this.SuspendLayout();
//
// tbx_resultStartRow
// toolStrip1
//
this.tbx_resultStartRow.Location = new System.Drawing.Point(98, 28);
this.tbx_resultStartRow.Margin = new System.Windows.Forms.Padding(2);
this.tbx_resultStartRow.Name = "tbx_resultStartRow";
this.tbx_resultStartRow.Size = new System.Drawing.Size(71, 21);
this.tbx_resultStartRow.TabIndex = 102;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbtRunTool});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1112, 32);
this.toolStrip1.TabIndex = 5;
this.toolStrip1.Text = "toolStrip1";
//
// label5
// tsbtRunTool
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(19, 201);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(79, 20);
this.label5.TabIndex = 279;
this.label5.Text = "结果选择:";
this.tsbtRunTool.Image = ((System.Drawing.Image)(resources.GetObject("tsbtRunTool.Image")));
this.tsbtRunTool.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbtRunTool.Name = "tsbtRunTool";
this.tsbtRunTool.Size = new System.Drawing.Size(85, 29);
this.tsbtRunTool.Text = "运行工具";
this.tsbtRunTool.Click += new System.EventHandler(this.tsbtRunTool_Click);
//
// label16
// statusStrip
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.Location = new System.Drawing.Point(19, 71);
this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(65, 20);
this.label16.TabIndex = 302;
this.label16.Text = "卡尺宽:";
this.statusStrip.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.lb_RunStatus,
this.toolStripStatusLabel1,
this.lb_RunTime});
this.statusStrip.Location = new System.Drawing.Point(0, 643);
this.statusStrip.Name = "statusStrip";
this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
this.statusStrip.Size = new System.Drawing.Size(1112, 22);
this.statusStrip.TabIndex = 4;
//
// label14
// lb_RunStatus
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.Location = new System.Drawing.Point(19, 38);
this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 20);
this.label14.TabIndex = 302;
this.label14.Text = "卡尺长:";
this.lb_RunStatus.Name = "lb_RunStatus";
this.lb_RunStatus.Size = new System.Drawing.Size(0, 17);
//
// label15
// toolStripStatusLabel1
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label15.Location = new System.Drawing.Point(21, 138);
this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(54, 20);
this.label15.TabIndex = 310;
this.label15.Text = "Sigma:";
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(16, 17);
this.toolStripStatusLabel1.Text = " ";
//
// label13
// lb_RunTime
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.Location = new System.Drawing.Point(19, 105);
this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(51, 20);
this.label13.TabIndex = 310;
this.label13.Text = "阈值:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(19, 171);
this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(51, 20);
this.label11.TabIndex = 298;
this.label11.Text = "极性:";
//
// tbx_caliperLength2
//
this.tbx_caliperLength2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_caliperLength2.Location = new System.Drawing.Point(109, 68);
this.tbx_caliperLength2.Margin = new System.Windows.Forms.Padding(2);
this.tbx_caliperLength2.Name = "tbx_caliperLength2";
this.tbx_caliperLength2.Size = new System.Drawing.Size(92, 26);
this.tbx_caliperLength2.TabIndex = 301;
//
// tbx_Sigma
//
this.tbx_Sigma.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_Sigma.Location = new System.Drawing.Point(111, 135);
this.tbx_Sigma.Margin = new System.Windows.Forms.Padding(2);
this.tbx_Sigma.Name = "tbx_Sigma";
this.tbx_Sigma.Size = new System.Drawing.Size(92, 26);
this.tbx_Sigma.TabIndex = 309;
//
// tbx_caliperLength1
//
this.tbx_caliperLength1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_caliperLength1.Location = new System.Drawing.Point(109, 35);
this.tbx_caliperLength1.Margin = new System.Windows.Forms.Padding(2);
this.tbx_caliperLength1.Name = "tbx_caliperLength1";
this.tbx_caliperLength1.Size = new System.Drawing.Size(92, 26);
this.tbx_caliperLength1.TabIndex = 301;
//
// tbx_threshold
//
this.tbx_threshold.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_threshold.Location = new System.Drawing.Point(109, 102);
this.tbx_threshold.Margin = new System.Windows.Forms.Padding(2);
this.tbx_threshold.Name = "tbx_threshold";
this.tbx_threshold.Size = new System.Drawing.Size(92, 26);
this.tbx_threshold.TabIndex = 309;
//
// cbx_polarity
//
this.cbx_polarity.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbx_polarity.FormattingEnabled = true;
this.cbx_polarity.Items.AddRange(new object[] {
"从明到暗",
"从暗到明"});
this.cbx_polarity.Location = new System.Drawing.Point(109, 168);
this.cbx_polarity.Name = "cbx_polarity";
this.cbx_polarity.Size = new System.Drawing.Size(92, 28);
this.cbx_polarity.TabIndex = 314;
this.cbx_polarity.Text = "从明到暗";
//
// btn_runCaliperool
//
this.btn_runCaliperool.BackColor = System.Drawing.Color.White;
this.btn_runCaliperool.Location = new System.Drawing.Point(430, 355);
this.btn_runCaliperool.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btn_runCaliperool.Name = "btn_runCaliperool";
this.btn_runCaliperool.Size = new System.Drawing.Size(90, 48);
this.btn_runCaliperool.TabIndex = 270;
this.btn_runCaliperool.Text = "运行";
this.btn_runCaliperool.UseVisualStyleBackColor = false;
this.btn_runCaliperool.Click += new System.EventHandler(this.btn_runCaliperool_Click);
//
// btn_moveCliperRegion
//
this.btn_moveCliperRegion.BackColor = System.Drawing.Color.White;
this.btn_moveCliperRegion.Location = new System.Drawing.Point(296, 355);
this.btn_moveCliperRegion.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btn_moveCliperRegion.Name = "btn_moveCliperRegion";
this.btn_moveCliperRegion.Size = new System.Drawing.Size(90, 48);
this.btn_moveCliperRegion.TabIndex = 269;
this.btn_moveCliperRegion.Text = "编辑卡尺";
this.btn_moveCliperRegion.UseVisualStyleBackColor = false;
this.btn_moveCliperRegion.Click += new System.EventHandler(this.btn_moveCliperRegion_Click);
//
// cbx_edgeSelect
//
this.cbx_edgeSelect.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbx_edgeSelect.FormattingEnabled = true;
this.cbx_edgeSelect.Items.AddRange(new object[] {
"all",
"first",
"last"});
this.cbx_edgeSelect.Location = new System.Drawing.Point(109, 199);
this.cbx_edgeSelect.Name = "cbx_edgeSelect";
this.cbx_edgeSelect.Size = new System.Drawing.Size(92, 28);
this.cbx_edgeSelect.TabIndex = 317;
this.cbx_edgeSelect.Text = "all";
//
// tbx_resultStartCol
//
this.tbx_resultStartCol.Location = new System.Drawing.Point(98, 61);
this.tbx_resultStartCol.Margin = new System.Windows.Forms.Padding(2);
this.tbx_resultStartCol.Name = "tbx_resultStartCol";
this.tbx_resultStartCol.Size = new System.Drawing.Size(71, 21);
this.tbx_resultStartCol.TabIndex = 104;
this.lb_RunTime.Name = "lb_RunTime";
this.lb_RunTime.Size = new System.Drawing.Size(0, 17);
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(1, 2);
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 32);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
@@ -261,25 +140,67 @@ namespace CaliperTool
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.panel2);
this.splitContainer1.Panel2.Controls.Add(this.groupBox4);
this.splitContainer1.Panel2.Controls.Add(this.groupBox3);
this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
this.splitContainer1.Panel2.Controls.Add(this.groupBox2);
this.splitContainer1.Panel2.Controls.Add(this.btn_runCaliperool);
this.splitContainer1.Panel2.Controls.Add(this.btn_moveCliperRegion);
this.splitContainer1.Size = new System.Drawing.Size(1127, 479);
this.splitContainer1.SplitterDistance = 562;
this.splitContainer1.TabIndex = 275;
this.splitContainer1.Panel2.Controls.Add(this.tabControl1);
this.splitContainer1.Size = new System.Drawing.Size(1112, 611);
this.splitContainer1.SplitterDistance = 642;
this.splitContainer1.SplitterWidth = 5;
this.splitContainer1.TabIndex = 6;
//
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(562, 479);
this.panel1.TabIndex = 272;
this.panel1.Size = new System.Drawing.Size(642, 611);
this.panel1.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(465, 611);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tabPage1.Size = new System.Drawing.Size(457, 581);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "参数设置";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox3);
this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tabPage2.Size = new System.Drawing.Size(457, 581);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "图形显示";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(457, 581);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "结果";
this.tabPage3.UseVisualStyleBackColor = true;
//
// groupBox4
//
@@ -295,22 +216,169 @@ namespace CaliperTool
this.groupBox4.Controls.Add(this.label15);
this.groupBox4.Controls.Add(this.label11);
this.groupBox4.Controls.Add(this.label13);
this.groupBox4.Location = new System.Drawing.Point(14, 166);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox4.Location = new System.Drawing.Point(3, 4);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(224, 271);
this.groupBox4.TabIndex = 320;
this.groupBox4.Size = new System.Drawing.Size(451, 573);
this.groupBox4.TabIndex = 321;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "卡尺参数";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.Location = new System.Drawing.Point(19, 38);
this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(65, 20);
this.label14.TabIndex = 302;
this.label14.Text = "卡尺长:";
//
// cbx_edgeSelect
//
this.cbx_edgeSelect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbx_edgeSelect.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbx_edgeSelect.FormattingEnabled = true;
this.cbx_edgeSelect.Items.AddRange(new object[] {
"all",
"first",
"last"});
this.cbx_edgeSelect.Location = new System.Drawing.Point(109, 199);
this.cbx_edgeSelect.Name = "cbx_edgeSelect";
this.cbx_edgeSelect.Size = new System.Drawing.Size(282, 28);
this.cbx_edgeSelect.TabIndex = 317;
this.cbx_edgeSelect.Text = "all";
//
// cbx_polarity
//
this.cbx_polarity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbx_polarity.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbx_polarity.FormattingEnabled = true;
this.cbx_polarity.Items.AddRange(new object[] {
"从明到暗",
"从暗到明"});
this.cbx_polarity.Location = new System.Drawing.Point(109, 168);
this.cbx_polarity.Name = "cbx_polarity";
this.cbx_polarity.Size = new System.Drawing.Size(282, 28);
this.cbx_polarity.TabIndex = 314;
this.cbx_polarity.Text = "从明到暗";
//
// tbx_threshold
//
this.tbx_threshold.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbx_threshold.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_threshold.Location = new System.Drawing.Point(109, 102);
this.tbx_threshold.Margin = new System.Windows.Forms.Padding(2);
this.tbx_threshold.Name = "tbx_threshold";
this.tbx_threshold.Size = new System.Drawing.Size(282, 26);
this.tbx_threshold.TabIndex = 309;
this.tbx_threshold.Text = "5";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(19, 201);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(79, 20);
this.label5.TabIndex = 279;
this.label5.Text = "结果选择:";
//
// tbx_caliperLength1
//
this.tbx_caliperLength1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbx_caliperLength1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_caliperLength1.Location = new System.Drawing.Point(109, 35);
this.tbx_caliperLength1.Margin = new System.Windows.Forms.Padding(2);
this.tbx_caliperLength1.Name = "tbx_caliperLength1";
this.tbx_caliperLength1.Size = new System.Drawing.Size(282, 26);
this.tbx_caliperLength1.TabIndex = 301;
this.tbx_caliperLength1.Text = "50";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.Location = new System.Drawing.Point(19, 71);
this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(65, 20);
this.label16.TabIndex = 302;
this.label16.Text = "卡尺宽:";
//
// tbx_Sigma
//
this.tbx_Sigma.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbx_Sigma.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_Sigma.Location = new System.Drawing.Point(111, 135);
this.tbx_Sigma.Margin = new System.Windows.Forms.Padding(2);
this.tbx_Sigma.Name = "tbx_Sigma";
this.tbx_Sigma.Size = new System.Drawing.Size(280, 26);
this.tbx_Sigma.TabIndex = 309;
this.tbx_Sigma.Text = "2";
//
// tbx_caliperLength2
//
this.tbx_caliperLength2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbx_caliperLength2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbx_caliperLength2.Location = new System.Drawing.Point(109, 68);
this.tbx_caliperLength2.Margin = new System.Windows.Forms.Padding(2);
this.tbx_caliperLength2.Name = "tbx_caliperLength2";
this.tbx_caliperLength2.Size = new System.Drawing.Size(282, 26);
this.tbx_caliperLength2.TabIndex = 301;
this.tbx_caliperLength2.Text = "10";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label15.Location = new System.Drawing.Point(21, 138);
this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(54, 20);
this.label15.TabIndex = 310;
this.label15.Text = "Sigma:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(19, 171);
this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(51, 20);
this.label11.TabIndex = 298;
this.label11.Text = "极性:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.Location = new System.Drawing.Point(19, 105);
this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(51, 20);
this.label13.TabIndex = 310;
this.label13.Text = "阈值:";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.chBDispCaliperROI);
this.groupBox3.Controls.Add(this.chBDispCross);
this.groupBox3.Controls.Add(this.chBDispRec);
this.groupBox3.Location = new System.Drawing.Point(296, 170);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox3.Location = new System.Drawing.Point(3, 4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(213, 124);
this.groupBox3.TabIndex = 319;
this.groupBox3.Size = new System.Drawing.Size(451, 166);
this.groupBox3.TabIndex = 320;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "显示";
//
@@ -319,7 +387,7 @@ namespace CaliperTool
this.chBDispCaliperROI.AutoSize = true;
this.chBDispCaliperROI.Location = new System.Drawing.Point(29, 92);
this.chBDispCaliperROI.Name = "chBDispCaliperROI";
this.chBDispCaliperROI.Size = new System.Drawing.Size(96, 16);
this.chBDispCaliperROI.Size = new System.Drawing.Size(99, 21);
this.chBDispCaliperROI.TabIndex = 0;
this.chBDispCaliperROI.Text = "结果显示交点";
this.chBDispCaliperROI.UseVisualStyleBackColor = true;
@@ -329,7 +397,7 @@ namespace CaliperTool
this.chBDispCross.AutoSize = true;
this.chBDispCross.Location = new System.Drawing.Point(29, 60);
this.chBDispCross.Name = "chBDispCross";
this.chBDispCross.Size = new System.Drawing.Size(96, 16);
this.chBDispCross.Size = new System.Drawing.Size(99, 21);
this.chBDispCross.TabIndex = 0;
this.chBDispCross.Text = "结果显示交点";
this.chBDispCross.UseVisualStyleBackColor = true;
@@ -339,102 +407,50 @@ namespace CaliperTool
this.chBDispRec.AutoSize = true;
this.chBDispRec.Location = new System.Drawing.Point(29, 29);
this.chBDispRec.Name = "chBDispRec";
this.chBDispRec.Size = new System.Drawing.Size(108, 16);
this.chBDispRec.Size = new System.Drawing.Size(111, 21);
this.chBDispRec.TabIndex = 0;
this.chBDispRec.Text = "结果显示矩形框";
this.chBDispRec.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.tbx_expectPhi);
this.groupBox1.Controls.Add(this.tbx_expectCenterCol);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.tbx_expectCenterRow);
this.groupBox1.Location = new System.Drawing.Point(14, 19);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(224, 127);
this.groupBox1.TabIndex = 318;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "输入坐标";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(22, 89);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 276;
this.label3.Text = "卡尺角度:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(22, 31);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(77, 12);
this.label1.TabIndex = 272;
this.label1.Text = "中心行坐标:";
//
// tbx_expectPhi
//
this.tbx_expectPhi.Location = new System.Drawing.Point(131, 86);
this.tbx_expectPhi.Margin = new System.Windows.Forms.Padding(2);
this.tbx_expectPhi.Name = "tbx_expectPhi";
this.tbx_expectPhi.Size = new System.Drawing.Size(71, 21);
this.tbx_expectPhi.TabIndex = 275;
//
// tbx_expectCenterCol
//
this.tbx_expectCenterCol.Location = new System.Drawing.Point(131, 57);
this.tbx_expectCenterCol.Margin = new System.Windows.Forms.Padding(2);
this.tbx_expectCenterCol.Name = "tbx_expectCenterCol";
this.tbx_expectCenterCol.Size = new System.Drawing.Size(71, 21);
this.tbx_expectCenterCol.TabIndex = 273;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(22, 60);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(77, 12);
this.label2.TabIndex = 274;
this.label2.Text = "中心列坐标:";
//
// tbx_expectCenterRow
//
this.tbx_expectCenterRow.Location = new System.Drawing.Point(131, 28);
this.tbx_expectCenterRow.Margin = new System.Windows.Forms.Padding(2);
this.tbx_expectCenterRow.Name = "tbx_expectCenterRow";
this.tbx_expectCenterRow.Size = new System.Drawing.Size(71, 21);
this.tbx_expectCenterRow.TabIndex = 271;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.tbx_resultStartRow);
this.groupBox2.Controls.Add(this.tbx_resultStartCol);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Location = new System.Drawing.Point(296, 19);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox2.Location = new System.Drawing.Point(0, 0);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
this.groupBox2.Size = new System.Drawing.Size(201, 127);
this.groupBox2.TabIndex = 297;
this.groupBox2.Size = new System.Drawing.Size(457, 127);
this.groupBox2.TabIndex = 299;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "结果点";
//
// tbx_resultStartRow
//
this.tbx_resultStartRow.Location = new System.Drawing.Point(98, 28);
this.tbx_resultStartRow.Margin = new System.Windows.Forms.Padding(2);
this.tbx_resultStartRow.Name = "tbx_resultStartRow";
this.tbx_resultStartRow.Size = new System.Drawing.Size(71, 23);
this.tbx_resultStartRow.TabIndex = 102;
//
// tbx_resultStartCol
//
this.tbx_resultStartCol.Location = new System.Drawing.Point(98, 61);
this.tbx_resultStartCol.Margin = new System.Windows.Forms.Padding(2);
this.tbx_resultStartCol.Name = "tbx_resultStartCol";
this.tbx_resultStartCol.Size = new System.Drawing.Size(71, 23);
this.tbx_resultStartCol.TabIndex = 104;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(22, 31);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(77, 12);
this.label7.Size = new System.Drawing.Size(80, 17);
this.label7.TabIndex = 103;
this.label7.Text = "中心行坐标:";
//
@@ -444,115 +460,82 @@ namespace CaliperTool
this.label9.Location = new System.Drawing.Point(22, 64);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(77, 12);
this.label9.Size = new System.Drawing.Size(80, 17);
this.label9.TabIndex = 105;
this.label9.Text = "中心列坐标:";
//
// panel2
//
this.panel2.Location = new System.Drawing.Point(-566, 485);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1127, 25);
this.panel2.TabIndex = 276;
//
// statusStrip
//
this.statusStrip.BackColor = System.Drawing.Color.White;
this.statusStrip.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.lb_RunStatus,
this.lb_Split,
this.lb_RunTime});
this.statusStrip.Location = new System.Drawing.Point(0, 485);
this.statusStrip.Name = "statusStrip";
this.statusStrip.Size = new System.Drawing.Size(1132, 24);
this.statusStrip.TabIndex = 276;
this.statusStrip.Text = "statusStrip1";
//
// lb_RunStatus
//
this.lb_RunStatus.Name = "lb_RunStatus";
this.lb_RunStatus.Size = new System.Drawing.Size(0, 19);
//
// lb_Split
//
this.lb_Split.Name = "lb_Split";
this.lb_Split.Size = new System.Drawing.Size(189, 19);
this.lb_Split.Text = " ";
//
// lb_RunTime
//
this.lb_RunTime.Name = "lb_RunTime";
this.lb_RunTime.Size = new System.Drawing.Size(0, 19);
//
// FormCaliper
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1132, 509);
this.Controls.Add(this.statusStrip);
this.ClientSize = new System.Drawing.Size(1112, 665);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.statusStrip);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "FormCaliper";
this.Text = "卡尺工具";
this.Load += new System.EventHandler(this.FormCaliper_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.statusStrip.ResumeLayout(false);
this.statusStrip.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.statusStrip.ResumeLayout(false);
this.statusStrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.TextBox tbx_resultStartRow;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label11;
public System.Windows.Forms.TextBox tbx_caliperLength2;
public System.Windows.Forms.TextBox tbx_Sigma;
public System.Windows.Forms.TextBox tbx_caliperLength1;
public System.Windows.Forms.TextBox tbx_threshold;
public System.Windows.Forms.ComboBox cbx_polarity;
public System.Windows.Forms.Button btn_runCaliperool;
private System.Windows.Forms.Button btn_moveCliperRegion;
public System.Windows.Forms.ComboBox cbx_edgeSelect;
public System.Windows.Forms.TextBox tbx_resultStartCol;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton tsbtRunTool;
private System.Windows.Forms.ToolStripStatusLabel lb_RunStatus;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel lb_RunTime;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label14;
public System.Windows.Forms.ComboBox cbx_edgeSelect;
public System.Windows.Forms.ComboBox cbx_polarity;
public System.Windows.Forms.TextBox tbx_threshold;
private System.Windows.Forms.Label label5;
public System.Windows.Forms.TextBox tbx_caliperLength1;
private System.Windows.Forms.Label label16;
public System.Windows.Forms.TextBox tbx_Sigma;
public System.Windows.Forms.TextBox tbx_caliperLength2;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox chBDispCaliperROI;
private System.Windows.Forms.CheckBox chBDispCross;
private System.Windows.Forms.CheckBox chBDispRec;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox tbx_expectPhi;
public System.Windows.Forms.TextBox tbx_expectCenterCol;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox tbx_expectCenterRow;
private System.Windows.Forms.GroupBox groupBox2;
public System.Windows.Forms.TextBox tbx_resultStartRow;
public System.Windows.Forms.TextBox tbx_resultStartCol;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.CheckBox chBDispCaliperROI;
private System.Windows.Forms.Panel panel2;
public System.Windows.Forms.StatusStrip statusStrip;
public System.Windows.Forms.ToolStripStatusLabel lb_RunStatus;
private System.Windows.Forms.ToolStripStatusLabel lb_Split;
public System.Windows.Forms.ToolStripStatusLabel lb_RunTime;
}
}

View File

@@ -69,12 +69,7 @@ namespace CaliperTool
private void InitTool()
{
this.Text = myToolInfo.toolName;
btn_runCaliperool.Focus();
Application.DoEvents();
// 预期设定值
tbx_expectCenterRow.Text = myCaliper.expectRecStartRow.ToString();
tbx_expectCenterCol.Text = myCaliper.expectRecStartColumn.ToString();
tbx_expectPhi.Text = myCaliper.expectAngle.ToString();
// 预期参数
tbx_caliperLength1.Text = myCaliper.length1.ToString();
tbx_caliperLength2.Text = myCaliper.length2.ToString();
@@ -96,10 +91,6 @@ namespace CaliperTool
private void btn_runCaliperool_Click(object sender, EventArgs e)
{
// 更改界面中参数,实时更新类中参数
myCaliper.expectRecStartRow = Convert.ToDouble(tbx_expectCenterRow.Text.Trim());
myCaliper.expectRecStartColumn = Convert.ToDouble(tbx_expectCenterCol.Text.Trim());
myCaliper.expectAngle = Convert.ToDouble(tbx_expectPhi.Text.Trim());
// 运行参数
myCaliper.threshold = Convert.ToInt16(tbx_threshold.Text.Trim());
myCaliper.length1 = Convert.ToDouble(tbx_caliperLength1.Text.Trim());
@@ -133,5 +124,10 @@ namespace CaliperTool
}
}
}
private void tsbtRunTool_Click(object sender, EventArgs e)
{
}
}
}

View File

@@ -117,10 +117,85 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>225, 19</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbtRunTool.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAA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u4KEqPImIo+3vR9ovj7PHYP81H4UPROBP
n4H40MZzWKY2esaEIAiCIAiCIKrhy5f/A2/46JDXUARZAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>335, 19</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAIyAAAAEAIACoEgAAFgAAACgAAAAjAAAAQAAAAAEAIAAAAAAAgBEAAAAAAAAAAAAAAAAAAAAA

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -77,11 +77,11 @@ namespace ViewROI
this.grayValueLable.BackColor = System.Drawing.Color.Transparent;
this.grayValueLable.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.grayValueLable.IsScaled = false;
this.grayValueLable.Location = new System.Drawing.Point(3, 430);
this.grayValueLable.Location = new System.Drawing.Point(3, 432);
this.grayValueLable.MinimumSize = new System.Drawing.Size(1, 1);
this.grayValueLable.Name = "grayValueLable";
this.grayValueLable.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
this.grayValueLable.Size = new System.Drawing.Size(260, 26);
this.grayValueLable.Size = new System.Drawing.Size(260, 24);
this.grayValueLable.Symbol = 61483;
this.grayValueLable.TabIndex = 4;
this.grayValueLable.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Windows.Forms;
using HalconDotNet;
using System.Diagnostics;
namespace ViewROI
{
@@ -80,16 +81,15 @@ namespace ViewROI
{
try
{
int button_state;
double positionX, positionY;
string str_value;
string str_position;
bool _isXOut = true, _isYOut = true;
HTuple channel_count;
HOperatorSet.CountChannels(hv_Image, out channel_count);
SmartWindow.HalconWindow.GetMpositionSubPix(out positionY, out positionX, out button_state);
//SmartWindow.HalconWindow.GetMpositionSubPix(out positionY, out positionX, out button_state);
positionY = e.Y;
positionX = e.X;
str_position = String.Format("RC: {0:0},{1:0}", positionY, positionX);
_isXOut = (positionX < 0 || positionX >= hv_Width);

View File

@@ -50,7 +50,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>

View File

@@ -120,11 +120,11 @@ namespace PMAlignTool
this.ckb_showCross = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.dgv_matchResult = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusStrip.SuspendLayout();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -1546,44 +1546,62 @@ namespace PMAlignTool
//
// dgv_matchResult
//
this.dgv_matchResult.AllowDrop = true;
this.dgv_matchResult.AllowUserToAddRows = false;
this.dgv_matchResult.AllowUserToDeleteRows = false;
this.dgv_matchResult.AllowUserToResizeRows = false;
this.dgv_matchResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgv_matchResult.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3,
this.Column4,
this.Column5});
this.Column7,
this.Column8,
this.Column9,
this.Column10,
this.Column12});
this.dgv_matchResult.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgv_matchResult.Location = new System.Drawing.Point(0, 0);
this.dgv_matchResult.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.dgv_matchResult.Name = "dgv_matchResult";
this.dgv_matchResult.ReadOnly = true;
this.dgv_matchResult.RowHeadersVisible = false;
this.dgv_matchResult.RowTemplate.Height = 23;
this.dgv_matchResult.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgv_matchResult.Size = new System.Drawing.Size(392, 568);
this.dgv_matchResult.TabIndex = 0;
this.dgv_matchResult.TabIndex = 15;
//
// Column1
// Column7
//
this.Column1.HeaderText = "号";
this.Column1.Name = "Column1";
this.Column7.HeaderText = "号";
this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.Column7.Width = 70;
//
// Column2
// Column8
//
this.Column2.HeaderText = "分";
this.Column2.Name = "Column2";
this.Column8.HeaderText = "分";
this.Column8.Name = "Column8";
this.Column8.ReadOnly = true;
this.Column8.Width = 75;
//
// Column3
// Column9
//
this.Column3.HeaderText = "行";
this.Column3.Name = "Column3";
this.Column9.HeaderText = "行";
this.Column9.Name = "Column9";
this.Column9.ReadOnly = true;
this.Column9.Width = 70;
//
// Column4
// Column10
//
this.Column4.HeaderText = "列";
this.Column4.Name = "Column4";
this.Column10.HeaderText = "列";
this.Column10.Name = "Column10";
this.Column10.ReadOnly = true;
this.Column10.Width = 70;
//
// Column5
// Column12
//
this.Column5.HeaderText = "角度";
this.Column5.Name = "Column5";
this.Column12.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column12.HeaderText = "角度(°)";
this.Column12.Name = "Column12";
this.Column12.ReadOnly = true;
//
// FormPMAlignTool
//
@@ -1739,11 +1757,11 @@ namespace PMAlignTool
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel lb_RunTime;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
public System.Windows.Forms.DataGridView dgv_matchResult;
internal System.Windows.Forms.DataGridView dgv_matchResult;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
}
}

View File

@@ -36,6 +36,7 @@ namespace PMAlignTool
myPMAlign.toolName = myToolInfo.toolName;
myPMAlign.bingdingJobName = myToolInfo.bingingJobName;
myPMAlign.DispImage();
myPMAlign.InitTool();
}
}
@@ -103,11 +104,22 @@ namespace PMAlignTool
nud_ScaleRange.Value = myPMAlign.maxScale;
tkb_contrast.Value = myPMAlign.contrast;
#endregion
if(myPMAlign.modelPartImage != null)
if (myPMAlign.oldTrainImage == null && File.Exists(myPMAlign.trainImgPath) && File.Exists(myPMAlign.trainModelPath))
{
try
{
HOperatorSet.ReadImage(out myPMAlign.oldTrainImage, myPMAlign.trainImgPath);
HOperatorSet.ReadImage(out myPMAlign.modelPartImage, myPMAlign.trainModelPath);
}
catch (Exception)
{
}
}
if (myPMAlign.modelPartImage != null)
{
hWindowTool_Smart1.DispImage(myPMAlign.modelPartImage);
}
// myHwindow.DispHWindow.AttachDrawingObjectToWindow(serachRegion_drawing_object);
tsbtRunTool_Click(null, null);
isInitTool = false;
}
@@ -321,14 +333,27 @@ namespace PMAlignTool
private void btnChangeModel_Click(object sender, EventArgs e)
{
if(!File.Exists(myPMAlign.pmaModelName + ".ShapeModel"))
if(!File.Exists(myPMAlign.trainShmPath))
{
MessageBox.Show("还未创建过模板,请先进行创建!");
MessageBox.Show("无已训练好的模型,请先创建模型");
return;
}
myPMAlign.inputImage = myPMAlign.oldTrainImage;
myPMAlign.Run(SoftwareRunState.Debug);
else
{
if (myPMAlign.oldTrainImage == null && File.Exists(myPMAlign.trainImgPath) && File.Exists(myPMAlign.trainModelPath))
{
try
{
HOperatorSet.ReadImage(out myPMAlign.oldTrainImage, myPMAlign.trainImgPath);
HOperatorSet.ReadImage(out myPMAlign.modelPartImage, myPMAlign.trainModelPath);
}
catch (Exception)
{
}
}
myPMAlign.inputImage = myPMAlign.oldTrainImage;
myPMAlign.Run(SoftwareRunState.Debug);
}
}
private void cbx_searchRegionType_SelectedIndexChanged()

View File

@@ -196,19 +196,19 @@
n4H40MZzWKY2esaEIAiCIAiCIKrhy5f/A2/46JDXUARZAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -173,8 +173,20 @@ namespace PMAlignTool
public bool isAutoConstants { get; set; }
public string modelFilePath { get; set; }
public RegionType searchRegionType { get; set; }
/// <summary>
/// 文件存储路径
/// </summary>
public string trainImgPath, trainShmPath, trainModelPath, dataDirectory;
[NonSerialized]
public HObject SearchRegion;
public void InitTool()
{
trainImgPath = ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}_TrainImage.bmp";
trainShmPath = ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}.Shm";
trainModelPath = ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}_ModelImage.bmp";
dataDirectory = ConfigData.ConfigPath + $"\\{bingdingJobName}\\";
}
public override void Run(SoftwareRunState softwareState)
{
Stopwatch sw = new Stopwatch();
@@ -372,9 +384,10 @@ namespace PMAlignTool
}
isCreateModel = true;
// 模板句柄信息
Directory.CreateDirectory(ConfigData.ConfigPath + $"\\{bingdingJobName}\\");
HOperatorSet.WriteShapeModel(modelID, ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}.Shm");
Directory.CreateDirectory(dataDirectory);
HOperatorSet.WriteShapeModel(modelID, trainShmPath);
HOperatorSet.WriteImage(inputImage, "bmp", 0, trainImgPath);
HOperatorSet.WriteImage(modelPartImage, "bmp", 0, trainModelPath);
if (scores != null && scores.Type != HTupleType.EMPTY)
{
templatePose = new PosXYU { X = rows[0].D, Y = cols[0].D , U = angles[0].D };
@@ -397,12 +410,12 @@ namespace PMAlignTool
public int FindModelTemplate(HObject findModelImage)
{
if (!File.Exists(ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}.Shm"))
if (!File.Exists(trainShmPath))
{
LoggerClass.WriteLog($"{toolName}未创建或加载模板", MsgLevel.Exception);
return -1;
}
HOperatorSet.ReadShapeModel(ConfigData.ConfigPath + $"\\{bingdingJobName}\\{toolName}_{pmaModelName}.Shm", out modelID);
HOperatorSet.ReadShapeModel(trainShmPath, out modelID);
HObject image;
if (searchRegionType == RegionType.AllImage)
{

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -55,6 +55,7 @@ namespace PMAlignTool
}
}
}
myPMAlign.InitTool();
myPMAlign.Run(SoftwareRunState.Release);
if (myPMAlign.toolRunStatu != ToolRunStatu.Succeed)
{

View File

@@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -82,30 +82,32 @@ namespace VisionJobFactory
{
if (bShouldCrossAssembly)
{
//Assembly[] Assemblys = AppDomain.CurrentDomain.GetAssemblies();
//if (Assemblys != null)
//{
// for (int i = 0, len = Assemblys.Length; i < len; i++)
// {
// CheckInAssembly(Assemblys[i], bIgnoreAbstract, bInheritAttribute);
// }
//}
List<Assembly> allAssemblies = new List<Assembly>();
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string[] FILES = Directory.GetFiles(path, "*.dll");
foreach (string dll in Directory.GetFiles(path, "*.dll"))
allAssemblies.Add(Assembly.LoadFile(dll));
Assembly[] Assemblys = AppDomain.CurrentDomain.GetAssemblies();
if (Assemblys != null)
{
for (int i = 0, len = Assemblys.Length; i < len; i++)
{
CheckInAssembly(Assemblys[i], bIgnoreAbstract, bInheritAttribute);
}
}
//List<Assembly> allAssemblies = new List<Assembly>();
//string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//string[] FILES = Directory.GetFiles(path, "*.dll");
//foreach (string dll in Directory.GetFiles(path, "*.dll"))
// allAssemblies.Add(Assembly.LoadFile(dll));
// 手动寻找该dll若dll名称改变需要重新编译不智能
// Assembly assem = Assembly.LoadFile($"{AppDomain.CurrentDomain.BaseDirectory}ToolLib.VisionToolList.dll");
if (allAssemblies != null)
{
for (int i = 0; i < allAssemblies.Count; i++)
{
CheckInAssembly(allAssemblies[i], bIgnoreAbstract, bInheritAttribute);
}
}
//if (allAssemblies != null)
//{
// for (int i = 0; i < allAssemblies.Count; i++)
// {
// CheckInAssembly(allAssemblies[i], bIgnoreAbstract, bInheritAttribute);
// }
//}
}
else

File diff suppressed because it is too large Load Diff

View File

@@ -34,8 +34,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationIcon>favicon%281%29.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="halcondotnet, Version=17.12.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
@@ -157,7 +156,7 @@
<None Include="Resources\新建2.png" />
</ItemGroup>
<ItemGroup>
<Content Include="几何.ico" />
<Content Include="favicon%281%29.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

BIN
VisionEdit/favicon(1).ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.