Commit fd89fce1 cuiya

demo

1 个父辈 b3eb7a97
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
this.原图ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.原图ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.元件特征ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.元件特征ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.计数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.计数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.保存当前图片ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buttonOpen = new System.Windows.Forms.Button(); this.buttonOpen = new System.Windows.Forms.Button();
this.buttonCount = new System.Windows.Forms.Button(); this.buttonCount = new System.Windows.Forms.Button();
this.buttonThesh = new System.Windows.Forms.Button(); this.buttonThesh = new System.Windows.Forms.Button();
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
this.labelTime = new System.Windows.Forms.Label(); this.labelTime = new System.Windows.Forms.Label();
this.textBoxFeature = new System.Windows.Forms.TextBox(); this.textBoxFeature = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.保存当前图片ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.button1 = new System.Windows.Forms.Button();
this.contextMenuStrip.SuspendLayout(); this.contextMenuStrip.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -59,14 +60,16 @@ ...@@ -59,14 +60,16 @@
this.imageBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.imageBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox.Location = new System.Drawing.Point(12, 42); this.imageBox.Location = new System.Drawing.Point(16, 52);
this.imageBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.imageBox.Name = "imageBox"; this.imageBox.Name = "imageBox";
this.imageBox.Size = new System.Drawing.Size(614, 367); this.imageBox.Size = new System.Drawing.Size(817, 458);
this.imageBox.TabIndex = 0; this.imageBox.TabIndex = 0;
this.imageBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseDown); this.imageBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseDown);
// //
// contextMenuStrip // contextMenuStrip
// //
this.contextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.打开图片ToolStripMenuItem, this.打开图片ToolStripMenuItem,
this.原图ToolStripMenuItem, this.原图ToolStripMenuItem,
...@@ -74,41 +77,49 @@ ...@@ -74,41 +77,49 @@
this.计数ToolStripMenuItem, this.计数ToolStripMenuItem,
this.保存当前图片ToolStripMenuItem}); this.保存当前图片ToolStripMenuItem});
this.contextMenuStrip.Name = "contextMenuStrip"; this.contextMenuStrip.Name = "contextMenuStrip";
this.contextMenuStrip.Size = new System.Drawing.Size(181, 136); this.contextMenuStrip.Size = new System.Drawing.Size(169, 124);
// //
// 打开图片ToolStripMenuItem // 打开图片ToolStripMenuItem
// //
this.打开图片ToolStripMenuItem.Name = "打开图片ToolStripMenuItem"; this.打开图片ToolStripMenuItem.Name = "打开图片ToolStripMenuItem";
this.打开图片ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.打开图片ToolStripMenuItem.Size = new System.Drawing.Size(168, 24);
this.打开图片ToolStripMenuItem.Text = "打开图片"; this.打开图片ToolStripMenuItem.Text = "打开图片";
this.打开图片ToolStripMenuItem.Click += new System.EventHandler(this.打开图片ToolStripMenuItem_Click); this.打开图片ToolStripMenuItem.Click += new System.EventHandler(this.打开图片ToolStripMenuItem_Click);
// //
// 原图ToolStripMenuItem // 原图ToolStripMenuItem
// //
this.原图ToolStripMenuItem.Name = "原图ToolStripMenuItem"; this.原图ToolStripMenuItem.Name = "原图ToolStripMenuItem";
this.原图ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.原图ToolStripMenuItem.Size = new System.Drawing.Size(168, 24);
this.原图ToolStripMenuItem.Text = "重新加载"; this.原图ToolStripMenuItem.Text = "重新加载";
this.原图ToolStripMenuItem.Click += new System.EventHandler(this.原图ToolStripMenuItem_Click); this.原图ToolStripMenuItem.Click += new System.EventHandler(this.原图ToolStripMenuItem_Click);
// //
// 元件特征ToolStripMenuItem // 元件特征ToolStripMenuItem
// //
this.元件特征ToolStripMenuItem.Name = "元件特征ToolStripMenuItem"; this.元件特征ToolStripMenuItem.Name = "元件特征ToolStripMenuItem";
this.元件特征ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.元件特征ToolStripMenuItem.Size = new System.Drawing.Size(168, 24);
this.元件特征ToolStripMenuItem.Text = "获取元件特征"; this.元件特征ToolStripMenuItem.Text = "获取元件特征";
this.元件特征ToolStripMenuItem.Click += new System.EventHandler(this.元件特征ToolStripMenuItem_Click); this.元件特征ToolStripMenuItem.Click += new System.EventHandler(this.元件特征ToolStripMenuItem_Click);
// //
// 计数ToolStripMenuItem // 计数ToolStripMenuItem
// //
this.计数ToolStripMenuItem.Name = "计数ToolStripMenuItem"; this.计数ToolStripMenuItem.Name = "计数ToolStripMenuItem";
this.计数ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.计数ToolStripMenuItem.Size = new System.Drawing.Size(168, 24);
this.计数ToolStripMenuItem.Text = "计数"; this.计数ToolStripMenuItem.Text = "计数";
this.计数ToolStripMenuItem.Click += new System.EventHandler(this.计数ToolStripMenuItem_Click); this.计数ToolStripMenuItem.Click += new System.EventHandler(this.计数ToolStripMenuItem_Click);
// //
// 保存当前图片ToolStripMenuItem
//
this.保存当前图片ToolStripMenuItem.Name = "保存当前图片ToolStripMenuItem";
this.保存当前图片ToolStripMenuItem.Size = new System.Drawing.Size(168, 24);
this.保存当前图片ToolStripMenuItem.Text = "保存当前图片";
this.保存当前图片ToolStripMenuItem.Click += new System.EventHandler(this.保存当前图片ToolStripMenuItem_Click);
//
// buttonOpen // buttonOpen
// //
this.buttonOpen.Location = new System.Drawing.Point(13, 9); this.buttonOpen.Location = new System.Drawing.Point(17, 11);
this.buttonOpen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonOpen.Name = "buttonOpen"; this.buttonOpen.Name = "buttonOpen";
this.buttonOpen.Size = new System.Drawing.Size(75, 23); this.buttonOpen.Size = new System.Drawing.Size(100, 29);
this.buttonOpen.TabIndex = 1; this.buttonOpen.TabIndex = 1;
this.buttonOpen.Text = "打开"; this.buttonOpen.Text = "打开";
this.buttonOpen.UseVisualStyleBackColor = true; this.buttonOpen.UseVisualStyleBackColor = true;
...@@ -116,9 +127,10 @@ ...@@ -116,9 +127,10 @@
// //
// buttonCount // buttonCount
// //
this.buttonCount.Location = new System.Drawing.Point(105, 9); this.buttonCount.Location = new System.Drawing.Point(140, 11);
this.buttonCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonCount.Name = "buttonCount"; this.buttonCount.Name = "buttonCount";
this.buttonCount.Size = new System.Drawing.Size(75, 23); this.buttonCount.Size = new System.Drawing.Size(100, 29);
this.buttonCount.TabIndex = 2; this.buttonCount.TabIndex = 2;
this.buttonCount.Text = "计数"; this.buttonCount.Text = "计数";
this.buttonCount.UseVisualStyleBackColor = true; this.buttonCount.UseVisualStyleBackColor = true;
...@@ -126,9 +138,10 @@ ...@@ -126,9 +138,10 @@
// //
// buttonThesh // buttonThesh
// //
this.buttonThesh.Location = new System.Drawing.Point(375, 13); this.buttonThesh.Location = new System.Drawing.Point(500, 16);
this.buttonThesh.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonThesh.Name = "buttonThesh"; this.buttonThesh.Name = "buttonThesh";
this.buttonThesh.Size = new System.Drawing.Size(75, 23); this.buttonThesh.Size = new System.Drawing.Size(100, 29);
this.buttonThesh.TabIndex = 3; this.buttonThesh.TabIndex = 3;
this.buttonThesh.Text = "二值化"; this.buttonThesh.Text = "二值化";
this.buttonThesh.UseVisualStyleBackColor = true; this.buttonThesh.UseVisualStyleBackColor = true;
...@@ -136,18 +149,20 @@ ...@@ -136,18 +149,20 @@
// //
// textBoxThesh // textBoxThesh
// //
this.textBoxThesh.Location = new System.Drawing.Point(269, 13); this.textBoxThesh.Location = new System.Drawing.Point(359, 16);
this.textBoxThesh.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBoxThesh.Name = "textBoxThesh"; this.textBoxThesh.Name = "textBoxThesh";
this.textBoxThesh.Size = new System.Drawing.Size(46, 21); this.textBoxThesh.Size = new System.Drawing.Size(60, 25);
this.textBoxThesh.TabIndex = 4; this.textBoxThesh.TabIndex = 4;
this.textBoxThesh.Text = "30"; this.textBoxThesh.Text = "30";
// //
// checkBoxAutoThresh // checkBoxAutoThresh
// //
this.checkBoxAutoThresh.AutoSize = true; this.checkBoxAutoThresh.AutoSize = true;
this.checkBoxAutoThresh.Location = new System.Drawing.Point(321, 17); this.checkBoxAutoThresh.Location = new System.Drawing.Point(428, 21);
this.checkBoxAutoThresh.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBoxAutoThresh.Name = "checkBoxAutoThresh"; this.checkBoxAutoThresh.Name = "checkBoxAutoThresh";
this.checkBoxAutoThresh.Size = new System.Drawing.Size(48, 16); this.checkBoxAutoThresh.Size = new System.Drawing.Size(59, 19);
this.checkBoxAutoThresh.TabIndex = 5; this.checkBoxAutoThresh.TabIndex = 5;
this.checkBoxAutoThresh.Text = "自动"; this.checkBoxAutoThresh.Text = "自动";
this.checkBoxAutoThresh.UseVisualStyleBackColor = true; this.checkBoxAutoThresh.UseVisualStyleBackColor = true;
...@@ -162,18 +177,20 @@ ...@@ -162,18 +177,20 @@
this.panel1.Controls.Add(this.labelImageName); this.panel1.Controls.Add(this.labelImageName);
this.panel1.Controls.Add(this.labelCount); this.panel1.Controls.Add(this.labelCount);
this.panel1.Controls.Add(this.labelTime); this.panel1.Controls.Add(this.labelTime);
this.panel1.Location = new System.Drawing.Point(-1, 411); this.panel1.Location = new System.Drawing.Point(-1, 514);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(640, 23); this.panel1.Size = new System.Drawing.Size(853, 28);
this.panel1.TabIndex = 7; this.panel1.TabIndex = 7;
// //
// labelFeature // labelFeature
// //
this.labelFeature.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelFeature.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelFeature.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.labelFeature.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.labelFeature.Location = new System.Drawing.Point(105, 1); this.labelFeature.Location = new System.Drawing.Point(140, 1);
this.labelFeature.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelFeature.Name = "labelFeature"; this.labelFeature.Name = "labelFeature";
this.labelFeature.Size = new System.Drawing.Size(119, 22); this.labelFeature.Size = new System.Drawing.Size(159, 28);
this.labelFeature.TabIndex = 3; this.labelFeature.TabIndex = 3;
this.labelFeature.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelFeature.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -182,9 +199,10 @@ ...@@ -182,9 +199,10 @@
this.labelImageName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.labelImageName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.labelImageName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.labelImageName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.labelImageName.Location = new System.Drawing.Point(223, 1); this.labelImageName.Location = new System.Drawing.Point(297, 1);
this.labelImageName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelImageName.Name = "labelImageName"; this.labelImageName.Name = "labelImageName";
this.labelImageName.Size = new System.Drawing.Size(317, 22); this.labelImageName.Size = new System.Drawing.Size(423, 28);
this.labelImageName.TabIndex = 2; this.labelImageName.TabIndex = 2;
this.labelImageName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelImageName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -193,8 +211,9 @@ ...@@ -193,8 +211,9 @@
this.labelCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelCount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.labelCount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.labelCount.Location = new System.Drawing.Point(0, 1); this.labelCount.Location = new System.Drawing.Point(0, 1);
this.labelCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelCount.Name = "labelCount"; this.labelCount.Name = "labelCount";
this.labelCount.Size = new System.Drawing.Size(108, 22); this.labelCount.Size = new System.Drawing.Size(144, 28);
this.labelCount.TabIndex = 1; this.labelCount.TabIndex = 1;
this.labelCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -202,41 +221,47 @@ ...@@ -202,41 +221,47 @@
// //
this.labelTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.labelTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.labelTime.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.labelTime.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.labelTime.Location = new System.Drawing.Point(540, 1); this.labelTime.Location = new System.Drawing.Point(720, 1);
this.labelTime.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelTime.Name = "labelTime"; this.labelTime.Name = "labelTime";
this.labelTime.Size = new System.Drawing.Size(97, 22); this.labelTime.Size = new System.Drawing.Size(129, 28);
this.labelTime.TabIndex = 0; this.labelTime.TabIndex = 0;
this.labelTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// textBoxFeature // textBoxFeature
// //
this.textBoxFeature.Location = new System.Drawing.Point(556, 16); this.textBoxFeature.Location = new System.Drawing.Point(741, 20);
this.textBoxFeature.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBoxFeature.Name = "textBoxFeature"; this.textBoxFeature.Name = "textBoxFeature";
this.textBoxFeature.Size = new System.Drawing.Size(46, 21); this.textBoxFeature.Size = new System.Drawing.Size(60, 25);
this.textBoxFeature.TabIndex = 8; this.textBoxFeature.TabIndex = 8;
this.textBoxFeature.Text = "200"; this.textBoxFeature.Text = "200";
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(473, 19); this.label1.Location = new System.Drawing.Point(631, 24);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12); this.label1.Size = new System.Drawing.Size(82, 15);
this.label1.TabIndex = 9; this.label1.TabIndex = 9;
this.label1.Text = "元件特征:"; this.label1.Text = "元件特征:";
// //
// 保存当前图片ToolStripMenuItem // button1
// //
this.保存当前图片ToolStripMenuItem.Name = "保存当前图片ToolStripMenuItem"; this.button1.Location = new System.Drawing.Point(263, 18);
this.保存当前图片ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.button1.Name = "button1";
this.保存当前图片ToolStripMenuItem.Text = "保存当前图片"; this.button1.Size = new System.Drawing.Size(75, 23);
this.保存当前图片ToolStripMenuItem.Click += new System.EventHandler(this.保存当前图片ToolStripMenuItem_Click); this.button1.TabIndex = 10;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
// //
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(638, 435); this.ClientSize = new System.Drawing.Size(851, 544);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.textBoxFeature); this.Controls.Add(this.textBoxFeature);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
...@@ -247,6 +272,7 @@ ...@@ -247,6 +272,7 @@
this.Controls.Add(this.buttonOpen); this.Controls.Add(this.buttonOpen);
this.Controls.Add(this.imageBox); this.Controls.Add(this.imageBox);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "MainForm"; this.Name = "MainForm";
this.Text = "上海锐驰点料系统"; this.Text = "上海锐驰点料系统";
this.contextMenuStrip.ResumeLayout(false); this.contextMenuStrip.ResumeLayout(false);
...@@ -277,6 +303,7 @@ ...@@ -277,6 +303,7 @@
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
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.Button button1;
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!