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

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

HaoShuang 5 éve
szülő
commit
9f18b4b285

+ 0 - 3
HOZProject/App.config

@@ -44,7 +44,4 @@
       <!--是否PT沉积-->
       <add key="PT_Depostion" value="False"/>
     </appSettings>
-  <DefaultParam>
-    <add key ="FIB" value ="C:/HOZ/FIB.ELY"/>
-    </DefaultParam>
 </configuration>

+ 20 - 2
HOZProject/FormHOZMain.Designer.cs

@@ -55,9 +55,11 @@
             this.pbOpen = new System.Windows.Forms.PictureBox();
             this.pbNew = new System.Windows.Forms.PictureBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.lblFlowContent = new System.Windows.Forms.Label();
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
+            this.plSEM.SuspendLayout();
             this.plLeft.SuspendLayout();
             this.plTop.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).BeginInit();
@@ -176,6 +178,7 @@
             // 
             // plSEM
             // 
+            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.Name = "plSEM";
@@ -392,18 +395,30 @@
             // 
             // groupBox1
             // 
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.groupBox1.Controls.Add(this.textBox1);
             this.groupBox1.Controls.Add(this.button1);
             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(691, 236);
+            this.groupBox1.Location = new System.Drawing.Point(694, 2);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Size = new System.Drawing.Size(200, 100);
             this.groupBox1.TabIndex = 26;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "测试设置状态";
             // 
+            // lblFlowContent
+            // 
+            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.Name = "lblFlowContent";
+            this.lblFlowContent.Size = new System.Drawing.Size(28, 14);
+            this.lblFlowContent.TabIndex = 0;
+            this.lblFlowContent.Text = "---";
+            // 
             // FormHOZMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -421,6 +436,8 @@
             this.plMain.ResumeLayout(false);
             this.plFill.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
+            this.plSEM.ResumeLayout(false);
+            this.plSEM.PerformLayout();
             this.plLeft.ResumeLayout(false);
             this.plLeft.PerformLayout();
             this.plTop.ResumeLayout(false);
@@ -463,12 +480,13 @@
         private System.Windows.Forms.PictureBox pbPause;
         private System.Windows.Forms.ListBox listmsg;
         private System.Windows.Forms.Panel plSEM;
-        private System.Windows.Forms.PictureBox pbImage;
         private System.Windows.Forms.PictureBox pbImportTemplateFile;
         private System.Windows.Forms.Button button1;
         private System.Windows.Forms.TextBox textBox2;
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.ComboBox comboBox1;
         private System.Windows.Forms.GroupBox groupBox1;
+        public System.Windows.Forms.PictureBox pbImage;
+        public System.Windows.Forms.Label lblFlowContent;
     }
 }

+ 14 - 11
HOZProject/FormHOZMain.cs

@@ -90,6 +90,8 @@ namespace HOZProject
                 //当前状态
                 string eState = e.State;
                 this.listmsg.Items.Add(e.Time.ToString() +"_"+ e.State);
+                //显示流程中对应编号的内容
+                MeasureMsgManage.ShowMsgContent(this, e);
                 ShowLogInfo();
             });
         }
@@ -141,8 +143,7 @@ namespace HOZProject
         public void CreateCutHoleList(List<CutHole> ListCutHole)
         {
             //清空左侧Panel中的切孔控件
-            plLeftContent.Controls.Clear();
-            plPrarInfo.Controls.Clear();
+            ClearPanelControls();
             for (int i = ListCutHole.Count - 1; i >= 0; i--)
             {
                 UControl_CutHole ucCutHole = new UControl_CutHole(this);
@@ -269,9 +270,8 @@ namespace HOZProject
             }
             else
             {
-                //清空切孔列表用户控件
-                plLeftContent.Controls.Clear();
-                //加载配置文件
+                //清空内容容器中的控件
+                ClearPanelControls();
             }
         }
 
@@ -410,7 +410,7 @@ namespace HOZProject
                                 break;
                             //完成
                             case (int)ThreadState.Success:
-                                btnCutHole.BackColor = Color.LawnGreen;
+                                btnCutHole.BackColor = Color.GreenYellow;
                                 break;
                             //错误
                             case (int)ThreadState.Failed:
@@ -471,17 +471,19 @@ namespace HOZProject
         }
         #endregion
 
-        #region 清空处理层中的控件
+        #region 清空内容容器中的控件
         /// <summary>
-        /// 清空处理层中的控件
+        /// 清空内容容器中的控件
         /// </summary>
-        private void ClearProcessControls()
+        private void ClearPanelControls()
         {
-            //清空处理层中的控件
+            //清空内容容器中的控件
+            plLeftContent.Controls.Clear();
             plPrarInfo.Controls.Clear();
         }
         #endregion
 
+        #region 测试修改切孔中流程状态
         private void button1_Click(object sender, EventArgs e)
         {
             if (plPrarInfo.Controls.Count > 0)
@@ -511,6 +513,7 @@ namespace HOZProject
                     }
                 }
             }
-        }
+        } 
+        #endregion
     }
 }

+ 81 - 0
HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

@@ -0,0 +1,81 @@
+using MeasureThread;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace HOZProject
+{
+    public class MeasureMsgManage
+    {
+        /// <summary>
+        /// 线程消息处理,显示内容
+        /// </summary>
+        /// <param name="formHOZ">主窗体对象</param>
+        /// <param name="args">消息对象</param>
+        public static void ShowMsgContent(FormHOZMain formHOZ, ThreadStatusEventArgs args)
+        {
+            switch (args.Step_Code)
+            {
+                case "1-3":
+                    //设置图像
+                    formHOZ.pbImage.Image = null;
+                    //流程内容
+                    formHOZ.lblFlowContent.Text = "1-3";
+                    break;
+                default:
+                    //设置图像
+                    formHOZ.pbImage.Image = null;//new Bitmap(@"C:\Users\think\Pictures\ico\001.jpg");
+                    //流程内容
+                    formHOZ.lblFlowContent.Text = "1";
+                    break;
+
+            }
+            //修改切孔中流程状态
+            ChageCutHoleFlowNodeState(formHOZ, args);
+        }
+
+        #region 修改切孔中流程状态
+        /// <summary>
+        /// 修改切孔中流程状态
+        /// </summary>
+        /// <param name="formHOZ">主窗体对象</param>
+        /// <param name="cutHoleName">切孔名称</param>
+        /// <param name="Code">流程编号</param>
+        /// <param name="state">状态</param>
+        /// <returns></returns>
+        public static bool ChageCutHoleFlowNodeState(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.State = Convert.ToInt32(args.State);
+                                    break;
+                                }
+                            }
+                            //重新绘制
+                            uControl_ParaInfo.TimeLineInvalidate();
+                            return true;
+                        }
+                    }
+                }
+            }
+            return false;
+        }
+        #endregion
+    }
+}

+ 1 - 0
HOZProject/UnitControl.csproj

@@ -76,6 +76,7 @@
     </Compile>
     <Compile Include="Helpers\ControlHelper.cs" />
     <Compile Include="Helpers\NativeMethods.cs" />
+    <Compile Include="MeasureMsgDispose\MeasureMsgManage.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="UserControls\UControl_CutHole.cs">

+ 98 - 90
HOZProject/UserControls/UControl_Init.cs

@@ -185,101 +185,109 @@ namespace HOZProject
         /// </summary>
         public void EditConfig()
         {
-            //设置数据源信息
-            //样品类型
-            List<String> _sT = sT.ToList();
-            if (_sT.IndexOf(cbbWYP.Text) < 0)
-            {
-                _sT.Add(cbbWYP.Text);
-                string wsT = string.Join(",", _sT.ToArray());
-                config.AppSettings.Settings["Sample_Type"].Value = wsT;
-            }
-            //厂商
-            List<String> _firms = firms.ToList();
-            if (_firms.IndexOf(cbbWCS.Text) < 0)
-            {
-                _firms.Add(cbbWCS.Text);
-                string wFirms = string.Join(",", _firms.ToArray());
-                config.AppSettings.Settings["Firm"].Value = wFirms;
-            }
-            //拍照电压
-            List<String> _WPZD = WPZD.ToList();
-            if (_WPZD.IndexOf(cbbWPZD.Text) < 0)
-            {
-                _WPZD.Add(cbbWPZD.Text);
-                string wWPZD = string.Join(",", _WPZD.ToArray());
-                config.AppSettings.Settings["WPZD"].Value = wWPZD;
-            }
-            //拍照放大位数
-            List<String> _WPZF = WPZF.ToList();
-            if (_WPZF.IndexOf(cbbWPZF.Text) < 0)
-            {
-                _WPZF.Add(cbbWPZF.Text);
-                string wWPZF = string.Join(",", _WPZF.ToArray());
-                config.AppSettings.Settings["WPZF"].Value = wWPZF;
-            }
-            //定位切割电压
-            List<String> _WQGD = WQGD.ToList();
-            if (_WQGD.IndexOf(cbbWQGD.Text) < 0)
-            {
-                _WQGD.Add(cbbWQGD.Text);
-                string wWQGD = string.Join(",", _WQGD.ToArray());
-                config.AppSettings.Settings["WQGD"].Value = wWQGD;
-            }
-            //定位切割放大位数
-            List<String> _WQGF = WQGF.ToList();
-            if (_WQGF.IndexOf(cbbWQGF.Text) < 0)
-            {
-                _WQGF.Add(cbbWQGF.Text);
-                string wWQGF = string.Join(",", _WQGF.ToArray());
-                config.AppSettings.Settings["WQGF"].Value = wWQGF;
-            }
-            //拉直操作放大位数
-            List<String> _WLZ = WLZ.ToList();
-            if (_WLZ.IndexOf(cbbWLZ.Text) < 0)
+            try
             {
-                _WLZ.Add(cbbWLZ.Text);
-                string wWLZ = string.Join(",", _WLZ.ToArray());
-                config.AppSettings.Settings["WLZ"].Value = wWLZ;
-            }
+                //设置数据源信息
+                //样品类型
+                List<String> _sT = sT.ToList();
+                if (_sT.IndexOf(cbbWYP.Text) < 0)
+                {
+                    _sT.Add(cbbWYP.Text);
+                    string wsT = string.Join(",", _sT.ToArray());
+                    config.AppSettings.Settings["Sample_Type"].Value = wsT;
+                }
+                //厂商
+                List<String> _firms = firms.ToList();
+                if (_firms.IndexOf(cbbWCS.Text) < 0)
+                {
+                    _firms.Add(cbbWCS.Text);
+                    string wFirms = string.Join(",", _firms.ToArray());
+                    config.AppSettings.Settings["Firm"].Value = wFirms;
+                }
+                //拍照电压
+                List<String> _WPZD = WPZD.ToList();
+                if (_WPZD.IndexOf(cbbWPZD.Text) < 0)
+                {
+                    _WPZD.Add(cbbWPZD.Text);
+                    string wWPZD = string.Join(",", _WPZD.ToArray());
+                    config.AppSettings.Settings["WPZD"].Value = wWPZD;
+                }
+                //拍照放大位数
+                List<String> _WPZF = WPZF.ToList();
+                if (_WPZF.IndexOf(cbbWPZF.Text) < 0)
+                {
+                    _WPZF.Add(cbbWPZF.Text);
+                    string wWPZF = string.Join(",", _WPZF.ToArray());
+                    config.AppSettings.Settings["WPZF"].Value = wWPZF;
+                }
+                //定位切割电压
+                List<String> _WQGD = WQGD.ToList();
+                if (_WQGD.IndexOf(cbbWQGD.Text) < 0)
+                {
+                    _WQGD.Add(cbbWQGD.Text);
+                    string wWQGD = string.Join(",", _WQGD.ToArray());
+                    config.AppSettings.Settings["WQGD"].Value = wWQGD;
+                }
+                //定位切割放大位数
+                List<String> _WQGF = WQGF.ToList();
+                if (_WQGF.IndexOf(cbbWQGF.Text) < 0)
+                {
+                    _WQGF.Add(cbbWQGF.Text);
+                    string wWQGF = string.Join(",", _WQGF.ToArray());
+                    config.AppSettings.Settings["WQGF"].Value = wWQGF;
+                }
+                //拉直操作放大位数
+                List<String> _WLZ = WLZ.ToList();
+                if (_WLZ.IndexOf(cbbWLZ.Text) < 0)
+                {
+                    _WLZ.Add(cbbWLZ.Text);
+                    string wWLZ = string.Join(",", _WLZ.ToArray());
+                    config.AppSettings.Settings["WLZ"].Value = wWLZ;
+                }
 
-            MeasureParam cfm = new MeasureParam();
-            cfm.Is_Photograph = chkWIsP.Checked;
-            cfm.PT = chkWPT.Checked;
-            cfm.PTTemp = txtWPTF.Text;
-            cfm.FIBTemp = txtWFIBF.Text;
-            cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
-            cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
-            cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
-            cfm.Photograph_Magnification = Convert.ToDouble(cbbWPZF.Text);
-            cfm.Photograph_Voltage = Convert.ToDouble(cbbWPZD.Text);
-            if (cbbWXZ.SelectedIndex == 0)
-            {
-                cfm.Correction_Angle = 36.0;
+                MeasureParam cfm = new MeasureParam();
+                cfm.Is_Photograph = chkWIsP.Checked;
+                cfm.PT = chkWPT.Checked;
+                cfm.PTTemp = txtWPTF.Text;
+                cfm.FIBTemp = txtWFIBF.Text;
+                cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
+                cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
+                cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
+                cfm.Photograph_Magnification = Convert.ToDouble(cbbWPZF.Text);
+                cfm.Photograph_Voltage = Convert.ToDouble(cbbWPZD.Text);
+                if (cbbWXZ.SelectedIndex == 0)
+                {
+                    cfm.Correction_Angle = 36.0;
+                }
+                else
+                {
+                    cfm.Correction_Angle = 54.0;
+                }
+
+                cfm.SampleName = cbbWYP.Text;
+                cfm.Firm = cbbWCS.Text;
+                //设置配置文件默认值
+                config.AppSettings.Settings["Is_Photograph"].Value = cfm.Is_Photograph.ToString();
+                config.AppSettings.Settings["PT_Depostion"].Value = cfm.PT.ToString();
+                config.AppSettings.Settings["PT_ELYFile"].Value = cfm.PTTemp;
+                config.AppSettings.Settings["FIB_ELYFile"].Value = cfm.FIBTemp;
+                config.AppSettings.Settings["Stretch_Magnification"].Value = cfm.Stretch_Magnification.ToString();
+                config.AppSettings.Settings["Location_Magnification"].Value = cfm.Location_Magnification.ToString();
+                config.AppSettings.Settings["Location_Voltage"].Value = cfm.Location_Voltage.ToString();
+                config.AppSettings.Settings["Photograph_Magnification"].Value = cfm.Photograph_Magnification.ToString();
+                config.AppSettings.Settings["Photograph_Voltage"].Value = cfm.Photograph_Voltage.ToString();
+                config.AppSettings.Settings["Correction_Angle"].Value = cfm.Correction_Angle.ToString();
+                config.AppSettings.Settings["SampleName"].Value = cfm.SampleName;
+                config.AppSettings.Settings["Firms"].Value = cfm.Firm;
+
+                config.Save(ConfigurationSaveMode.Modified);
+                ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
             }
-            else
+            catch (Exception ex)
             {
-                cfm.Correction_Angle = 54.0;
-            }
-
-            cfm.SampleName = cbbWYP.Text;
-            cfm.Firm = cbbWCS.Text;
-            //设置配置文件默认值
-            config.AppSettings.Settings["Is_Photograph"].Value = cfm.Is_Photograph.ToString();
-            config.AppSettings.Settings["PT_Depostion"].Value = cfm.PT.ToString();
-            config.AppSettings.Settings["PT_ELYFile"].Value = cfm.PTTemp;
-            config.AppSettings.Settings["FIB_ELYFile"].Value = cfm.FIBTemp;
-            config.AppSettings.Settings["Stretch_Magnification"].Value = cfm.Stretch_Magnification.ToString();
-            config.AppSettings.Settings["Location_Magnification"].Value = cfm.Location_Magnification.ToString();
-            config.AppSettings.Settings["Location_Voltage"].Value = cfm.Location_Voltage.ToString();
-            config.AppSettings.Settings["Photograph_Magnification"].Value = cfm.Photograph_Magnification.ToString();
-            config.AppSettings.Settings["Photograph_Voltage"].Value = cfm.Photograph_Voltage.ToString();
-            config.AppSettings.Settings["Correction_Angle"].Value = cfm.Correction_Angle.ToString();
-            config.AppSettings.Settings["SampleName"].Value = cfm.SampleName;
-            config.AppSettings.Settings["Firms"].Value = cfm.Firm;
 
-            config.Save(ConfigurationSaveMode.Modified);
-            ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
+                throw;
+            }
         }
 
         /// <summary>

+ 50 - 49
HOZProject/UserControls/UControl_Log.Designer.cs

@@ -28,12 +28,13 @@
         /// </summary>
         private void InitializeComponent()
         {
-            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();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = 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();
@@ -42,11 +43,10 @@
             this.panel2 = new System.Windows.Forms.Panel();
             this.label2 = new System.Windows.Forms.Label();
             this.lblLogCount = new System.Windows.Forms.Label();
-            this.pbClose = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).BeginInit();
             this.panel2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             // 
             // label1
@@ -71,52 +71,66 @@
             this.panel1.Size = new System.Drawing.Size(718, 30);
             this.panel1.TabIndex = 3;
             // 
+            // pbClose
+            // 
+            this.pbClose.BackColor = System.Drawing.Color.Black;
+            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.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(686, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 30);
+            this.pbClose.TabIndex = 107;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // dgvLog
             // 
             this.dgvLog.AllowUserToAddRows = false;
             this.dgvLog.AllowUserToDeleteRows = false;
             this.dgvLog.AllowUserToResizeColumns = false;
             this.dgvLog.AllowUserToResizeRows = false;
-            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;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
             this.dgvLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvLog.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.ColCutHoleName,
             this.ColStep,
             this.ColTime,
             this.ColState});
-            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;
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle10;
             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;
-            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;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle11;
             this.dgvLog.RowHeadersVisible = false;
             this.dgvLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
-            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle12;
             this.dgvLog.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.SystemColors.WindowText;
             this.dgvLog.RowTemplate.Height = 23;
             this.dgvLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@@ -197,24 +211,11 @@
             this.lblLogCount.AutoSize = true;
             this.lblLogCount.Font = new System.Drawing.Font("宋体", 10F);
             this.lblLogCount.ForeColor = System.Drawing.Color.Black;
-            this.lblLogCount.Location = new System.Drawing.Point(52, 4);
+            this.lblLogCount.Location = new System.Drawing.Point(57, 4);
             this.lblLogCount.Name = "lblLogCount";
-            this.lblLogCount.Size = new System.Drawing.Size(0, 14);
+            this.lblLogCount.Size = new System.Drawing.Size(28, 14);
             this.lblLogCount.TabIndex = 0;
-            // 
-            // pbClose
-            // 
-            this.pbClose.BackColor = System.Drawing.Color.Black;
-            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.Dock = System.Windows.Forms.DockStyle.Right;
-            this.pbClose.Location = new System.Drawing.Point(686, 0);
-            this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(32, 30);
-            this.pbClose.TabIndex = 107;
-            this.pbClose.TabStop = false;
-            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            this.lblLogCount.Text = "0条";
             // 
             // UControl_Log
             // 
@@ -229,10 +230,10 @@
             this.Size = new System.Drawing.Size(718, 398);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).EndInit();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
 
         }

+ 10 - 0
MeasureData/ConfigFile.cs

@@ -108,6 +108,14 @@ namespace MeasureData
         public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
         {
             Slo sFile = new Slo();
+
+            xString filename = new xString();
+            xString filepath = new xString();
+            filename.AssignValue(this.m_fileName);
+            filepath.AssignValue(this.m_filepath);
+            sFile.Register("FileName", filename);
+            sFile.Register("FilePath", filepath);
+
             sFile.Register("Param", this.m_Config);
 
             if (isStoring)
@@ -117,6 +125,8 @@ namespace MeasureData
             else
             {
                 sFile.Serialize(false, xml, rootNode);
+                this.m_fileName = filename.value();
+                this.m_filepath = filepath.value();
             }
         }
     }

+ 1 - 0
MeasureData/MeasureParam.cs

@@ -147,6 +147,7 @@ namespace MeasureData
             this.PT = false;
             this.FIBTemp = @"";
             this.PTTemp = @"";
+            this.AutoFocus = new FocusParam();
         }
 
         //XML文件保存测量参数

+ 15 - 0
MeasureThread/Measure.cs

@@ -58,6 +58,14 @@ namespace MeasureThread
         }
         private String message;
 
+        //孔名
+        public String HoleName
+        {
+            get { return this.holeName; }
+            set { this.holeName = value; }
+        }
+        private String holeName;
+
         //图片信息
         public class PictureInformation
         {
@@ -466,6 +474,8 @@ namespace MeasureThread
                 //拍照
                 case "1-3":
                 case "1-9":
+                case "1-16":
+                case "1-24":
                     //电压、放大倍数、工作距离、位置信息、图片路径
                     arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
                     arg.Picture_Information.Work_Status = "SEM";
@@ -473,11 +483,16 @@ namespace MeasureThread
                     arg.Picture_Information.Magnification = iSEM.GetMagnification();
                     break;
                 case "1-10":
+                case "1-18":
                     //获取偏移信息
                     break;
                 case "1-12":
+                case "1-20":
                     //验证移动准备性
                     break;
+                case "1-26":
+                    //取消电子束校正并初始化
+                    break;
                 default:
                     arg.Step_Code = "0-0";
                     arg.Message = step_code;