@wang_qi0307 4 роки тому
батько
коміт
669112299a

+ 87 - 57
HOZProject/FormHOZMain.Designer.cs

@@ -86,9 +86,10 @@
             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(12, 12);
+            this.plMain.Location = new System.Drawing.Point(16, 15);
+            this.plMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plMain.Name = "plMain";
-            this.plMain.Size = new System.Drawing.Size(1000, 744);
+            this.plMain.Size = new System.Drawing.Size(1333, 930);
             this.plMain.TabIndex = 1;
             // 
             // plFill
@@ -102,9 +103,10 @@
             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(106, 86);
+            this.plFill.Location = new System.Drawing.Point(141, 108);
+            this.plFill.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plFill.Name = "plFill";
-            this.plFill.Size = new System.Drawing.Size(894, 658);
+            this.plFill.Size = new System.Drawing.Size(1192, 822);
             this.plFill.TabIndex = 5;
             // 
             // groupBox1
@@ -115,9 +117,11 @@
             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(694, 2);
+            this.groupBox1.Location = new System.Drawing.Point(925, 2);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(200, 100);
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox1.Size = new System.Drawing.Size(267, 125);
             this.groupBox1.TabIndex = 26;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "测试设置状态";
@@ -125,18 +129,20 @@
             // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(6, 20);
+            this.textBox1.Location = new System.Drawing.Point(8, 25);
+            this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(100, 21);
+            this.textBox1.Size = new System.Drawing.Size(132, 25);
             this.textBox1.TabIndex = 21;
             this.textBox1.Text = "切孔名称";
             // 
             // button1
             // 
             this.button1.ForeColor = System.Drawing.Color.Black;
-            this.button1.Location = new System.Drawing.Point(119, 20);
+            this.button1.Location = new System.Drawing.Point(159, 25);
+            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 74);
+            this.button1.Size = new System.Drawing.Size(100, 92);
             this.button1.TabIndex = 24;
             this.button1.Text = "测试";
             this.button1.UseVisualStyleBackColor = true;
@@ -148,16 +154,18 @@
             this.comboBox1.Items.AddRange(new object[] {
             "True",
             "False"});
-            this.comboBox1.Location = new System.Drawing.Point(6, 74);
+            this.comboBox1.Location = new System.Drawing.Point(8, 92);
+            this.comboBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.comboBox1.Name = "comboBox1";
-            this.comboBox1.Size = new System.Drawing.Size(100, 20);
+            this.comboBox1.Size = new System.Drawing.Size(132, 23);
             this.comboBox1.TabIndex = 25;
             // 
             // textBox2
             // 
-            this.textBox2.Location = new System.Drawing.Point(6, 47);
+            this.textBox2.Location = new System.Drawing.Point(8, 59);
+            this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(100, 21);
+            this.textBox2.Size = new System.Drawing.Size(132, 25);
             this.textBox2.TabIndex = 22;
             this.textBox2.Text = "编号";
             // 
@@ -165,8 +173,9 @@
             // 
             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(218, 100);
+            this.plPrarInfo.Size = new System.Drawing.Size(291, 125);
             this.plPrarInfo.TabIndex = 2;
             this.plPrarInfo.Visible = false;
             // 
@@ -174,11 +183,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 = 12;
-            this.listmsg.Location = new System.Drawing.Point(417, 2);
-            this.listmsg.Margin = new System.Windows.Forms.Padding(2);
+            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.Name = "listmsg";
-            this.listmsg.Size = new System.Drawing.Size(477, 196);
+            this.listmsg.Size = new System.Drawing.Size(635, 244);
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
@@ -186,8 +195,10 @@
             // 
             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(894, 568);
+            this.pbImage.Size = new System.Drawing.Size(1192, 710);
+            this.pbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
             this.pbImage.TabIndex = 20;
             this.pbImage.TabStop = false;
             // 
@@ -195,9 +206,10 @@
             // 
             this.plSEM.Controls.Add(this.lblFlowContent);
             this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.plSEM.Location = new System.Drawing.Point(0, 568);
+            this.plSEM.Location = new System.Drawing.Point(0, 710);
+            this.plSEM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plSEM.Name = "plSEM";
-            this.plSEM.Size = new System.Drawing.Size(894, 90);
+            this.plSEM.Size = new System.Drawing.Size(1192, 112);
             this.plSEM.TabIndex = 19;
             // 
             // lblFlowContent
@@ -205,9 +217,10 @@
             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(23, 38);
+            this.lblFlowContent.Location = new System.Drawing.Point(31, 48);
+            this.lblFlowContent.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblFlowContent.Name = "lblFlowContent";
-            this.lblFlowContent.Size = new System.Drawing.Size(0, 14);
+            this.lblFlowContent.Size = new System.Drawing.Size(0, 17);
             this.lblFlowContent.TabIndex = 0;
             // 
             // plLeft
@@ -216,9 +229,10 @@
             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, 80);
+            this.plLeft.Location = new System.Drawing.Point(0, 100);
+            this.plLeft.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plLeft.Name = "plLeft";
-            this.plLeft.Size = new System.Drawing.Size(100, 664);
+            this.plLeft.Size = new System.Drawing.Size(133, 830);
             this.plLeft.TabIndex = 4;
             // 
             // label1
@@ -227,9 +241,10 @@
             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(22, 3);
+            this.label1.Location = new System.Drawing.Point(29, 4);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(57, 12);
+            this.label1.Size = new System.Drawing.Size(71, 15);
             this.label1.TabIndex = 1;
             this.label1.Text = "切孔列表";
             // 
@@ -239,9 +254,10 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.plLeftContent.AutoScroll = true;
-            this.plLeftContent.Location = new System.Drawing.Point(5, 19);
+            this.plLeftContent.Location = new System.Drawing.Point(7, 24);
+            this.plLeftContent.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plLeftContent.Name = "plLeftContent";
-            this.plLeftContent.Size = new System.Drawing.Size(90, 645);
+            this.plLeftContent.Size = new System.Drawing.Size(120, 806);
             this.plLeftContent.TabIndex = 0;
             // 
             // plTop
@@ -261,8 +277,9 @@
             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(1000, 80);
+            this.plTop.Size = new System.Drawing.Size(1333, 100);
             this.plTop.TabIndex = 3;
             // 
             // pbStop
@@ -270,9 +287,10 @@
             this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStop.Location = new System.Drawing.Point(447, 4);
+            this.pbStop.Location = new System.Drawing.Point(596, 5);
+            this.pbStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbStop.Name = "pbStop";
-            this.pbStop.Size = new System.Drawing.Size(68, 71);
+            this.pbStop.Size = new System.Drawing.Size(91, 89);
             this.pbStop.TabIndex = 8;
             this.pbStop.TabStop = false;
             this.pbStop.Click += new System.EventHandler(this.pbStop_Click);
@@ -284,9 +302,10 @@
             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(521, 4);
+            this.pbPause.Location = new System.Drawing.Point(695, 5);
+            this.pbPause.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbPause.Name = "pbPause";
-            this.pbPause.Size = new System.Drawing.Size(68, 71);
+            this.pbPause.Size = new System.Drawing.Size(91, 89);
             this.pbPause.TabIndex = 8;
             this.pbPause.TabStop = false;
             this.pbPause.Visible = false;
@@ -296,9 +315,10 @@
             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(373, 4);
+            this.pbStart.Location = new System.Drawing.Point(497, 5);
+            this.pbStart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbStart.Name = "pbStart";
-            this.pbStart.Size = new System.Drawing.Size(68, 71);
+            this.pbStart.Size = new System.Drawing.Size(91, 89);
             this.pbStart.TabIndex = 8;
             this.pbStart.TabStop = false;
             this.pbStart.Click += new System.EventHandler(this.pbStart_Click);
@@ -311,9 +331,10 @@
             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(935, 0);
+            this.pbMax.Location = new System.Drawing.Point(1247, 0);
+            this.pbMax.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbMax.Name = "pbMax";
-            this.pbMax.Size = new System.Drawing.Size(28, 31);
+            this.pbMax.Size = new System.Drawing.Size(37, 39);
             this.pbMax.TabIndex = 7;
             this.pbMax.TabStop = false;
             this.pbMax.Click += new System.EventHandler(this.pbMax_Click);
@@ -326,9 +347,10 @@
             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(901, 0);
+            this.pbMin.Location = new System.Drawing.Point(1201, 0);
+            this.pbMin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbMin.Name = "pbMin";
-            this.pbMin.Size = new System.Drawing.Size(28, 31);
+            this.pbMin.Size = new System.Drawing.Size(37, 39);
             this.pbMin.TabIndex = 7;
             this.pbMin.TabStop = false;
             this.pbMin.Click += new System.EventHandler(this.pbMin_Click);
@@ -341,9 +363,10 @@
             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(969, 0);
+            this.pbClose.Location = new System.Drawing.Point(1292, 0);
+            this.pbClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(28, 31);
+            this.pbClose.Size = new System.Drawing.Size(37, 39);
             this.pbClose.TabIndex = 7;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.pbClose_Click);
@@ -355,9 +378,10 @@
             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(224, 4);
+            this.pbImportTemplateFile.Location = new System.Drawing.Point(299, 5);
+            this.pbImportTemplateFile.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbImportTemplateFile.Name = "pbImportTemplateFile";
-            this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
+            this.pbImportTemplateFile.Size = new System.Drawing.Size(91, 89);
             this.pbImportTemplateFile.TabIndex = 6;
             this.pbImportTemplateFile.TabStop = false;
             this.pbImportTemplateFile.Click += new System.EventHandler(this.pbImportTemplateFile_Click);
@@ -367,9 +391,10 @@
             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(297, 4);
+            this.pbLog.Location = new System.Drawing.Point(396, 5);
+            this.pbLog.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbLog.Name = "pbLog";
-            this.pbLog.Size = new System.Drawing.Size(68, 71);
+            this.pbLog.Size = new System.Drawing.Size(91, 89);
             this.pbLog.TabIndex = 6;
             this.pbLog.TabStop = false;
             this.pbLog.Click += new System.EventHandler(this.pbLog_Click);
@@ -379,9 +404,10 @@
             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(151, 4);
+            this.pbInit.Location = new System.Drawing.Point(201, 5);
+            this.pbInit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbInit.Name = "pbInit";
-            this.pbInit.Size = new System.Drawing.Size(68, 71);
+            this.pbInit.Size = new System.Drawing.Size(91, 89);
             this.pbInit.TabIndex = 5;
             this.pbInit.TabStop = false;
             this.pbInit.Click += new System.EventHandler(this.pbInit_Click);
@@ -391,9 +417,10 @@
             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(78, 4);
+            this.pbSave.Location = new System.Drawing.Point(104, 5);
+            this.pbSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbSave.Name = "pbSave";
-            this.pbSave.Size = new System.Drawing.Size(68, 71);
+            this.pbSave.Size = new System.Drawing.Size(91, 89);
             this.pbSave.TabIndex = 4;
             this.pbSave.TabStop = false;
             this.pbSave.Click += new System.EventHandler(this.pbSave_Click);
@@ -403,9 +430,10 @@
             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(5, 4);
+            this.pbOpen.Location = new System.Drawing.Point(7, 5);
+            this.pbOpen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbOpen.Name = "pbOpen";
-            this.pbOpen.Size = new System.Drawing.Size(68, 71);
+            this.pbOpen.Size = new System.Drawing.Size(91, 89);
             this.pbOpen.TabIndex = 3;
             this.pbOpen.TabStop = false;
             this.pbOpen.Click += new System.EventHandler(this.pbOpen_Click);
@@ -415,9 +443,10 @@
             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(5, 4);
+            this.pbNew.Location = new System.Drawing.Point(7, 5);
+            this.pbNew.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbNew.Name = "pbNew";
-            this.pbNew.Size = new System.Drawing.Size(68, 71);
+            this.pbNew.Size = new System.Drawing.Size(91, 89);
             this.pbNew.TabIndex = 3;
             this.pbNew.TabStop = false;
             this.pbNew.Visible = false;
@@ -425,13 +454,14 @@
             // 
             // FormHOZMain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.WindowFrame;
-            this.ClientSize = new System.Drawing.Size(1024, 768);
+            this.ClientSize = new System.Drawing.Size(1365, 960);
             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";

+ 32 - 6
HOZProject/FormHOZMain.cs

@@ -475,17 +475,28 @@ namespace HOZProject
                         Button btnCutHole = (Button)cutHole.Controls.Find("btnCutHole", false)[0];
                         switch (States)
                         {
-                            //开始运行
-                            case (int)State.Unmeasured:
+                            //运行
+                            case (int)ThreadState.InProcess:
                                 btnCutHole.BackColor = Color.Yellow;
+                                ChangeCutHoleMeasureState(CutHoleName, States);
+                                break;
+                            //等待
+                            case (int)ThreadState.Waiting:
+                                btnCutHole.BackColor = Color.Yellow;
+                                ChangeCutHoleMeasureState(CutHoleName, States);
+                                break;
+                            //准备
+                            case (int)ThreadState.Ready:
+                                btnCutHole.BackColor = Color.Yellow;
+                                ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //失败
-                            case (int)State.Failed:
+                            case (int)ThreadState.Failed:
                                 btnCutHole.BackColor = Color.Red;
                                 ChangeCutHoleMeasureState(CutHoleName, States);
                                 break;
                             //完成
-                            case (int)State.Success:
+                            case (int)ThreadState.Success:
                                 btnCutHole.BackColor = Color.GreenYellow;
                                 //修改切孔状态
                                 ChangeCutHoleMeasureState(CutHoleName, States);
@@ -513,13 +524,28 @@ namespace HOZProject
 
                             switch (States)
                             {
+                                //准备
+                                case (int)ThreadState.Ready:
+                                    //修改切孔状态
+                                    uControl_ParaInfo.lblShowState.Text = "准备";
+                                    break;
+                                //等待
+                                case (int)ThreadState.Waiting:
+                                    //修改切孔状态
+                                    uControl_ParaInfo.lblShowState.Text = "等待";
+                                    break;
+                                //进行中
+                                case (int)ThreadState.InProcess:
+                                    //修改切孔状态
+                                    uControl_ParaInfo.lblShowState.Text = "进行中";
+                                    break;
                                 //完成
-                                case (int)State.Success:
+                                case (int)ThreadState.Success:
                                     //修改切孔状态
                                     uControl_ParaInfo.lblShowState.Text = "完成";
                                     break;
                                 //失败
-                                case (int)State.Failed:
+                                case (int)ThreadState.Failed:
                                     uControl_ParaInfo.lblShowState.Text = "失败";
                                     break;
                             }

+ 4 - 4
HOZProject/MeasureXML/MeasureStructXml.xml

@@ -3,7 +3,7 @@
   <MeasureFlow Name="测量流程">
     <Step Index="0"  Code="1-0" IsData="False" Type="Pt" IsShow="True" Title="PT针插入" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
     <Step Index="1"  Code="1-1" IsData="False" Type="Photo" IsShow="True" Title="放大指定倍数" Details="控制SEM放大倍数"></Step>
-    <Step Index="2"  Code="1-2" IsData="False" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="2"  Code="1-2" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
     <Step Index="3"  Code="1-3" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
     <Step Index="4"  Code="1-4" IsData="True" Type="Photo" IsShow="True" Title="SEM拍照" Details="控制SEM对分析位置拍照保存照片"></Step>
     <Step Index="5"  Code="1-5" IsData="False" Type="FIB" IsShow="True" Title="切换到FIB模式" Details="切换到FIB模式"></Step>
@@ -21,19 +21,19 @@
 
     <Step Index="16" Code="1-16" IsData="False" Type="FIB" IsShow="True" Title="切换到SEM模式" Details="从FIB模式切换到SEM模式"></Step>
     <Step Index="17" Code="1-17" IsData="False" Type="FIB" IsShow="True" Title="放大指定倍数/2" Details="控制SEM放大倍数"></Step>
-    <Step Index="18" Code="1-18" IsData="False" Type="FIB" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="18" Code="1-18" IsData="True" Type="FIB" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
     <Step Index="19" Code="1-19" IsData="True" Type="FIB" IsShow="True" Title="SEM拍照" Details="控制SEM对分析位置拍照"></Step>
     <Step Index="20" Code="1-20" IsData="False" Type="FIB" IsShow="True" Title="获取位置并移动样品台" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
     <Step Index="21" Code="1-21" IsData="False" Type="FIB" IsShow="True" Title="校验位置" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
     
     <Step Index="22" Code="1-22" IsData="False" Type="Photo" IsShow="True" Title="放大指定倍数" Details="控制SEM放大到指定参数大小范围"></Step>
-    <Step Index="23" Code="1-23" IsData="False" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+    <Step Index="23" Code="1-23" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
     <Step Index="24" Code="1-24" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM角度补偿"></Step>
     <Step Index="25" Code="1-25" IsData="True" Type="Photo" IsShow="True" Title="SEM拍照" Details="设置图片名称、保存图片"></Step>
     <Step Index="26" Code="1-26" IsData="False" Type="Photo" IsShow="True" Title="获取梯形位置并移动样品台" Details="获取坐标并移动到对应位置"></Step>
     <Step Index="27" Code="1-27" IsData="False" Type="Photo" IsShow="True" Title="样品台位置验证" Details="根据坐标控制SEM移动到分析位置"></Step>
     
-    <Step Index="28" Code="1-28" IsData="False" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+    <Step Index="28" Code="1-28" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
     <Step Index="29" Code="1-29" IsData="True" Type="Photo" IsShow="True" Title="SEM拍照" Details="控制SEM对分析位置拍照"></Step>
     <Step Index="30" Code="1-30" IsData="False" Type="Photo" IsShow="True" Title="SEM光束复位" Details="控制SEM取消电子束校正,回到初始值"></Step>
     <Step Index="31" Code="1-31" IsData="False" Type="FIB" IsShow="True" Title="自动层高分析" Details="自动进行层高分析"></Step>

+ 5 - 8
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -63,22 +63,19 @@ namespace HOZProject
                 //完成状态数量
                 int finishCount = 0;
                 //未完成状态数量
-                int unFinishedCount = 0;
+                int unFinishedCount = TlItem.Length;
                 foreach (TimeLineItem item in TlItem)
                 {
-                    if (item.State == (int)MeasureData.State.Success)
+                    if (item.State>0)
                     {
                         finishCount++;
                     }
-                    if (item.State != (int)MeasureData.State.Success)
-                    {
-                        unFinishedCount++;
-                    }
                 }
                 try
                 {
-                    pbMeasure.Value = finishCount / unFinishedCount;
-                    lblCompletedAmount.Text = finishCount / unFinishedCount + "%";
+                    int pbValue = (int)((float)finishCount / (float)unFinishedCount*100);
+                    pbMeasure.Value = pbValue;
+                    lblCompletedAmount.Text = pbValue + "%";
                 }
                 catch (Exception)
                 {