Browse Source

修改xml流程结构

wb_han 5 years ago
parent
commit
517d7d55c5

+ 28 - 22
HOZProject/FormHOZMain.cs

@@ -47,6 +47,10 @@ namespace HOZProject
         /// 初始化用户控件
         /// </summary>
         UControl_Init uControl_Init = null;
+        /// <summary>
+        /// 日志用户控件
+        /// </summary>
+        UControl_Log ucLog = null;
         //流程控制
         public int m_MeasureType = (int)MeasureMsgManage.measureType.FIB;
 
@@ -101,18 +105,10 @@ namespace HOZProject
             //主界面显示内容
             this.BeginInvoke((Action)delegate
             {
-                //流程编号
-                string eCode = e.Step_Code;
-                //流程开始时间
-                DateTime eTime = e.Time;
-                //图片对象
-                PictureInformation ePictureInformation = e.Picture_Information;
-                //当前状态
-                string eState = e.State;
-                this.listmsg.Items.Add(e.Time.ToString() +"_"+ e.State);
+                this.listmsg.Items.Add("_" + e.HoleName +e.Time.ToString() + "_"+ e.Message + "_" + e.State );
                 //显示流程中对应编号的内容
                 MeasureMsgManage.ShowMsgContent(this, e);
-                ShowLogInfo();
+                AddLogListInfo(e);
             });
         }
         public void displayCutHoleMessage(object sender, CutHolesStatusEventArgs e)
@@ -407,11 +403,14 @@ namespace HOZProject
         {
             m_FormLog = new Form();
             m_FormLog.StartPosition = FormStartPosition.CenterScreen;
-            UControl_Log uControl_Log = new UControl_Log();
+            if (ucLog == null)
+            {
+                ucLog = new UControl_Log();
+            }
             m_FormLog.FormBorderStyle = FormBorderStyle.None;
-            m_FormLog.Width = uControl_Log.Width;
-            m_FormLog.Height = uControl_Log.Height;
-            uControl_Log.Name = "UControl_Log";
+            m_FormLog.Width = ucLog.Width;
+            m_FormLog.Height = ucLog.Height;
+            ucLog.Name = "UControl_Log";
             //获取日志信息
             if (listmsg.Items.Count>0)
             {
@@ -421,14 +420,14 @@ namespace HOZProject
                     //赋值给数组
                     strLog[i] = listmsg.Items[i].ToString();
                 }
-                uControl_Log.ShowProcessLogInfo(strLog);
+                ucLog.ShowProcessLogInfo(strLog);
             }
-            m_FormLog.Controls.Add(uControl_Log);
+            m_FormLog.Controls.Add(ucLog);
             m_FormLog.ShowDialog();
         }
 
         //显示日志
-        private void ShowLogInfo()
+        private void AddLogListInfo(ThreadStatusEventArgs e)
         {
             if (m_FormLog != null)
             {
@@ -438,7 +437,7 @@ namespace HOZProject
                     {
                         if (item.Name == "UControl_Log")
                         {
-                            UControl_Log ucLog = (UControl_Log)item;
+                             ucLog = (UControl_Log)item;
                             //获取日志信息
                             if (listmsg.Items.Count > 0)
                             {
@@ -524,12 +523,19 @@ namespace HOZProject
             }
             else
             {
-                if (m_BackgroundWorker.IsBusy)
+                if (IsSave)
+                {
+                    if (m_BackgroundWorker.IsBusy)
+                    {
+                        MessageBox.Show("线程已经运行");
+                        return;
+                    }
+                    m_BackgroundWorker.RunWorkerAsync(this);
+                }
+                else
                 {
-                    MessageBox.Show("线程已经运行");
-                    return;
+                    MessageBox.Show("请保存当前测量文件");
                 }
-                m_BackgroundWorker.RunWorkerAsync(this);
             }
         }
 

+ 63 - 17
HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

@@ -25,28 +25,74 @@ namespace HOZProject
         /// <param name="args">消息对象</param>
         public static void ShowMsgContent(FormHOZMain formHOZ, ThreadStatusEventArgs args)
         {
-            switch (args.Step_Code)
+            #region 原方法判断,流程中的数据显示
+            //switch (args.Step_Code)
+            //{
+            //    case "1-3":
+            //        //设置图像
+            //        FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
+            //        formHOZ.pbImage.Image = Image.FromStream(fileStream);
+            //        fileStream.Close();
+            //        fileStream.Dispose();
+            //        //流程内容
+            //        string semParaContent = "电压:"+args.Picture_Information.Work_Voltage;
+            //        semParaContent += "  放大倍数:" + args.Picture_Information.Magnification;
+            //        semParaContent += "  工作距离:" + args.Picture_Information.Work_Distance;
+            //        formHOZ.lblFlowContent.Text = semParaContent;
+            //        break;
+            //    default:
+            //        break;
+            //} 
+            #endregion
+            if (IsCutHolePhotoInfo(formHOZ, args))
             {
-                case "1-3":
-                    //设置图像
-                    FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
-                    formHOZ.pbImage.Image = Image.FromStream(fileStream);
-                    fileStream.Close();
-                    fileStream.Dispose();
-                    //流程内容
-                    string semParaContent = "电压:"+args.Picture_Information.Work_Voltage;
-                    semParaContent += "  放大倍数:" + args.Picture_Information.Magnification;
-                    semParaContent += "  工作距离:" + args.Picture_Information.Work_Distance;
-                    formHOZ.lblFlowContent.Text = semParaContent;
-                    break;
-                default:
-                    
-                    break;
-
+                //设置图像
+                FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
+                formHOZ.pbImage.Image = Image.FromStream(fileStream);
+                fileStream.Close();
+                fileStream.Dispose();
+                //流程内容
+                string semParaContent = "电压:" + args.Picture_Information.Work_Voltage;
+                semParaContent += "  放大倍数:" + args.Picture_Information.Magnification;
+                semParaContent += "  工作距离:" + args.Picture_Information.Work_Distance;
+                formHOZ.lblFlowContent.Text = semParaContent;
             }
             //修改切孔中流程状态
             ChageCutHoleFlowNodeState(formHOZ, args);
         }
+        #region 显示切孔流程中拍照信息
+        /// <summary>
+        /// 是否当前编号是流程中有数据的节点
+        /// </summary>
+        /// <param name="formHOZ">主窗体对象</param>
+        /// <param name="args">线程参数</param>
+        /// <returns></returns>
+        public static bool IsCutHolePhotoInfo(FormHOZMain formHOZ, ThreadStatusEventArgs args)
+        {
+            if (formHOZ.plPrarInfo.Controls.Count > 0)
+            {
+                foreach (Control item in formHOZ.plPrarInfo.Controls)
+                {
+                    if (item is UserControl)
+                    {
+                        if (item.Name == args.HoleName)
+                        {
+                            UControl_ParaInfo uControl_ParaInfo = (UControl_ParaInfo)item;
+                            TimeLineItem[] ParaItem = uControl_ParaInfo.TlItem;
+                            foreach (TimeLineItem tlItem in ParaItem)
+                            {
+                                if (tlItem.Code == args.Step_Code && tlItem.IsData)
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            return false;
+        }
+        #endregion
 
         #region 修改切孔中流程状态
         /// <summary>

+ 34 - 46
HOZProject/MeasureXML/MeasureStructXml.xml

@@ -1,53 +1,41 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <MeasureList>
   <MeasureFlow Name="测量流程">
-      <Step Index="0" Name="" Code="1-0" IsData="False" Type="Pt" IsShow="False" Title="PT沉积" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
-      <Step Index="1" Name="" Code="1-1" IsData="False" Type="State" IsShow="True" Title="移动至切割位置" Details="自动定位切割位置"></Step>
-      <Step Index="2" Name="" Code="1-2" IsData="False" Type="Photo" IsShow="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
-      <Step Index="3" Name="" Code="1-3" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="4" Name="" Code="1-4" IsData="False" Type="Photo" IsShow="False" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
-      <Step Index="5" Name="" Code="1-5" IsData="True" Type="Photo" IsShow="True" Title="拍照保存照片" Details="控制SEM对分析位置拍照保存照片"></Step>
-      <Step Index="6" Name="" Code="1-6" IsData="False" Type="FIB" IsShow="False" Title="切换到FIB模式" Details="切换到FIB模式"></Step>
-      <Step Index="7" Name="" Code="1-7" IsData="True" Type="FIB" IsShow="True" Title="FIB拍照保存照片" Details="FIB拍照保存照片"></Step>
-      <Step Index="8" Name="" Code="1-8" IsData="True" Type="Photo" IsShow="False" Title="样品台移动到指定位置" Details="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
-      <Step Index="9" Name="" Code="1-9" IsData="False" Type="Photo" IsShow="True" Title="验证移动位置" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="10" Name="" Code="1-10" IsData="False" Type="Photo" IsShow="False" Title="PT沉积" Details="根据配置文件进行PT沉积"></Step>
-      <Step Index="11" Name="" Code="1-11" IsData="True" Type="Photo" IsShow="True" Title="保存坐标" Details="将六轴坐标保存到数据库中"></Step>
+    <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="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>
+    <Step Index="6"  Code="1-6" IsData="True" Type="FIB" IsShow="True" Title="FIB拍照" Details="FIB拍照保存照片"></Step>
+    <Step Index="7"  Code="1-7" IsData="False" Type="FIB" IsShow="True" Title="移动样品台" Details="移动样品台"></Step>
+    <Step Index="8"  Code="1-8" IsData="False" Type="FIB" IsShow="True" Title="样品台位置验证" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+    <Step Index="9"  Code="1-9" IsData="False" Type="Pt" IsShow="True" Title="PT沉积" Details="根据配置文件进行PT沉积"></Step>
+    <Step Index="10" Code="1-10" IsData="False" Type="FIB" IsShow="True" Title="保存六轴坐标" Details="将六轴坐标保存到数据库中"></Step>
 
-      <Step Index="12" Name="" Code="1-12" IsData="False" Type="FIB" IsShow="True" Title="FIB进行切割" Details="控制FIB进行切割"></Step>
-      <Step Index="13" Name="" Code="1-13" IsData="False" Type="FIB" IsShow="True" Title="设置FIB放大倍数" Details="控制SEM放大倍数"></Step>
-      <Step Index="14" Name="" Code="1-14" IsData="False" Type="FIB" IsShow="True" Title="保存照片" Details="保存照片"></Step>
-      <Step Index="15" Name="" Code="1-15" IsData="False" Type="FIB" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
-      <Step Index="16" Name="" Code="1-16" IsData="False" Type="FIB" IsShow="True" Title="FIB切割状态" Details="FIB切割成功或失败"></Step>
-    
-      <Step Index="17" Name="" Code="1-17" IsData="False" Type="Pt" IsShow="True" Title="拔出PT针" Details="根据样品类型决定是否撤出PT针"></Step>
+    <Step Index="11" Code="1-11" IsData="True" Type="FIB" IsShow="True" Title="切割前拍照" Details="FIB进行拍照"></Step>
+    <Step Index="12" Code="1-12" IsData="False" Type="FIB" IsShow="True" Title="FIB切割" Details="控制FIB进行切割"></Step>
+    <Step Index="13" Code="1-13" IsData="True" Type="FIB" IsShow="True" Title="切割后拍照" Details="FIB切割后进行拍照"></Step>
+    <Step Index="14" Code="1-14" IsData="False" Type="FIB" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
+    <Step Index="15" Code="1-15" IsData="False" Type="Pt" IsShow="True" Title="拔出PT针" Details="根据样品类型决定是否撤出PT针"></Step>
 
-      <Step Index="18" Name="" Code="1-18" IsData="False" Type="Photo" IsShow="True" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
-      <Step Index="19" Name="" Code="1-19" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="20" Name="" Code="1-20" IsData="True" Type="Photo" IsShow="True" Title="拍照显示照片" Details="控制SEM对分析位置拍照"></Step>
-      <Step Index="21" Name="" Code="1-21" IsData="False" Type="Photo" IsShow="True" Title="移动到切孔位置" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
-      <Step Index="22" Name="" Code="1-22" IsData="False" Type="Photo" IsShow="True" Title="调整角度" Details="调整角度"></Step>
-      <Step Index="23" Name="" Code="1-23" IsData="False" Type="Photo" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="24" Name="" Code="1-24" IsData="False" Type="Photo" IsShow="True" Title="自动调整SEM找切割位置" Details="自动调整SEM找切割位置"></Step>
+    <Step Index="16" Code="1-16" IsData="False" Type="Photo" IsShow="True" Title="切换到SEM模式" Details="从FIB模式切换到SEM模式"></Step>
+    <Step Index="17" Code="1-17" IsData="False" Type="Photo" IsShow="True" Title="放大指定倍数/2" Details="控制SEM放大倍数"></Step>
+    <Step Index="18" Code="1-18" IsData="False" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="19" Code="1-19" IsData="True" Type="Photo" IsShow="True" Title="SEM拍照" Details="控制SEM对分析位置拍照"></Step>
+    <Step Index="20" Code="1-20" IsData="False" Type="Photo" IsShow="True" Title="获取位置并移动样品台" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
+    <Step Index="21" Code="1-21" IsData="False" Type="Photo" IsShow="True" Title="校验位置" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
     
-      <Step Index="25" Name="" Code="1-25" IsData="False" Type="Photo" IsShow="True" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="26" Name="" Code="1-26" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="27" Name="" Code="1-27" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM角度补偿"></Step>
-      <Step Index="28" Name="" Code="1-28" IsData="True" Type="Photo" IsShow="True" Title="保存照片" Details="设置图片名称、保存图片"></Step>
-      <Step Index="29" Name="" Code="1-29" IsData="True" Type="Photo" IsShow="True" Title="获取坐标并移动到对应位置" Details="获取坐标并移动到对应位置"></Step>
-      <Step Index="35" Name="" Code="1-35" IsData="False" Type="Photo" IsShow="True" Title="移动到分析位置" Details="根据坐标控制SEM移动到分析位置"></Step>
-      <Step Index="36" Name="" Code="1-36" IsData="False" Type="Photo" IsShow="True" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-
-      <Step Index="37" Name="" Code="1-37" IsData="False" Type="Photo" IsShow="True" Title="平行校正" Details="控制SEM平行校正,并记录校正前初始值"></Step>
-      <Step Index="38" Name="" Code="1-38" IsData="False" Type="Photo" IsShow="True" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="39" Name="" Code="1-39" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="40" Name="" Code="1-40" IsData="True" Type="Photo" IsShow="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
-      <Step Index="41" Name="" Code="1-41" IsData="False" Type="Photo" IsShow="True" Title="保存照片" Details="设置图片名称、保存图片"></Step>
-      <Step Index="42" Name="" Code="1-42" IsData="False" Type="Photo" IsShow="True" Title="取消电子束校正并初始化" Details="控制SEM取消电子束校正,回到初始值"></Step>
-
-      <Step Index="43" Name="" Code="1-43" IsData="False" Type="Photo" IsShow="True" Title="传入参数" Details="获取SEM Pixel Size 给客户传入参数"></Step>
-      <Step Index="44" Name="" Code="1-44" IsData="True" Type="Photo" IsShow="True" Title="显示照片" Details="将照片传给客户,客户进行层高分析"></Step>
-      <Step Index="45" Name="" Code="1-45" IsData="False" Type="Photo" IsShow="True" Title="自动能谱分析" Details="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
-      <Step Index="46" Name="" Code="1-46" IsData="False" Type="Photo" IsShow="True" Title="初始化" Details="多切孔进行初始化操作"></Step>
-    </MeasureFlow>
+    <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="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="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="Photo" IsShow="True" Title="自动层高分析" Details="自动进行层高分析"></Step>
+  </MeasureFlow>
 </MeasureList>

+ 76 - 77
HOZProject/UserControls/UControl_Log.Designer.cs

@@ -28,21 +28,21 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.pbClose = new System.Windows.Forms.PictureBox();
             this.dgvLog = new System.Windows.Forms.DataGridView();
-            this.ColCutHoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ColStep = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ColTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ColState = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel2 = new System.Windows.Forms.Panel();
             this.label2 = new System.Windows.Forms.Label();
             this.lblLogCount = new System.Windows.Forms.Label();
+            this.ColCutHoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ColTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ColStep = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ColState = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).BeginInit();
@@ -93,46 +93,46 @@
             this.dgvLog.AllowUserToDeleteRows = false;
             this.dgvLog.AllowUserToResizeColumns = false;
             this.dgvLog.AllowUserToResizeRows = false;
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvLog.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.ColCutHoleName,
-            this.ColStep,
             this.ColTime,
+            this.ColStep,
             this.ColState});
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle2;
             this.dgvLog.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvLog.EnableHeadersVisualStyles = false;
             this.dgvLog.Location = new System.Drawing.Point(0, 30);
             this.dgvLog.MultiSelect = false;
             this.dgvLog.Name = "dgvLog";
             this.dgvLog.ReadOnly = true;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
             this.dgvLog.RowHeadersVisible = false;
             this.dgvLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
-            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle4;
             this.dgvLog.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.SystemColors.WindowText;
             this.dgvLog.RowTemplate.Height = 23;
             this.dgvLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@@ -145,46 +145,6 @@
             this.dgvLog.TabStop = false;
             this.dgvLog.SelectionChanged += new System.EventHandler(this.dgvLog_SelectionChanged);
             // 
-            // ColCutHoleName
-            // 
-            this.ColCutHoleName.DataPropertyName = "CutHoleName";
-            this.ColCutHoleName.HeaderText = "切孔名称";
-            this.ColCutHoleName.Name = "ColCutHoleName";
-            this.ColCutHoleName.ReadOnly = true;
-            this.ColCutHoleName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.ColCutHoleName.Visible = false;
-            this.ColCutHoleName.Width = 180;
-            // 
-            // ColStep
-            // 
-            this.ColStep.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.ColStep.DataPropertyName = "Name";
-            this.ColStep.HeaderText = "步骤名称";
-            this.ColStep.Name = "ColStep";
-            this.ColStep.ReadOnly = true;
-            this.ColStep.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.ColStep.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // ColTime
-            // 
-            this.ColTime.DataPropertyName = "Time";
-            this.ColTime.HeaderText = "完成时间";
-            this.ColTime.Name = "ColTime";
-            this.ColTime.ReadOnly = true;
-            this.ColTime.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.ColTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.ColTime.Width = 180;
-            // 
-            // ColState
-            // 
-            this.ColState.DataPropertyName = "state";
-            this.ColState.HeaderText = "状态";
-            this.ColState.Name = "ColState";
-            this.ColState.ReadOnly = true;
-            this.ColState.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.ColState.Visible = false;
-            this.ColState.Width = 180;
-            // 
             // panel2
             // 
             this.panel2.BackColor = System.Drawing.Color.White;
@@ -219,6 +179,45 @@
             this.lblLogCount.TabIndex = 0;
             this.lblLogCount.Text = "0条";
             // 
+            // ColCutHoleName
+            // 
+            this.ColCutHoleName.DataPropertyName = "HoleName";
+            this.ColCutHoleName.HeaderText = "切孔名称";
+            this.ColCutHoleName.Name = "ColCutHoleName";
+            this.ColCutHoleName.ReadOnly = true;
+            this.ColCutHoleName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.ColCutHoleName.Width = 180;
+            // 
+            // ColTime
+            // 
+            this.ColTime.DataPropertyName = "Time";
+            this.ColTime.HeaderText = "操作时间";
+            this.ColTime.Name = "ColTime";
+            this.ColTime.ReadOnly = true;
+            this.ColTime.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.ColTime.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.ColTime.Width = 180;
+            // 
+            // ColStep
+            // 
+            this.ColStep.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ColStep.DataPropertyName = "Message";
+            this.ColStep.HeaderText = "描述";
+            this.ColStep.Name = "ColStep";
+            this.ColStep.ReadOnly = true;
+            this.ColStep.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.ColStep.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // ColState
+            // 
+            this.ColState.DataPropertyName = "State";
+            this.ColState.HeaderText = "状态";
+            this.ColState.Name = "ColState";
+            this.ColState.ReadOnly = true;
+            this.ColState.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.ColState.Visible = false;
+            this.ColState.Width = 180;
+            // 
             // UControl_Log
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -247,10 +246,10 @@
         private System.Windows.Forms.Label lblLogCount;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.DataGridView dgvLog;
+        private System.Windows.Forms.PictureBox pbClose;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColCutHoleName;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ColStep;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColTime;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ColStep;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColState;
-        private System.Windows.Forms.PictureBox pbClose;
     }
 }

+ 4 - 2
HOZProject/UserControls/UControl_Log.cs

@@ -25,8 +25,9 @@ namespace HOZProject
         public void ShowProcessLogInfo(string[] strLog)
         {
             DataTable dt = new DataTable();
+            dt.Columns.Add("HoleName");
             dt.Columns.Add("Time");
-            dt.Columns.Add("Name");
+            dt.Columns.Add("Message");
             dt.Columns.Add("State");
             foreach (string strItem in strLog)
             {
@@ -34,7 +35,8 @@ namespace HOZProject
                 DataRow dr = dt.NewRow();
                 dr[0] = Nt[0];
                 dr[1] = Nt[1];
-                dr[2] = "1";
+                dr[1] = Nt[2];
+                dr[2] = Nt[3];
                 dt.Rows.Add(dr);
             }
             dgvLog.DataSource = dt;

+ 2 - 2
HOZProject/UserControls/UControl_Log.resx

@@ -126,10 +126,10 @@
   <metadata name="ColCutHoleName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ColStep.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="ColTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ColTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="ColStep.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="ColState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">