wb_han 5 роки тому
батько
коміт
8a44dea50f

+ 73 - 34
HOZProject/FormHOZMain.cs

@@ -7,6 +7,7 @@ using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.Linq;
+using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
@@ -69,7 +70,8 @@ namespace HOZProject
             //主界面显示内容
             this.BeginInvoke((Action)delegate
             {
-                this.listmsg.Items.Add(e.HoleName.ToString() + e.State);
+                //this.listmsg.Items.Add(e.HoleName.ToString() + e.State);
+                ChangeCutHoleState(e.HoleName.ToString(), Convert.ToInt32(e.State));
             });
         }
 
@@ -89,6 +91,13 @@ namespace HOZProject
             plTop.Click += new EventHandler(FormHOZMain_Click);
             plLeft.Click += new EventHandler(FormHOZMain_Click);
             plLeftContent.Click += new EventHandler(FormHOZMain_Click);
+
+            //加载窗口移动事件
+            this.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
+            //plFill.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
+            //plTop.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
+            //plLeft.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
+            //plLeftContent.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
             //新建
             NewCreate();
         }
@@ -114,38 +123,6 @@ namespace HOZProject
             }
         }
 
-        /// <summary>
-        /// 修改切孔状态
-        /// </summary>
-        /// <param name="cutHoleCode"></param>
-        /// <param name="State"></param>
-        private void ChangeCutHoleState(string CutHoleName, int State)
-        {
-            foreach (Control item in plLeftContent.Controls)
-            {
-                if (item is UserControl)
-                {
-                    UControl_CutHole cutHole = (UControl_CutHole)item;
-                    if (cutHole.CutHoleName == CutHoleName)
-                    {
-                        Button btnCutHole = (Button)cutHole.Controls.Find("btnCutHole", false)[0];
-                        switch (State)
-                        {
-                            case 1:
-                                btnCutHole.BackColor = Color.Red;
-                                break;
-                            case 2:
-                                btnCutHole.BackColor = Color.Green;
-                                break;
-                            case 3:
-                                btnCutHole.BackColor = Color.Yellow;
-                                break;
-                        }
-                        break;
-                    }
-                }
-            }
-        }
         
         #region 窗体 最大化 最小化 关闭 按钮事件
         private void pbMin_MouseEnter(object sender, EventArgs e)
@@ -281,6 +258,68 @@ namespace HOZProject
             }
         }
         #endregion
-        
+
+        /// <summary>
+        /// 修改切孔状态
+        /// </summary>
+        /// <param name="cutHoleCode"></param>
+        /// <param name="State"></param>
+        private void ChangeCutHoleState(string CutHoleName, int State)
+        {
+            foreach (Control item in plLeftContent.Controls)
+            {
+                if (item is UserControl)
+                {
+                    UControl_CutHole cutHole = (UControl_CutHole)item;
+                    if (cutHole.CutHoleName == CutHoleName)
+                    {
+                        Button btnCutHole = (Button)cutHole.Controls.Find("btnCutHole", false)[0];
+                        switch (State)
+                        {
+                            //开始运行
+                            case (int)ThreadState.InProcess:
+                                btnCutHole.BackColor = Color.Yellow;
+                                break;
+                            //完成
+                            case (int)ThreadState.Success:
+                                btnCutHole.BackColor = Color.LawnGreen;
+                                break;
+                            //错误
+                            case (int)ThreadState.Failed:
+                                btnCutHole.BackColor = Color.Red;
+                                break;
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 显示切孔处理流程中信息
+        /// </summary>
+        private void ShowProcessInfo()
+        {
+
+        }
+
+        #region 拖动无窗体的控件
+        [DllImport("user32.dll")]//拖动无窗体的控件
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+        private void FormHOZMain_MouseDown(object sender, MouseEventArgs e)
+        {
+            if (this.WindowState == FormWindowState.Normal)
+            {
+                //拖动窗体
+                ReleaseCapture();
+                SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+            }
+        } 
+        #endregion
     }
 }

+ 19 - 0
HOZProject/UserControls/UControl_CutHole.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using MeasureData;
 
 namespace HOZProject
 {
@@ -71,7 +72,25 @@ namespace HOZProject
             {
                 uControl_ParaInfo.Location = new Point(this.Location.X, this.Location.Y);
             }
+            List<CutHole> cutHoleList = FormHOZMainObject.m_MeasureFile.ListCutHole;
+            foreach (CutHole cutHoleItem in cutHoleList)
+            {
+                if (cutHoleItem.HoleName == CutHoleName)
+                {
+
+                    //设置当前样品的参数信息
+                    uControl_ParaInfo.CutHoleName = cutHoleItem.HoleName;
+                    uControl_ParaInfo.Position = cutHoleItem.Position;
+                    uControl_ParaInfo.StartTime = cutHoleItem.START.ToString();
+                    uControl_ParaInfo.EndTime = cutHoleItem.END.ToString();
+                    uControl_ParaInfo.State = cutHoleItem.STATE.ToString();
+                    uControl_ParaInfo.IsSwitch = cutHoleItem.SWITCH;
+                    break;
+                }
+            }
+
             uControl_ParaInfo.Dock = DockStyle.Fill;
+            uControl_ParaInfo.ShowParaInfo();
             FormHOZMainObject.plProcess.Location = uControl_ParaInfo.Location;
             FormHOZMainObject.plProcess.Controls.Add(uControl_ParaInfo);
             FormHOZMainObject.plProcess.Visible = true;

+ 179 - 45
HOZProject/UserControls/UControl_ParaInfo.Designer.cs

@@ -32,15 +32,25 @@
             this.lblStartTime = new System.Windows.Forms.Label();
             this.lblEndTime = new System.Windows.Forms.Label();
             this.lblState = new System.Windows.Forms.Label();
-            this.checkBox1 = new System.Windows.Forms.CheckBox();
-            this.label1 = new System.Windows.Forms.Label();
+            this.CkIsSwitch = new System.Windows.Forms.CheckBox();
+            this.lblCutHoleName = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.btnClose = new System.Windows.Forms.Button();
+            this.lblX = new System.Windows.Forms.Label();
+            this.lblShowStartTime = new System.Windows.Forms.Label();
+            this.lblShowEndTime = new System.Windows.Forms.Label();
+            this.lblShowState = new System.Windows.Forms.Label();
+            this.lblY = new System.Windows.Forms.Label();
+            this.lblZ = new System.Windows.Forms.Label();
+            this.lblM = new System.Windows.Forms.Label();
+            this.lblT = new System.Windows.Forms.Label();
+            this.lblR = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -88,32 +98,32 @@
             this.lblState.TabIndex = 0;
             this.lblState.Text = "检测结果";
             // 
-            // checkBox1
+            // CkIsSwitch
             // 
-            this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(9, 9);
-            this.checkBox1.Name = "checkBox1";
-            this.checkBox1.Size = new System.Drawing.Size(15, 14);
-            this.checkBox1.TabIndex = 1;
-            this.checkBox1.UseVisualStyleBackColor = true;
+            this.CkIsSwitch.AutoSize = true;
+            this.CkIsSwitch.Location = new System.Drawing.Point(9, 9);
+            this.CkIsSwitch.Name = "CkIsSwitch";
+            this.CkIsSwitch.Size = new System.Drawing.Size(15, 14);
+            this.CkIsSwitch.TabIndex = 1;
+            this.CkIsSwitch.UseVisualStyleBackColor = true;
             // 
-            // label1
+            // lblCutHoleName
             // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("宋体", 10F);
-            this.label1.ForeColor = System.Drawing.Color.Black;
-            this.label1.Location = new System.Drawing.Point(26, 9);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(77, 14);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "切孔名称";
+            this.lblCutHoleName.AutoSize = true;
+            this.lblCutHoleName.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblCutHoleName.ForeColor = System.Drawing.Color.Black;
+            this.lblCutHoleName.Location = new System.Drawing.Point(26, 9);
+            this.lblCutHoleName.Name = "lblCutHoleName";
+            this.lblCutHoleName.Size = new System.Drawing.Size(63, 14);
+            this.lblCutHoleName.TabIndex = 0;
+            this.lblCutHoleName.Text = "切孔名称";
             // 
             // panel1
             // 
             this.panel1.BackColor = System.Drawing.Color.White;
             this.panel1.Controls.Add(this.btnClose);
-            this.panel1.Controls.Add(this.label1);
-            this.panel1.Controls.Add(this.checkBox1);
+            this.panel1.Controls.Add(this.lblCutHoleName);
+            this.panel1.Controls.Add(this.CkIsSwitch);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
@@ -131,60 +141,164 @@
             this.btnClose.UseVisualStyleBackColor = true;
             this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
             // 
+            // lblX
+            // 
+            this.lblX.AutoSize = true;
+            this.lblX.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblX.ForeColor = System.Drawing.Color.LightGray;
+            this.lblX.Location = new System.Drawing.Point(106, 43);
+            this.lblX.Name = "lblX";
+            this.lblX.Size = new System.Drawing.Size(0, 14);
+            this.lblX.TabIndex = 3;
+            // 
+            // lblShowStartTime
+            // 
+            this.lblShowStartTime.AutoSize = true;
+            this.lblShowStartTime.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblShowStartTime.ForeColor = System.Drawing.Color.LightGray;
+            this.lblShowStartTime.Location = new System.Drawing.Point(76, 89);
+            this.lblShowStartTime.Name = "lblShowStartTime";
+            this.lblShowStartTime.Size = new System.Drawing.Size(119, 14);
+            this.lblShowStartTime.TabIndex = 3;
+            this.lblShowStartTime.Text = "2020-09-02 12:00";
+            // 
+            // lblShowEndTime
+            // 
+            this.lblShowEndTime.AutoSize = true;
+            this.lblShowEndTime.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblShowEndTime.ForeColor = System.Drawing.Color.LightGray;
+            this.lblShowEndTime.Location = new System.Drawing.Point(76, 120);
+            this.lblShowEndTime.Name = "lblShowEndTime";
+            this.lblShowEndTime.Size = new System.Drawing.Size(119, 14);
+            this.lblShowEndTime.TabIndex = 3;
+            this.lblShowEndTime.Text = "2020-09-02 12:35";
+            // 
+            // lblShowState
+            // 
+            this.lblShowState.AutoSize = true;
+            this.lblShowState.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblShowState.ForeColor = System.Drawing.Color.LightGray;
+            this.lblShowState.Location = new System.Drawing.Point(76, 151);
+            this.lblShowState.Name = "lblShowState";
+            this.lblShowState.Size = new System.Drawing.Size(35, 14);
+            this.lblShowState.TabIndex = 3;
+            this.lblShowState.Text = "完成";
+            // 
+            // lblY
+            // 
+            this.lblY.AutoSize = true;
+            this.lblY.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblY.ForeColor = System.Drawing.Color.LightGray;
+            this.lblY.Location = new System.Drawing.Point(172, 43);
+            this.lblY.Name = "lblY";
+            this.lblY.Size = new System.Drawing.Size(0, 14);
+            this.lblY.TabIndex = 4;
+            // 
+            // lblZ
+            // 
+            this.lblZ.AutoSize = true;
+            this.lblZ.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblZ.ForeColor = System.Drawing.Color.LightGray;
+            this.lblZ.Location = new System.Drawing.Point(246, 43);
+            this.lblZ.Name = "lblZ";
+            this.lblZ.Size = new System.Drawing.Size(0, 14);
+            this.lblZ.TabIndex = 5;
+            // 
+            // lblM
+            // 
+            this.lblM.AutoSize = true;
+            this.lblM.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblM.ForeColor = System.Drawing.Color.LightGray;
+            this.lblM.Location = new System.Drawing.Point(246, 66);
+            this.lblM.Name = "lblM";
+            this.lblM.Size = new System.Drawing.Size(0, 14);
+            this.lblM.TabIndex = 8;
+            // 
+            // lblT
+            // 
+            this.lblT.AutoSize = true;
+            this.lblT.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblT.ForeColor = System.Drawing.Color.LightGray;
+            this.lblT.Location = new System.Drawing.Point(172, 66);
+            this.lblT.Name = "lblT";
+            this.lblT.Size = new System.Drawing.Size(0, 14);
+            this.lblT.TabIndex = 7;
+            // 
+            // lblR
+            // 
+            this.lblR.AutoSize = true;
+            this.lblR.Font = new System.Drawing.Font("宋体", 10F);
+            this.lblR.ForeColor = System.Drawing.Color.LightGray;
+            this.lblR.Location = new System.Drawing.Point(106, 66);
+            this.lblR.Name = "lblR";
+            this.lblR.Size = new System.Drawing.Size(0, 14);
+            this.lblR.TabIndex = 6;
+            // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("宋体", 10F);
             this.label2.ForeColor = System.Drawing.Color.LightGray;
-            this.label2.Location = new System.Drawing.Point(80, 43);
+            this.label2.Location = new System.Drawing.Point(220, 66);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(147, 14);
-            this.label2.TabIndex = 3;
-            this.label2.Text = "X:65000 Y:50000 Z:20";
+            this.label2.Size = new System.Drawing.Size(21, 14);
+            this.label2.TabIndex = 14;
+            this.label2.Text = "M:";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("宋体", 10F);
             this.label3.ForeColor = System.Drawing.Color.LightGray;
-            this.label3.Location = new System.Drawing.Point(80, 89);
+            this.label3.Location = new System.Drawing.Point(146, 66);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(119, 14);
-            this.label3.TabIndex = 3;
-            this.label3.Text = "2020-09-02 12:00";
+            this.label3.Size = new System.Drawing.Size(21, 14);
+            this.label3.TabIndex = 13;
+            this.label3.Text = "T:";
             // 
             // label4
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("宋体", 10F);
             this.label4.ForeColor = System.Drawing.Color.LightGray;
-            this.label4.Location = new System.Drawing.Point(80, 120);
+            this.label4.Location = new System.Drawing.Point(80, 66);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(119, 14);
-            this.label4.TabIndex = 3;
-            this.label4.Text = "2020-09-02 12:35";
+            this.label4.Size = new System.Drawing.Size(21, 14);
+            this.label4.TabIndex = 12;
+            this.label4.Text = "R:";
             // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("宋体", 10F);
             this.label5.ForeColor = System.Drawing.Color.LightGray;
-            this.label5.Location = new System.Drawing.Point(80, 151);
+            this.label5.Location = new System.Drawing.Point(220, 43);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(35, 14);
-            this.label5.TabIndex = 3;
-            this.label5.Text = "完成";
+            this.label5.Size = new System.Drawing.Size(21, 14);
+            this.label5.TabIndex = 11;
+            this.label5.Text = "Z:";
             // 
             // label6
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("宋体", 10F);
             this.label6.ForeColor = System.Drawing.Color.LightGray;
-            this.label6.Location = new System.Drawing.Point(80, 66);
+            this.label6.Location = new System.Drawing.Point(146, 43);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(105, 14);
-            this.label6.TabIndex = 3;
-            this.label6.Text = "T:50 M:50 R:20";
+            this.label6.Size = new System.Drawing.Size(21, 14);
+            this.label6.TabIndex = 10;
+            this.label6.Text = "Y:";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("宋体", 10F);
+            this.label7.ForeColor = System.Drawing.Color.LightGray;
+            this.label7.Location = new System.Drawing.Point(80, 43);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(21, 14);
+            this.label7.TabIndex = 9;
+            this.label7.Text = "X:";
             // 
             // UControl_ParaInfo
             // 
@@ -192,11 +306,21 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.Controls.Add(this.label5);
-            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label2);
             this.Controls.Add(this.label3);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.label6);
-            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.lblM);
+            this.Controls.Add(this.lblT);
+            this.Controls.Add(this.lblR);
+            this.Controls.Add(this.lblZ);
+            this.Controls.Add(this.lblY);
+            this.Controls.Add(this.lblShowState);
+            this.Controls.Add(this.lblShowEndTime);
+            this.Controls.Add(this.lblShowStartTime);
+            this.Controls.Add(this.lblX);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.lblState);
             this.Controls.Add(this.lblEndTime);
@@ -216,14 +340,24 @@
         private System.Windows.Forms.Label lblStartTime;
         private System.Windows.Forms.Label lblEndTime;
         private System.Windows.Forms.Label lblState;
-        private System.Windows.Forms.CheckBox checkBox1;
-        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.CheckBox CkIsSwitch;
+        private System.Windows.Forms.Label lblCutHoleName;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button btnClose;
+        private System.Windows.Forms.Label lblX;
+        private System.Windows.Forms.Label lblShowStartTime;
+        private System.Windows.Forms.Label lblShowEndTime;
+        private System.Windows.Forms.Label lblShowState;
+        private System.Windows.Forms.Label lblY;
+        private System.Windows.Forms.Label lblZ;
+        private System.Windows.Forms.Label lblM;
+        private System.Windows.Forms.Label lblT;
+        private System.Windows.Forms.Label lblR;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label7;
     }
 }

+ 45 - 0
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -7,13 +7,39 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using MeasureData;
 
 namespace HOZProject
 {
     public partial class UControl_ParaInfo : UserControl
     {
+        /// <summary>
+        /// 开始时间
+        /// </summary>
+        private string startTime;
+        /// <summary>
+        /// 结束时间
+        /// </summary>
+        private string endTime;
+        /// <summary>
+        /// 状态
+        /// </summary>
+        private string state;
+        /// <summary>
+        /// 位置
+        /// </summary>
+        private SemPosition position;
+        private bool isSwitch;
+        private string cutHoleName;
         private FormHOZMain formHOZMain;
         public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
+        public string StartTime { get => startTime; set => startTime = value; }
+        public string EndTime { get => endTime; set => endTime = value; }
+        public string State { get => state; set => state = value; }
+        public SemPosition Position { get => position; set => position = value; }
+        public string CutHoleName { get => cutHoleName; set => cutHoleName = value; }
+        public bool IsSwitch { get => isSwitch; set => isSwitch = value; }
+
         public UControl_ParaInfo(FormHOZMain formHOZ)
         {
             InitializeComponent();
@@ -39,5 +65,24 @@ namespace HOZProject
                 }
             }
         }
+
+        /// <summary>
+        /// 显示切孔参数信息
+        /// </summary>
+        public void ShowParaInfo()
+        {
+            //设置Position参数
+            lblX.Text = Position.X.ToString();
+            lblY.Text = Position.Y.ToString();
+            lblZ.Text = Position.Z.ToString();
+            lblR.Text = Position.R.ToString();
+            lblT.Text = Position.T.ToString();
+            lblM.Text = Position.M.ToString();
+            lblShowStartTime.Text = StartTime;
+            lblShowEndTime.Text = EndTime;
+            lblShowState.Text = State;
+            lblCutHoleName.Text = CutHoleName;
+            CkIsSwitch.Checked = IsSwitch;
+        }
     }
 }

+ 10 - 4
MeasureThread/Measure.cs

@@ -188,8 +188,8 @@ namespace MeasureThread
         public void SendCutHoleMsg(string a_state, string a_holeName)
         {
             CutHolesStatusEventArgs arg = new CutHolesStatusEventArgs(a_state, a_holeName);
-            arg.HoleName = "";
-            arg.State = "";
+            arg.HoleName = a_holeName;
+            arg.State = a_state;
             SendCutHolesStatus(this, arg);
         }
         //测量流程
@@ -232,17 +232,23 @@ namespace MeasureThread
                 if (i == 0)
                 {
                     SendMsg("第一个切孔开始测量");
-                    SendCutHoleMsg("1", m_cutHoles[i].HoleName);
+                    //切孔操作-开始
+                    SendCutHoleMsg(((int)ThreadState.InProcess).ToString(), m_cutHoles[i].HoleName);
                     firstPosition = iSEM.GetStagePosition();
                     //第一个孔的测试
                     FirstHole();
+                    //切孔操作-完成
+                    SendCutHoleMsg(((int)ThreadState.Success).ToString(), m_cutHoles[i].HoleName);
                 }
                 else
                 {
                     //非第一个孔的测试
                     SendMsg("第" + i.ToString() + "个切孔开始测量");
-                    SendCutHoleMsg("1", m_cutHoles[i].HoleName);
+                    //切孔操作-开始
+                    SendCutHoleMsg(((int)ThreadState.InProcess).ToString(), m_cutHoles[i].HoleName);
                     OtherHole();
+                    //切孔操作-完成
+                    SendCutHoleMsg(((int)ThreadState.Success).ToString(), m_cutHoles[i].HoleName);
                 }
             }