Forráskód Böngészése

Merge branch 'master' of http://192.168.1.123:10080/SDD1/HOZ

HaoShuang 4 éve
szülő
commit
9f090c3b6c

+ 14 - 0
HOZProject/App.config

@@ -63,5 +63,19 @@
       <!--距离、矩阵-->
       <add key="distance" value="30"/>
       <add key="rag" value="4"/>
+
+      <!--样品台保护-->
+      <add key="X_min" value="0"/>
+      <add key="X_max" value="0.13"/>
+      <add key="Y_min" value="0"/>
+      <add key="Y_max" value="0.13"/>
+      <add key="Z_min" value="0"/>
+      <add key="Z_max" value="0.05"/>
+      <add key="T_min" value="-4"/>
+      <add key="T_max" value="70"/>
+      <add key="R_min" value="-380"/>
+      <add key="R_max" value="380"/>
+      <add key="M_min" value="0"/>
+      <add key="M_max" value="0.012"/>
     </appSettings>
 </configuration>

+ 59 - 89
HOZProject/FormHOZMain.Designer.cs

@@ -87,10 +87,9 @@
             this.plMain.Controls.Add(this.plFill);
             this.plMain.Controls.Add(this.plLeft);
             this.plMain.Controls.Add(this.plTop);
-            this.plMain.Location = new System.Drawing.Point(16, 15);
-            this.plMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.plMain.Location = new System.Drawing.Point(12, 12);
             this.plMain.Name = "plMain";
-            this.plMain.Size = new System.Drawing.Size(1333, 930);
+            this.plMain.Size = new System.Drawing.Size(1000, 744);
             this.plMain.TabIndex = 1;
             // 
             // plFill
@@ -104,10 +103,9 @@
             this.plFill.Controls.Add(this.listmsg);
             this.plFill.Controls.Add(this.pbImage);
             this.plFill.Controls.Add(this.plSEM);
-            this.plFill.Location = new System.Drawing.Point(141, 108);
-            this.plFill.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.plFill.Location = new System.Drawing.Point(106, 86);
             this.plFill.Name = "plFill";
-            this.plFill.Size = new System.Drawing.Size(1192, 822);
+            this.plFill.Size = new System.Drawing.Size(894, 658);
             this.plFill.TabIndex = 5;
             // 
             // groupBox1
@@ -118,11 +116,9 @@
             this.groupBox1.Controls.Add(this.comboBox1);
             this.groupBox1.Controls.Add(this.textBox2);
             this.groupBox1.ForeColor = System.Drawing.Color.White;
-            this.groupBox1.Location = new System.Drawing.Point(925, 2);
-            this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox1.Location = new System.Drawing.Point(694, 2);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.groupBox1.Size = new System.Drawing.Size(267, 125);
+            this.groupBox1.Size = new System.Drawing.Size(200, 100);
             this.groupBox1.TabIndex = 26;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "测试设置状态";
@@ -130,20 +126,18 @@
             // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(8, 25);
-            this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.textBox1.Location = new System.Drawing.Point(6, 20);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(132, 25);
+            this.textBox1.Size = new System.Drawing.Size(100, 21);
             this.textBox1.TabIndex = 21;
             this.textBox1.Text = "切孔名称";
             // 
             // button1
             // 
             this.button1.ForeColor = System.Drawing.Color.Black;
-            this.button1.Location = new System.Drawing.Point(159, 25);
-            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button1.Location = new System.Drawing.Point(119, 20);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(100, 92);
+            this.button1.Size = new System.Drawing.Size(75, 74);
             this.button1.TabIndex = 24;
             this.button1.Text = "测试";
             this.button1.UseVisualStyleBackColor = true;
@@ -155,18 +149,16 @@
             this.comboBox1.Items.AddRange(new object[] {
             "True",
             "False"});
-            this.comboBox1.Location = new System.Drawing.Point(8, 92);
-            this.comboBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.comboBox1.Location = new System.Drawing.Point(6, 74);
             this.comboBox1.Name = "comboBox1";
-            this.comboBox1.Size = new System.Drawing.Size(132, 23);
+            this.comboBox1.Size = new System.Drawing.Size(100, 20);
             this.comboBox1.TabIndex = 25;
             // 
             // textBox2
             // 
-            this.textBox2.Location = new System.Drawing.Point(8, 59);
-            this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.textBox2.Location = new System.Drawing.Point(6, 47);
             this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(132, 25);
+            this.textBox2.Size = new System.Drawing.Size(100, 21);
             this.textBox2.TabIndex = 22;
             this.textBox2.Text = "编号";
             // 
@@ -174,9 +166,8 @@
             // 
             this.plPrarInfo.BackColor = System.Drawing.Color.White;
             this.plPrarInfo.Location = new System.Drawing.Point(0, 0);
-            this.plPrarInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plPrarInfo.Name = "plPrarInfo";
-            this.plPrarInfo.Size = new System.Drawing.Size(291, 125);
+            this.plPrarInfo.Size = new System.Drawing.Size(218, 100);
             this.plPrarInfo.TabIndex = 2;
             this.plPrarInfo.Visible = false;
             // 
@@ -184,11 +175,11 @@
             // 
             this.listmsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.listmsg.FormattingEnabled = true;
-            this.listmsg.ItemHeight = 15;
-            this.listmsg.Location = new System.Drawing.Point(556, 2);
-            this.listmsg.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.listmsg.ItemHeight = 12;
+            this.listmsg.Location = new System.Drawing.Point(417, 2);
+            this.listmsg.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.listmsg.Name = "listmsg";
-            this.listmsg.Size = new System.Drawing.Size(635, 244);
+            this.listmsg.Size = new System.Drawing.Size(477, 196);
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
@@ -196,9 +187,8 @@
             // 
             this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
             this.pbImage.Location = new System.Drawing.Point(0, 0);
-            this.pbImage.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(1192, 752);
+            this.pbImage.Size = new System.Drawing.Size(894, 602);
             this.pbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
             this.pbImage.TabIndex = 20;
             this.pbImage.TabStop = false;
@@ -209,10 +199,9 @@
             this.plSEM.Controls.Add(this.lblStateMessage);
             this.plSEM.Controls.Add(this.lblFlowContent);
             this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.plSEM.Location = new System.Drawing.Point(0, 752);
-            this.plSEM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.plSEM.Location = new System.Drawing.Point(0, 602);
             this.plSEM.Name = "plSEM";
-            this.plSEM.Size = new System.Drawing.Size(1192, 70);
+            this.plSEM.Size = new System.Drawing.Size(894, 56);
             this.plSEM.TabIndex = 19;
             // 
             // lblStateMessage
@@ -221,10 +210,9 @@
             this.lblStateMessage.BackColor = System.Drawing.Color.Black;
             this.lblStateMessage.Font = new System.Drawing.Font("宋体", 10F);
             this.lblStateMessage.ForeColor = System.Drawing.Color.White;
-            this.lblStateMessage.Location = new System.Drawing.Point(873, 19);
-            this.lblStateMessage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblStateMessage.Location = new System.Drawing.Point(655, 15);
             this.lblStateMessage.Name = "lblStateMessage";
-            this.lblStateMessage.Size = new System.Drawing.Size(310, 30);
+            this.lblStateMessage.Size = new System.Drawing.Size(232, 24);
             this.lblStateMessage.TabIndex = 1;
             this.lblStateMessage.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             // 
@@ -233,10 +221,9 @@
             this.lblFlowContent.AutoSize = true;
             this.lblFlowContent.Font = new System.Drawing.Font("宋体", 10F);
             this.lblFlowContent.ForeColor = System.Drawing.Color.White;
-            this.lblFlowContent.Location = new System.Drawing.Point(33, 26);
-            this.lblFlowContent.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblFlowContent.Location = new System.Drawing.Point(25, 21);
             this.lblFlowContent.Name = "lblFlowContent";
-            this.lblFlowContent.Size = new System.Drawing.Size(0, 17);
+            this.lblFlowContent.Size = new System.Drawing.Size(0, 14);
             this.lblFlowContent.TabIndex = 0;
             // 
             // plLeft
@@ -245,10 +232,9 @@
             this.plLeft.Controls.Add(this.label1);
             this.plLeft.Controls.Add(this.plLeftContent);
             this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
-            this.plLeft.Location = new System.Drawing.Point(0, 100);
-            this.plLeft.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.plLeft.Location = new System.Drawing.Point(0, 80);
             this.plLeft.Name = "plLeft";
-            this.plLeft.Size = new System.Drawing.Size(133, 830);
+            this.plLeft.Size = new System.Drawing.Size(100, 664);
             this.plLeft.TabIndex = 4;
             // 
             // label1
@@ -257,10 +243,9 @@
             this.label1.BackColor = System.Drawing.Color.Transparent;
             this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.Color.Gainsboro;
-            this.label1.Location = new System.Drawing.Point(29, 4);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(22, 3);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(71, 15);
+            this.label1.Size = new System.Drawing.Size(57, 12);
             this.label1.TabIndex = 1;
             this.label1.Text = "切孔列表";
             // 
@@ -270,10 +255,9 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.plLeftContent.AutoScroll = true;
-            this.plLeftContent.Location = new System.Drawing.Point(7, 24);
-            this.plLeftContent.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.plLeftContent.Location = new System.Drawing.Point(5, 19);
             this.plLeftContent.Name = "plLeftContent";
-            this.plLeftContent.Size = new System.Drawing.Size(120, 806);
+            this.plLeftContent.Size = new System.Drawing.Size(90, 645);
             this.plLeftContent.TabIndex = 0;
             // 
             // plTop
@@ -293,9 +277,8 @@
             this.plTop.Controls.Add(this.pbNew);
             this.plTop.Dock = System.Windows.Forms.DockStyle.Top;
             this.plTop.Location = new System.Drawing.Point(0, 0);
-            this.plTop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plTop.Name = "plTop";
-            this.plTop.Size = new System.Drawing.Size(1333, 100);
+            this.plTop.Size = new System.Drawing.Size(1000, 80);
             this.plTop.TabIndex = 3;
             // 
             // pbStop
@@ -304,10 +287,9 @@
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbStop.Enabled = false;
-            this.pbStop.Location = new System.Drawing.Point(596, 5);
-            this.pbStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbStop.Location = new System.Drawing.Point(447, 4);
             this.pbStop.Name = "pbStop";
-            this.pbStop.Size = new System.Drawing.Size(91, 89);
+            this.pbStop.Size = new System.Drawing.Size(68, 71);
             this.pbStop.TabIndex = 8;
             this.pbStop.TabStop = false;
             this.pbStop.Click += new System.EventHandler(this.pbStop_Click);
@@ -319,10 +301,9 @@
             this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
             this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbPause.Location = new System.Drawing.Point(695, 5);
-            this.pbPause.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbPause.Location = new System.Drawing.Point(521, 4);
             this.pbPause.Name = "pbPause";
-            this.pbPause.Size = new System.Drawing.Size(91, 89);
+            this.pbPause.Size = new System.Drawing.Size(68, 71);
             this.pbPause.TabIndex = 8;
             this.pbPause.TabStop = false;
             this.pbPause.Visible = false;
@@ -332,10 +313,9 @@
             this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start;
             this.pbStart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStart.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStart.Location = new System.Drawing.Point(497, 5);
-            this.pbStart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbStart.Location = new System.Drawing.Point(373, 4);
             this.pbStart.Name = "pbStart";
-            this.pbStart.Size = new System.Drawing.Size(91, 89);
+            this.pbStart.Size = new System.Drawing.Size(68, 71);
             this.pbStart.TabIndex = 8;
             this.pbStart.TabStop = false;
             this.pbStart.Click += new System.EventHandler(this.pbStart_Click);
@@ -348,10 +328,9 @@
             this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Max_Gray;
             this.pbMax.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbMax.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbMax.Location = new System.Drawing.Point(1247, 0);
-            this.pbMax.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbMax.Location = new System.Drawing.Point(935, 0);
             this.pbMax.Name = "pbMax";
-            this.pbMax.Size = new System.Drawing.Size(37, 39);
+            this.pbMax.Size = new System.Drawing.Size(28, 31);
             this.pbMax.TabIndex = 7;
             this.pbMax.TabStop = false;
             this.pbMax.Click += new System.EventHandler(this.pbMax_Click);
@@ -364,10 +343,9 @@
             this.pbMin.BackgroundImage = global::HOZProject.Properties.Resources.Min_Gray;
             this.pbMin.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbMin.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbMin.Location = new System.Drawing.Point(1201, 0);
-            this.pbMin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbMin.Location = new System.Drawing.Point(901, 0);
             this.pbMin.Name = "pbMin";
-            this.pbMin.Size = new System.Drawing.Size(37, 39);
+            this.pbMin.Size = new System.Drawing.Size(28, 31);
             this.pbMin.TabIndex = 7;
             this.pbMin.TabStop = false;
             this.pbMin.Click += new System.EventHandler(this.pbMin_Click);
@@ -380,10 +358,9 @@
             this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbClose.Location = new System.Drawing.Point(1292, 0);
-            this.pbClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbClose.Location = new System.Drawing.Point(969, 0);
             this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(37, 39);
+            this.pbClose.Size = new System.Drawing.Size(28, 31);
             this.pbClose.TabIndex = 7;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.pbClose_Click);
@@ -395,10 +372,9 @@
             this.pbImportTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportConfigFile;
             this.pbImportTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbImportTemplateFile.Location = new System.Drawing.Point(299, 5);
-            this.pbImportTemplateFile.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbImportTemplateFile.Location = new System.Drawing.Point(224, 4);
             this.pbImportTemplateFile.Name = "pbImportTemplateFile";
-            this.pbImportTemplateFile.Size = new System.Drawing.Size(91, 89);
+            this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
             this.pbImportTemplateFile.TabIndex = 6;
             this.pbImportTemplateFile.TabStop = false;
             this.pbImportTemplateFile.Click += new System.EventHandler(this.pbImportTemplateFile_Click);
@@ -408,10 +384,9 @@
             this.pbLog.BackgroundImage = global::HOZProject.Properties.Resources.Log;
             this.pbLog.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbLog.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbLog.Location = new System.Drawing.Point(396, 5);
-            this.pbLog.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbLog.Location = new System.Drawing.Point(297, 4);
             this.pbLog.Name = "pbLog";
-            this.pbLog.Size = new System.Drawing.Size(91, 89);
+            this.pbLog.Size = new System.Drawing.Size(68, 71);
             this.pbLog.TabIndex = 6;
             this.pbLog.TabStop = false;
             this.pbLog.Click += new System.EventHandler(this.pbLog_Click);
@@ -421,10 +396,9 @@
             this.pbInit.BackgroundImage = global::HOZProject.Properties.Resources.init;
             this.pbInit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbInit.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbInit.Location = new System.Drawing.Point(201, 5);
-            this.pbInit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbInit.Location = new System.Drawing.Point(151, 4);
             this.pbInit.Name = "pbInit";
-            this.pbInit.Size = new System.Drawing.Size(91, 89);
+            this.pbInit.Size = new System.Drawing.Size(68, 71);
             this.pbInit.TabIndex = 5;
             this.pbInit.TabStop = false;
             this.pbInit.Click += new System.EventHandler(this.pbInit_Click);
@@ -434,10 +408,9 @@
             this.pbSave.BackgroundImage = global::HOZProject.Properties.Resources.save;
             this.pbSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbSave.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbSave.Location = new System.Drawing.Point(104, 5);
-            this.pbSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbSave.Location = new System.Drawing.Point(78, 4);
             this.pbSave.Name = "pbSave";
-            this.pbSave.Size = new System.Drawing.Size(91, 89);
+            this.pbSave.Size = new System.Drawing.Size(68, 71);
             this.pbSave.TabIndex = 4;
             this.pbSave.TabStop = false;
             this.pbSave.Click += new System.EventHandler(this.pbSave_Click);
@@ -447,10 +420,9 @@
             this.pbOpen.BackgroundImage = global::HOZProject.Properties.Resources.open;
             this.pbOpen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbOpen.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbOpen.Location = new System.Drawing.Point(7, 5);
-            this.pbOpen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbOpen.Location = new System.Drawing.Point(5, 4);
             this.pbOpen.Name = "pbOpen";
-            this.pbOpen.Size = new System.Drawing.Size(91, 89);
+            this.pbOpen.Size = new System.Drawing.Size(68, 71);
             this.pbOpen.TabIndex = 3;
             this.pbOpen.TabStop = false;
             this.pbOpen.Click += new System.EventHandler(this.pbOpen_Click);
@@ -460,10 +432,9 @@
             this.pbNew.BackgroundImage = global::HOZProject.Properties.Resources.New;
             this.pbNew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbNew.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbNew.Location = new System.Drawing.Point(7, 5);
-            this.pbNew.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbNew.Location = new System.Drawing.Point(5, 4);
             this.pbNew.Name = "pbNew";
-            this.pbNew.Size = new System.Drawing.Size(91, 89);
+            this.pbNew.Size = new System.Drawing.Size(68, 71);
             this.pbNew.TabIndex = 3;
             this.pbNew.TabStop = false;
             this.pbNew.Visible = false;
@@ -471,14 +442,13 @@
             // 
             // FormHOZMain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.WindowFrame;
-            this.ClientSize = new System.Drawing.Size(1365, 960);
+            this.ClientSize = new System.Drawing.Size(1024, 768);
             this.ControlBox = false;
             this.Controls.Add(this.plMain);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "FormHOZMain";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "FormHOZMain";

+ 29 - 5
HOZProject/FormHOZMain.cs

@@ -92,6 +92,20 @@ namespace HOZProject
                 m_MeasureFile.MParam.AutoFocus.Range = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_Range"].ToString());
                 m_MeasureFile.MParam.AutoFocus.fStep = Convert.ToSingle(ConfigurationManager.AppSettings["Focus_FStep"].ToString());
 
+                m_Ms.X_Min = Convert.ToSingle(ConfigurationManager.AppSettings["X_Min"]);
+                m_Ms.X_Max = Convert.ToSingle(ConfigurationManager.AppSettings["X_Max"]);
+                m_Ms.Y_Min = Convert.ToSingle(ConfigurationManager.AppSettings["Y_Min"]);
+                m_Ms.Y_Max = Convert.ToSingle(ConfigurationManager.AppSettings["Y_Max"]);
+                m_Ms.Z_Min = Convert.ToSingle(ConfigurationManager.AppSettings["Z_Min"]);
+                m_Ms.Z_Max = Convert.ToSingle(ConfigurationManager.AppSettings["Z_Max"]);
+                m_Ms.T_Min = Convert.ToSingle(ConfigurationManager.AppSettings["T_Min"]);
+                m_Ms.T_Max = Convert.ToSingle(ConfigurationManager.AppSettings["T_Max"]);
+                m_Ms.R_Min = Convert.ToSingle(ConfigurationManager.AppSettings["R_Min"]);
+                m_Ms.R_Max = Convert.ToSingle(ConfigurationManager.AppSettings["R_Max"]);
+                m_Ms.M_Min = Convert.ToSingle(ConfigurationManager.AppSettings["M_Min"]);
+                m_Ms.M_Max = Convert.ToSingle(ConfigurationManager.AppSettings["M_Max"]);
+
+
                 m_Ms.InitMeas(m_MeasureFile);
                 m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage); //注册事件
                 m_Ms.SendCutHolesStatus += new CutHolesStatusHandler(displayCutHoleMessage); //注册事件
@@ -544,27 +558,37 @@ namespace HOZProject
                         {
                             //运行中
                             case (int)ThreadState.InProcess:
-                                btnCutHole.BackColor = Color.Yellow;
+                                //btnCutHole.BackColor = Color.Yellow;
+                                btnCutHole.BackgroundImage = Properties.Resources.CutHole_Yellow;
+                                btnCutHole.BackgroundImageLayout = ImageLayout.Center;
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //等待
                             case (int)ThreadState.Waiting:
-                                btnCutHole.BackColor = Color.Yellow;
+                                //btnCutHole.BackColor = Color.Yellow;
+                                btnCutHole.BackgroundImage = Properties.Resources.CutHole_Yellow;
+                                btnCutHole.BackgroundImageLayout = ImageLayout.Center;
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //准备
                             case (int)ThreadState.Ready:
-                                btnCutHole.BackColor = Color.White;
+                                //btnCutHole.BackColor = Color.White;
+                                btnCutHole.BackgroundImage = Properties.Resources.CutHole_Gray;
+                                btnCutHole.BackgroundImageLayout = ImageLayout.Center;
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //失败
                             case (int)ThreadState.Failed:
-                                btnCutHole.BackColor = Color.Red;
+                                //btnCutHole.BackColor = Color.Red;
+                                btnCutHole.BackgroundImage = Properties.Resources.CutHole_Red;
+                                btnCutHole.BackgroundImageLayout = ImageLayout.Center;
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //完成
                             case (int)ThreadState.Success:
-                                btnCutHole.BackColor = Color.GreenYellow;
+                                //btnCutHole.BackColor = Color.GreenYellow;
+                                btnCutHole.BackgroundImage = Properties.Resources.CutHole_Green;
+                                btnCutHole.BackgroundImageLayout = ImageLayout.Center;
                                 //修改切孔状态
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;

+ 40 - 0
HOZProject/Properties/Resources.Designer.cs

@@ -90,6 +90,46 @@ namespace HOZProject.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap CutHole_Gray {
+            get {
+                object obj = ResourceManager.GetObject("CutHole_Gray", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap CutHole_Green {
+            get {
+                object obj = ResourceManager.GetObject("CutHole_Green", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap CutHole_Red {
+            get {
+                object obj = ResourceManager.GetObject("CutHole_Red", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap CutHole_Yellow {
+            get {
+                object obj = ResourceManager.GetObject("CutHole_Yellow", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 12 - 0
HOZProject/Properties/Resources.resx

@@ -211,4 +211,16 @@
   <data name="Stop_Red" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\Stop_Red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="CutHole_Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\CutHole_Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="CutHole_Green" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\CutHole_Green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="CutHole_Red" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\CutHole_Red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="CutHole_Yellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\CutHole_Yellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

BIN
HOZProject/Resources/CutHole_Gray.png


BIN
HOZProject/Resources/CutHole_Green.png


BIN
HOZProject/Resources/CutHole_Red.png


BIN
HOZProject/Resources/CutHole_Yellow.png


BIN
HOZProject/Resources/Start.png


BIN
HOZProject/Resources/Start_Green.png


+ 4 - 0
HOZProject/UnitControl.csproj

@@ -283,6 +283,10 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       <SubType>Designer</SubType>
     </Content>
+    <None Include="Resources\CutHole_Yellow.png" />
+    <None Include="Resources\CutHole_Red.png" />
+    <None Include="Resources\CutHole_Green.png" />
+    <None Include="Resources\CutHole_Gray.png" />
     <None Include="Resources\Start_Green.png" />
     <None Include="Resources\Stop_Red.png" />
   </ItemGroup>

+ 1 - 9
HOZProject/UserControls/UControl_CutHole.cs

@@ -40,17 +40,9 @@ namespace HOZProject
 
         private void tsShowProcess_Click(object sender, EventArgs e)
         {
-            //ClearProcessControls();
-            //显示检测过程信息
-            //UControl_Process uControl_Process = new UControl_Process(FormHOZMainObject);
-            //FormHOZMainObject.plPrarInfo.Width = uControl_Process.Width;
-            //FormHOZMainObject.plPrarInfo.Height = uControl_Process.Height;
-            //uControl_Process.Dock = DockStyle.Fill;
-            //FormHOZMainObject.plPrarInfo.Location = uControl_Process.Location;
-            //FormHOZMainObject.plPrarInfo.Controls.Add(uControl_Process);
-            //FormHOZMainObject.plPrarInfo.Visible = true;
         }
 
+
         private void tsShowParaInfo_Click(object sender, EventArgs e)
         {
             //显示处理信息

+ 48 - 17
MeasureThread/Measure.cs

@@ -404,8 +404,23 @@ namespace MeasureThread
             }
         }
 
+        //Web接口类
         public WebResult wr = null;
 
+        //样品台保护值
+        public float X_Min = 0;
+        public float X_Max = 0.13f;
+        public float Y_Min = 0;
+        public float Y_Max = 0.13f;
+        public float Z_Min = 0;
+        public float Z_Max = 0.05f;
+        public float T_Min = -4;
+        public float T_Max = 70;
+        public float R_Min = -380;
+        public float R_Max = 380;
+        public float M_Min = 0;
+        public float M_Max = 0.012f;
+
         public event ThreadStatusHandler SendThreadStatus;  // 声明事件
         public event CutHolesStatusHandler SendCutHolesStatus;  // 声明事件
 
@@ -1366,7 +1381,12 @@ namespace MeasureThread
                 if (state == 1)
                 {
                     //拉直操作
-                    Straightening(angle, 65, 65, x1, y1, ref x2, ref y2);
+                    iSEM.SetScanRotationOn();
+                    Thread.Sleep(1000);
+                    iSEM.SetScanRotation(angle);
+                    Thread.Sleep(5000);
+
+                    //Straightening(angle, 65, 65, x1, y1, ref x2, ref y2);
                     //1. 根据客户PT沉积坐标控制FIB调整到中心位置???????
                     if (!iSEM.MoveStageXY(x2, y2))
                     {
@@ -1640,8 +1660,11 @@ namespace MeasureThread
             {
                 return false;
             }
-            //14光束复位
+            //14光束复位和Rotation关闭开关
+            iSEM.SetScanRotationOff();
+            Thread.Sleep(1000);
             iSEM.SetBeamShiftX(0);
+            Thread.Sleep(1000);
             iSEM.SetBeamShiftY(0);
             Thread.Sleep(3000);
             arg.Message = "光束复位成功";
@@ -2141,6 +2164,11 @@ namespace MeasureThread
                 //SendMsg("禁止样品台恢复到水平");
                 return false;
             }
+            //判断是否停止进程
+            if (key_stop)
+            {
+                return false;
+            }
 
             //2. 调节样品1号孔的样品台6轴坐标
             //3. 将样品1号孔坐标2存入数据库
@@ -2149,7 +2177,6 @@ namespace MeasureThread
             {
                 return false;
             }
-
             while (true)
             {
                 Thread.Sleep(10000);
@@ -2159,17 +2186,21 @@ namespace MeasureThread
                     break;
                 }
             }
+            //判断是否停止进程
+            if (key_stop)
+            {
+                return false;
+            }
 
             //5. 获取光镜2号孔XY坐标
             //SendMsg("移动到"+m_nWorkHoleNo+"号孔位置:(" + currentHole.Position.X.ToString()+","+currentHole.Position.Y.ToString()+")");
-                    
+
             //6. 根据光镜坐标控制样品台移动
             if (!iSEM.MoveStageXY(currentHole.Position.X, currentHole.Position.Y))
             {
                 //SendMsg("移动失败");
                 return false;
             }
-
             while (true)
             {
                 Thread.Sleep(10000);
@@ -2178,7 +2209,12 @@ namespace MeasureThread
                 {
                     break;
                 }
-            }                    
+            }
+            //判断是否停止进程
+            if (key_stop)
+            {
+                return false;
+            }
 
             //7. 控制样品台,调整T轴54度、M/Z/R轴不变
             if (DialogResult.Yes == MessageBox.Show("样品台可以旋转吗?", "确认消息", MessageBoxButtons.YesNo))
@@ -2196,7 +2232,6 @@ namespace MeasureThread
             {
                 return false;
             }
-
             while (true)
             {
                 Thread.Sleep(10000);
@@ -2206,6 +2241,11 @@ namespace MeasureThread
                     break;
                 }
             }
+            //判断是否停止进程
+            if (key_stop)
+            {
+                return false;
+            }
 
             //SendMsg("拉直操作");
 
@@ -2216,16 +2256,7 @@ namespace MeasureThread
             {
                 return false;
             }
-            //2. 定位切割
-            {
-                //1. 拉直操作
-                {
-                    //1.1 控制SEM进行拍照
-                    //1.2 图片传给客户,返回偏移角度
-                    //1.3 根据返回角度,控制样品台转动
-                }
-                //2. 与1号孔13步相同
-            }
+
             return true;
         }