Bläddra i källkod

华为测试后程序20201026

@wang_qi0307 5 år sedan
förälder
incheckning
30eba3c5a5

+ 441 - 0
FileManager/MeasureFile.cs

@@ -0,0 +1,441 @@
+//时间:20200610
+//作者:郝爽
+//功能:测量文件
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using FileManager;
+using System.Xml;
+using System.IO;
+using System.Drawing;
+
+namespace MeasureData
+{
+    
+    public class MeasureFile:ISlo
+    {
+        public const string UNTITLED_FILE_NAME = "Untitled";
+
+        #region 内容
+        //文件名
+        private string m_fileName;
+        public string FileName
+        {
+            get { return this.m_fileName; }
+            set { this.m_fileName = value; }
+        }
+
+        //文件路径
+        private string m_filepath;
+        public string FilePath
+        {
+            get { return this.m_filepath; }
+            set { this.m_filepath = value; }
+        }
+
+        //切孔文件路径
+        private string m_CutHoleFilePath;
+        public string CutHoleFilePath
+        {
+            get { return this.m_CutHoleFilePath; }
+            set { this.m_CutHoleFilePath = value; }
+        }
+
+        //切孔链表
+        private List<CutHole> m_listCutHole;
+        public List<CutHole> ListCutHole
+        {
+            get { return this.m_listCutHole; }
+            set { this.m_listCutHole = value; }
+        }
+
+        //测量参数
+        private MeasureParam m_measureParam;
+        public MeasureParam MParam
+        {
+            get { return this.m_measureParam; }
+            set { this.m_measureParam = value; }
+        }
+
+        //是否需要保存文件
+        private bool m_IsModified;
+        public bool IsModified
+        {
+            get { return this.m_IsModified; }
+            set { this.m_IsModified = value; }
+        }
+        #endregion
+        /// <summary>
+        /// 创建XML文件
+        /// </summary>
+        /// <returns>0:失败;1:成功;2:文件已存在</returns>
+        public int CreateXml()
+        {
+            if (!File.Exists(this.FileName))
+            {
+                if( XmlManager.CreateXmlFile(this.FileName))
+                {
+                    //创建一个新的
+                    return 1;
+                }
+                else
+                {
+                    //创建失败
+                    return 0;
+                }
+            }
+            else
+            {
+                //重新创建
+                XmlManager.CreateXmlFile(this.FileName);
+                return 2;
+            }
+        }
+
+        //XML文件保存
+        //样品孔存储xml文档
+        public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
+        {
+            Slo sFile = new Slo();
+            Slo sParam = new Slo();
+            Collection<CutHole> sCutHoles = new Collection<CutHole>();
+
+            foreach (CutHole hole in ListCutHole)
+            {
+                sCutHoles.addItem(hole);
+            }            
+            
+            xString FileName = new xString();
+            xString FilePath = new xString();
+            FileName.AssignValue(this.FileName);
+            FilePath.AssignValue(this.FilePath);
+            sFile.Register("FileName", FileName);
+            sFile.Register("FilePath", FilePath);
+            sFile.Register("Param", this.MParam);
+            sFile.Register("ListCutHole", sCutHoles);            
+
+            if (isStoring)
+            {
+                sFile.Serialize(true, xml, rootNode);                
+            }
+            else
+            {
+                sFile.Serialize(false, xml, rootNode);
+
+                this.FileName = FileName.value();
+                this.FilePath = FilePath.value();
+                List<CutHole> tempCutHoleList = new List<CutHole>();
+                for (int i = 0; i < sCutHoles.size(); i++)
+                {
+                    tempCutHoleList.Add(sCutHoles.getItem(i));
+                }
+                if (tempCutHoleList.Count == sCutHoles.size())
+                {
+                    ListCutHole.Clear();
+                    ListCutHole = tempCutHoleList;
+                }
+            }
+        }
+       
+        //构造函数
+        public MeasureFile()
+        {
+            Init();
+        }
+
+        public void Init()
+        {
+            this.ListCutHole = new List<CutHole>();
+            this.FileName = @"";
+            this.FilePath = @"";
+            this.MParam = new MeasureParam();
+        }
+        #region 操作
+
+        //新建
+        public bool New()
+        {
+            int ret = CreateXml();
+            if (ret > 0)
+            {
+                XmlDocument doc = new XmlDocument();
+                doc.Load(this.FileName);//载入xml文件
+
+                XmlNode root = doc.SelectSingleNode("XMLData");
+
+                Serialize(true, doc, root);
+
+                doc.Save(this.FileName);
+            }
+
+            // 设置路径为初始默认路径
+            this.FileName = UNTITLED_FILE_NAME;
+            this.IsModified = false;
+            // Ok, return TRUE
+            return true;
+        }
+
+        //打开
+        public void Open()
+        {
+            XmlDocument doc = new XmlDocument();
+            doc.Load(this.FileName);//载入xml文件
+
+            XmlNode root = doc.SelectSingleNode("XMLData");
+
+            Serialize(false, doc, root);
+
+            this.IsModified = false;
+
+            doc.Save(this.FileName);
+        }
+
+        //保存
+        public bool Save()
+        {
+            //没有修改不需要重新保存文件
+            if (this.IsModified == false)
+            {
+                return true;
+            }
+
+            //如果是新文件
+            this.FileName.Trim();
+            if (string.Compare(this.FileName,UNTITLED_FILE_NAME) == 0)
+            {
+                return SaveAs();
+            }
+
+            XmlDocument doc = new XmlDocument();
+            if (CreateXml() == 0)//创建该文件?
+            {
+                return false;
+            }
+            if (File.Exists(FileName))
+            {
+                doc.Load(this.FileName);//载入xml文件   
+            }
+            else
+            {
+                return SaveAs(); //当前路径不存在               
+            }
+                      
+            XmlNode root = doc.SelectSingleNode("XMLData");
+            Serialize(true, doc, root);
+            doc.Save(this.FileName);
+            return true;
+        }
+
+        //另存为
+        public bool SaveAs()
+        {
+            //打开保存文件的对话框
+            this.FileName.Trim();
+            if (!string.IsNullOrEmpty(this.FileName))
+            {
+                this.FilePath = System.IO.Path.GetDirectoryName(this.FileName);
+            }
+
+            SaveFileDialog sfd = new SaveFileDialog();
+            sfd.Title = "保存测量文件";
+            sfd.Filter = "测量文件(*.msf)|*.msf";
+            
+            if (Directory.Exists(this.FilePath))
+            {
+                sfd.InitialDirectory = this.FilePath;
+            }
+
+            if (sfd.ShowDialog() == DialogResult.OK)
+            {
+
+                this.FileName = sfd.FileName.ToString(); //获得文件路径
+                FilePath = System.IO.Path.GetDirectoryName(this.FileName);
+
+                //创建一个新的文件
+                XmlDocument doc = new XmlDocument();
+                if (CreateXml() == 0)//创建该文件?
+                {
+                    return false;
+                }
+                doc.Load(this.FileName);
+                XmlNode root = doc.SelectSingleNode("XMLData");
+                Serialize(true, doc, root);
+                doc.Save(this.FileName);
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+        //从文件生成切割孔信息
+        public bool GetCutHolesFromFile(string a_FilePathName)
+        {
+            try
+            {
+                //清空原文件中的切孔
+                this.ListCutHole.Clear();
+
+                //弹出打开txt文件的对话矿
+                a_FilePathName.Trim();
+                if (string.IsNullOrEmpty(a_FilePathName))
+                {
+                    //新建一个文件对话框
+                    OpenFileDialog pOpenFileDialog = new OpenFileDialog();
+                    //设置对话框标题
+                    pOpenFileDialog.Title = "打开电镜位置列表文件";
+                    //设置打开文件类型
+                    pOpenFileDialog.Filter = "txt文件(*.txt)|*.txt";
+                    //监测文件是否存在
+                    pOpenFileDialog.CheckFileExists = true;
+                    //文件打开后执行以下程序
+                    if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
+                    {
+                        a_FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);                             
+                        //绝对路径
+                        CutHoleFilePath = a_FilePathName;
+
+                    }
+                }
+
+                //按行取出txt文件
+                string[] lines = File.ReadAllLines(a_FilePathName, System.Text.Encoding.Default);
+
+                LogManager.AddHardwareLog("read " + lines.Count().ToString() + "lines", true);
+                //按现有的文件格式生成
+                string posMode = lines[1];
+                if (posMode.CompareTo(@"Absolute") != 0)
+                {
+                    return false;
+                }
+
+                //解析切孔生成带有位置的切孔
+                //验证数量是否正确
+                int nNum = Convert.ToInt32(lines[3]);
+                int nLines = lines.Length;
+                if (nNum != (lines.Length - 4))
+                {
+                    return false;
+                }
+
+                //行内标识的个数及位置
+                string[] titles = lines[2].Split(',');
+                int numPos = titles.Length;
+
+                int nLabelPos = Array.IndexOf(titles, "Label");
+                int nXPos = Array.IndexOf(titles, "X");
+                int nYPos = Array.IndexOf(titles, "Y");
+                int nZPos = Array.IndexOf(titles, "Z");
+                int nTPos = Array.IndexOf(titles, "T");
+                int nRPos = Array.IndexOf(titles, "R");
+                int nMPos = Array.IndexOf(titles, "M");
+
+                for (int i = 0; i < nNum; i++)
+                {
+                    int currentLine = i + 4;
+                    string currentString = lines[currentLine];
+
+                    LogManager.AddHardwareLog(currentString, true);
+
+                    string[] CurrentPos = currentString.Split(',');
+                    int nCurrentPosNum = CurrentPos.Length;
+
+                    //当前行内的标识及位置个数不够
+                    if (nCurrentPosNum != numPos)
+                    {
+                        return false;
+                    }
+
+                    //切孔标识
+                    CutHole CHole = new CutHole();
+                    CHole.HoleName = CurrentPos[nLabelPos];
+                    //切孔位置
+                    SemPosition holePos = new SemPosition();
+                    holePos.X = Convert.ToSingle(CurrentPos[nXPos]);
+                    holePos.Y = Convert.ToSingle(CurrentPos[nYPos]);
+                    holePos.Z = Convert.ToSingle(CurrentPos[nZPos]);
+                    holePos.M = Convert.ToSingle(CurrentPos[nMPos]);
+                    holePos.T = Convert.ToSingle(CurrentPos[nTPos]);
+                    holePos.R = Convert.ToSingle(CurrentPos[nRPos]);
+                    CHole.Position = holePos;
+                    //默认切割点均参与测试
+                    CHole.SWITCH = true;
+
+                    //更新切孔链表
+                    this.ListCutHole.Add(CHole);
+                    LogManager.AddHardwareLog("X =" + CurrentPos[nXPos]
+                        + "Y =" + CurrentPos[nYPos]
+                        + "Z =" + CurrentPos[nZPos]
+                        + "M =" + CurrentPos[nTPos]
+                        + "T =" + CurrentPos[nRPos]
+                        + "R =" + CurrentPos[nMPos]
+                        , true);
+
+                }
+
+                this.IsModified = true;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                LogManager.LogError(ex.Message);
+                return false;
+            }         
+        }
+
+        //从点集合对象中生成切割孔信息
+        public bool GetCutHolesFromAnalysisPosition(List<PointF> cutHolePointF)
+        {
+            //集合中的数量
+            int nNum = Convert.ToInt32(cutHolePointF.Count);
+            if (nNum == 0)
+            {
+                return false;
+            }
+            else
+            {
+                List<CutHole> tempCutHoleList = new List<CutHole>();
+                for (int i = 0; i < nNum; i++)
+                {
+                    //切孔标识
+                    CutHole CHole = new CutHole();
+                    CHole.HoleName = (i + 1).ToString();
+                    //切孔位置
+                    SemPosition holePos = new SemPosition();
+                    holePos.X = Convert.ToSingle(cutHolePointF[i].X);
+                    holePos.Y = Convert.ToSingle(cutHolePointF[i].Y);
+                    holePos.Z = Convert.ToSingle(0);
+                    holePos.M = Convert.ToSingle(0);
+                    holePos.T = Convert.ToSingle(0);
+                    holePos.R = Convert.ToSingle(0);
+                    CHole.Position = holePos;
+                    //默认切割点均参与测试
+                    CHole.SWITCH = true;
+
+                    //更新切孔链表
+                    tempCutHoleList.Add(CHole);
+                    LogManager.AddHardwareLog("X =" + cutHolePointF[i].X
+                        + "Y =" + cutHolePointF[i].Y
+                        + "Z =" + 0
+                        + "M =" + 0
+                        + "T =" + 0
+                        + "R =" + 0
+                        , true);
+                }
+                if (tempCutHoleList.Count > 0)
+                {
+                    this.ListCutHole.Clear();
+                    this.ListCutHole = tempCutHoleList;
+                }
+            }
+            return true;
+        }
+        #endregion
+    }
+}

+ 9 - 4
HOZProject/App.config

@@ -7,7 +7,7 @@
       <!--厂商_数据源-->
       <add key="Firm" value="厂商A,厂商B,厂商C,厂商D"/>
       <!--样品类型_数据源-->
-      <add key="Sample_Type" value="类型A,类型B,类型C"/>
+      <add key="Sample_Type" value="0,1,2"/>
       <!--拍照的工作电压_数据源-->
       <add key="WPZD" value="100,200,300"/>
       <!--拍照的放大倍数_数据源-->
@@ -18,7 +18,10 @@
       <add key="WQGF" value="100,200,300"/>
       <!--拉直操作需要的放大倍数_数据源-->
       <add key="WLZ" value="100,200,300"/>
-      <add key="TemplateFilePath" value="E:\TemplateFilePath"/>
+      <!--FIB模式下的放大倍数_数据源-->
+      <add key="WFIB" value="100,200,300"/>
+      <!--一键配置保存目录-->
+      <add key="TemplateFilePath" value="D:\HOZ1.0\TemplateFilePath"/>
       <!--PT使用的ELY文件-->
       <add key="PT_ELYFile" value=""/>
       <!--FIB使用的ELY文件-->
@@ -43,6 +46,8 @@
       <add key="Is_Photograph" value="True"/>
       <!--是否PT沉积-->
       <add key="PT_Depostion" value="False"/>
+      <!--FIB的放大倍数-->
+      <add key="FIB_Magnification" value="1500"/>
       
       <!--自动对焦模式,手动1,自有2,客户3-->
       <add key="Focus_Mode" value="2"/>
@@ -50,9 +55,9 @@
       <!--远程IP地址-->
       <add key="WebServerIP" value="127.0.0.1"/>
       <!--远程IP端口-->
-      <add key="WebServerPort" value="18080"/>
+      <add key="WebServerPort" value="8009"/>
       <!--远程算法地址-->
-      <add key="WebServerUrl" value="FIB_degree_recognize,test2,FIB_verify,test4,test5,test6,test7,test8"/>
+      <add key="WebServerUrl" value="FIB_degree_recognize,FIB_cal_cut_location,FIB_verify,FIB_cut_center_location,test5,test6,FIB_degree_recognize_trap,test8,test9"/>
 
       <!--调节上限-->
       <add key="Focus_UP" value="3000"/>

+ 120 - 90
HOZProject/FormHOZMain.Designer.cs

@@ -46,17 +46,17 @@
             this.plLeftContent = new System.Windows.Forms.Panel();
             this.plTop = new System.Windows.Forms.Panel();
             this.pbStop = new System.Windows.Forms.PictureBox();
+            this.pbPause = new System.Windows.Forms.PictureBox();
             this.pbStart = new System.Windows.Forms.PictureBox();
             this.pbMax = new System.Windows.Forms.PictureBox();
             this.pbMin = new System.Windows.Forms.PictureBox();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.pbImportTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbLog = new System.Windows.Forms.PictureBox();
             this.pbInit = new System.Windows.Forms.PictureBox();
             this.pbSave = new System.Windows.Forms.PictureBox();
             this.pbOpen = new System.Windows.Forms.PictureBox();
             this.pbNew = new System.Windows.Forms.PictureBox();
-            this.pbClose = new System.Windows.Forms.PictureBox();
-            this.pbPause = new System.Windows.Forms.PictureBox();
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -65,17 +65,17 @@
             this.plLeft.SuspendLayout();
             this.plTop.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbPause)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMax)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMin)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbImportTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbLog)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbInit)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbSave)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbOpen)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbNew)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbPause)).BeginInit();
             this.SuspendLayout();
             // 
             // plMain
@@ -87,9 +87,10 @@
             this.plMain.Controls.Add(this.plFill);
             this.plMain.Controls.Add(this.plLeft);
             this.plMain.Controls.Add(this.plTop);
-            this.plMain.Location = new System.Drawing.Point(12, 12);
+            this.plMain.Location = new System.Drawing.Point(16, 15);
+            this.plMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plMain.Name = "plMain";
-            this.plMain.Size = new System.Drawing.Size(1000, 716);
+            this.plMain.Size = new System.Drawing.Size(1333, 895);
             this.plMain.TabIndex = 1;
             // 
             // plFill
@@ -103,9 +104,10 @@
             this.plFill.Controls.Add(this.listmsg);
             this.plFill.Controls.Add(this.pbImage);
             this.plFill.Controls.Add(this.plSEM);
-            this.plFill.Location = new System.Drawing.Point(106, 86);
+            this.plFill.Location = new System.Drawing.Point(141, 108);
+            this.plFill.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plFill.Name = "plFill";
-            this.plFill.Size = new System.Drawing.Size(894, 630);
+            this.plFill.Size = new System.Drawing.Size(1192, 788);
             this.plFill.TabIndex = 5;
             // 
             // groupBox1
@@ -116,9 +118,11 @@
             this.groupBox1.Controls.Add(this.comboBox1);
             this.groupBox1.Controls.Add(this.textBox2);
             this.groupBox1.ForeColor = System.Drawing.Color.White;
-            this.groupBox1.Location = new System.Drawing.Point(694, 2);
+            this.groupBox1.Location = new System.Drawing.Point(925, 2);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(200, 100);
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox1.Size = new System.Drawing.Size(267, 125);
             this.groupBox1.TabIndex = 26;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "测试设置状态";
@@ -126,18 +130,20 @@
             // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(6, 20);
+            this.textBox1.Location = new System.Drawing.Point(8, 25);
+            this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(100, 21);
+            this.textBox1.Size = new System.Drawing.Size(132, 25);
             this.textBox1.TabIndex = 21;
-            this.textBox1.Text = "切孔名称";
+            this.textBox1.Text = "分析点名称";
             // 
             // button1
             // 
             this.button1.ForeColor = System.Drawing.Color.Black;
-            this.button1.Location = new System.Drawing.Point(119, 20);
+            this.button1.Location = new System.Drawing.Point(159, 25);
+            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 74);
+            this.button1.Size = new System.Drawing.Size(100, 92);
             this.button1.TabIndex = 24;
             this.button1.Text = "测试";
             this.button1.UseVisualStyleBackColor = true;
@@ -149,16 +155,18 @@
             this.comboBox1.Items.AddRange(new object[] {
             "True",
             "False"});
-            this.comboBox1.Location = new System.Drawing.Point(6, 74);
+            this.comboBox1.Location = new System.Drawing.Point(8, 92);
+            this.comboBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.comboBox1.Name = "comboBox1";
-            this.comboBox1.Size = new System.Drawing.Size(100, 20);
+            this.comboBox1.Size = new System.Drawing.Size(132, 23);
             this.comboBox1.TabIndex = 25;
             // 
             // textBox2
             // 
-            this.textBox2.Location = new System.Drawing.Point(6, 47);
+            this.textBox2.Location = new System.Drawing.Point(8, 59);
+            this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(100, 21);
+            this.textBox2.Size = new System.Drawing.Size(132, 25);
             this.textBox2.TabIndex = 22;
             this.textBox2.Text = "编号";
             // 
@@ -166,8 +174,9 @@
             // 
             this.plPrarInfo.BackColor = System.Drawing.Color.White;
             this.plPrarInfo.Location = new System.Drawing.Point(0, 0);
+            this.plPrarInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plPrarInfo.Name = "plPrarInfo";
-            this.plPrarInfo.Size = new System.Drawing.Size(218, 100);
+            this.plPrarInfo.Size = new System.Drawing.Size(291, 125);
             this.plPrarInfo.TabIndex = 2;
             this.plPrarInfo.Visible = false;
             // 
@@ -175,11 +184,11 @@
             // 
             this.listmsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.listmsg.FormattingEnabled = true;
-            this.listmsg.ItemHeight = 12;
-            this.listmsg.Location = new System.Drawing.Point(417, 2);
-            this.listmsg.Margin = new System.Windows.Forms.Padding(2);
+            this.listmsg.ItemHeight = 15;
+            this.listmsg.Location = new System.Drawing.Point(556, 2);
+            this.listmsg.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.listmsg.Name = "listmsg";
-            this.listmsg.Size = new System.Drawing.Size(477, 196);
+            this.listmsg.Size = new System.Drawing.Size(635, 244);
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
@@ -187,8 +196,9 @@
             // 
             this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
             this.pbImage.Location = new System.Drawing.Point(0, 0);
+            this.pbImage.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(894, 574);
+            this.pbImage.Size = new System.Drawing.Size(1192, 718);
             this.pbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
             this.pbImage.TabIndex = 20;
             this.pbImage.TabStop = false;
@@ -199,9 +209,10 @@
             this.plSEM.Controls.Add(this.lblStateMessage);
             this.plSEM.Controls.Add(this.lblFlowContent);
             this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.plSEM.Location = new System.Drawing.Point(0, 574);
+            this.plSEM.Location = new System.Drawing.Point(0, 718);
+            this.plSEM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plSEM.Name = "plSEM";
-            this.plSEM.Size = new System.Drawing.Size(894, 56);
+            this.plSEM.Size = new System.Drawing.Size(1192, 70);
             this.plSEM.TabIndex = 19;
             // 
             // lblStateMessage
@@ -210,9 +221,10 @@
             this.lblStateMessage.BackColor = System.Drawing.Color.Black;
             this.lblStateMessage.Font = new System.Drawing.Font("宋体", 10F);
             this.lblStateMessage.ForeColor = System.Drawing.Color.White;
-            this.lblStateMessage.Location = new System.Drawing.Point(655, 15);
+            this.lblStateMessage.Location = new System.Drawing.Point(874, 19);
+            this.lblStateMessage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblStateMessage.Name = "lblStateMessage";
-            this.lblStateMessage.Size = new System.Drawing.Size(232, 24);
+            this.lblStateMessage.Size = new System.Drawing.Size(309, 30);
             this.lblStateMessage.TabIndex = 1;
             this.lblStateMessage.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             // 
@@ -221,9 +233,10 @@
             this.lblFlowContent.AutoSize = true;
             this.lblFlowContent.Font = new System.Drawing.Font("宋体", 10F);
             this.lblFlowContent.ForeColor = System.Drawing.Color.White;
-            this.lblFlowContent.Location = new System.Drawing.Point(25, 21);
+            this.lblFlowContent.Location = new System.Drawing.Point(33, 26);
+            this.lblFlowContent.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblFlowContent.Name = "lblFlowContent";
-            this.lblFlowContent.Size = new System.Drawing.Size(0, 14);
+            this.lblFlowContent.Size = new System.Drawing.Size(0, 17);
             this.lblFlowContent.TabIndex = 0;
             // 
             // plLeft
@@ -232,9 +245,10 @@
             this.plLeft.Controls.Add(this.label1);
             this.plLeft.Controls.Add(this.plLeftContent);
             this.plLeft.Dock = System.Windows.Forms.DockStyle.Left;
-            this.plLeft.Location = new System.Drawing.Point(0, 80);
+            this.plLeft.Location = new System.Drawing.Point(0, 100);
+            this.plLeft.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plLeft.Name = "plLeft";
-            this.plLeft.Size = new System.Drawing.Size(100, 636);
+            this.plLeft.Size = new System.Drawing.Size(133, 795);
             this.plLeft.TabIndex = 4;
             // 
             // label1
@@ -243,11 +257,12 @@
             this.label1.BackColor = System.Drawing.Color.Transparent;
             this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.Color.Gainsboro;
-            this.label1.Location = new System.Drawing.Point(22, 3);
+            this.label1.Location = new System.Drawing.Point(29, 4);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(57, 12);
+            this.label1.Size = new System.Drawing.Size(87, 15);
             this.label1.TabIndex = 1;
-            this.label1.Text = "切孔列表";
+            this.label1.Text = "分析点列表";
             // 
             // plLeftContent
             // 
@@ -255,9 +270,10 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.plLeftContent.AutoScroll = true;
-            this.plLeftContent.Location = new System.Drawing.Point(5, 19);
+            this.plLeftContent.Location = new System.Drawing.Point(7, 24);
+            this.plLeftContent.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plLeftContent.Name = "plLeftContent";
-            this.plLeftContent.Size = new System.Drawing.Size(90, 617);
+            this.plLeftContent.Size = new System.Drawing.Size(120, 771);
             this.plLeftContent.TabIndex = 0;
             // 
             // plTop
@@ -277,8 +293,9 @@
             this.plTop.Controls.Add(this.pbNew);
             this.plTop.Dock = System.Windows.Forms.DockStyle.Top;
             this.plTop.Location = new System.Drawing.Point(0, 0);
+            this.plTop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plTop.Name = "plTop";
-            this.plTop.Size = new System.Drawing.Size(1000, 80);
+            this.plTop.Size = new System.Drawing.Size(1333, 100);
             this.plTop.TabIndex = 3;
             // 
             // pbStop
@@ -287,23 +304,38 @@
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbStop.Enabled = false;
-            this.pbStop.Location = new System.Drawing.Point(447, 4);
+            this.pbStop.Location = new System.Drawing.Point(596, 5);
+            this.pbStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbStop.Name = "pbStop";
-            this.pbStop.Size = new System.Drawing.Size(68, 71);
+            this.pbStop.Size = new System.Drawing.Size(91, 89);
             this.pbStop.TabIndex = 8;
             this.pbStop.TabStop = false;
             this.pbStop.Click += new System.EventHandler(this.pbStop_Click);
             this.pbStop.MouseEnter += new System.EventHandler(this.pbStop_MouseEnter);
             this.pbStop.MouseLeave += new System.EventHandler(this.pbStop_MouseLeave);
             // 
+            // pbPause
+            // 
+            this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
+            this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbPause.Location = new System.Drawing.Point(695, 5);
+            this.pbPause.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbPause.Name = "pbPause";
+            this.pbPause.Size = new System.Drawing.Size(91, 89);
+            this.pbPause.TabIndex = 8;
+            this.pbPause.TabStop = false;
+            this.pbPause.Visible = false;
+            // 
             // pbStart
             // 
             this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start;
             this.pbStart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStart.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStart.Location = new System.Drawing.Point(373, 4);
+            this.pbStart.Location = new System.Drawing.Point(497, 5);
+            this.pbStart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbStart.Name = "pbStart";
-            this.pbStart.Size = new System.Drawing.Size(68, 71);
+            this.pbStart.Size = new System.Drawing.Size(91, 89);
             this.pbStart.TabIndex = 8;
             this.pbStart.TabStop = false;
             this.pbStart.Click += new System.EventHandler(this.pbStart_Click);
@@ -316,9 +348,10 @@
             this.pbMax.BackgroundImage = global::HOZProject.Properties.Resources.Max_Gray;
             this.pbMax.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbMax.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbMax.Location = new System.Drawing.Point(935, 0);
+            this.pbMax.Location = new System.Drawing.Point(1247, 0);
+            this.pbMax.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbMax.Name = "pbMax";
-            this.pbMax.Size = new System.Drawing.Size(28, 31);
+            this.pbMax.Size = new System.Drawing.Size(37, 39);
             this.pbMax.TabIndex = 7;
             this.pbMax.TabStop = false;
             this.pbMax.Click += new System.EventHandler(this.pbMax_Click);
@@ -331,23 +364,41 @@
             this.pbMin.BackgroundImage = global::HOZProject.Properties.Resources.Min_Gray;
             this.pbMin.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbMin.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbMin.Location = new System.Drawing.Point(901, 0);
+            this.pbMin.Location = new System.Drawing.Point(1201, 0);
+            this.pbMin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbMin.Name = "pbMin";
-            this.pbMin.Size = new System.Drawing.Size(28, 31);
+            this.pbMin.Size = new System.Drawing.Size(37, 39);
             this.pbMin.TabIndex = 7;
             this.pbMin.TabStop = false;
             this.pbMin.Click += new System.EventHandler(this.pbMin_Click);
             this.pbMin.MouseEnter += new System.EventHandler(this.pbMin_MouseEnter);
             this.pbMin.MouseLeave += new System.EventHandler(this.pbMin_MouseLeave);
             // 
+            // pbClose
+            // 
+            this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Location = new System.Drawing.Point(1292, 0);
+            this.pbClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(37, 39);
+            this.pbClose.TabIndex = 7;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.pbClose_Click);
+            this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
+            this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
+            // 
             // pbImportTemplateFile
             // 
             this.pbImportTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportConfigFile;
             this.pbImportTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbImportTemplateFile.Location = new System.Drawing.Point(224, 4);
+            this.pbImportTemplateFile.Location = new System.Drawing.Point(299, 5);
+            this.pbImportTemplateFile.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbImportTemplateFile.Name = "pbImportTemplateFile";
-            this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
+            this.pbImportTemplateFile.Size = new System.Drawing.Size(91, 89);
             this.pbImportTemplateFile.TabIndex = 6;
             this.pbImportTemplateFile.TabStop = false;
             this.pbImportTemplateFile.Click += new System.EventHandler(this.pbImportTemplateFile_Click);
@@ -357,9 +408,10 @@
             this.pbLog.BackgroundImage = global::HOZProject.Properties.Resources.Log;
             this.pbLog.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbLog.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbLog.Location = new System.Drawing.Point(297, 4);
+            this.pbLog.Location = new System.Drawing.Point(396, 5);
+            this.pbLog.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbLog.Name = "pbLog";
-            this.pbLog.Size = new System.Drawing.Size(68, 71);
+            this.pbLog.Size = new System.Drawing.Size(91, 89);
             this.pbLog.TabIndex = 6;
             this.pbLog.TabStop = false;
             this.pbLog.Click += new System.EventHandler(this.pbLog_Click);
@@ -369,9 +421,10 @@
             this.pbInit.BackgroundImage = global::HOZProject.Properties.Resources.init;
             this.pbInit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbInit.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbInit.Location = new System.Drawing.Point(151, 4);
+            this.pbInit.Location = new System.Drawing.Point(201, 5);
+            this.pbInit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbInit.Name = "pbInit";
-            this.pbInit.Size = new System.Drawing.Size(68, 71);
+            this.pbInit.Size = new System.Drawing.Size(91, 89);
             this.pbInit.TabIndex = 5;
             this.pbInit.TabStop = false;
             this.pbInit.Click += new System.EventHandler(this.pbInit_Click);
@@ -381,9 +434,10 @@
             this.pbSave.BackgroundImage = global::HOZProject.Properties.Resources.save;
             this.pbSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbSave.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbSave.Location = new System.Drawing.Point(78, 4);
+            this.pbSave.Location = new System.Drawing.Point(104, 5);
+            this.pbSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbSave.Name = "pbSave";
-            this.pbSave.Size = new System.Drawing.Size(68, 71);
+            this.pbSave.Size = new System.Drawing.Size(91, 89);
             this.pbSave.TabIndex = 4;
             this.pbSave.TabStop = false;
             this.pbSave.Click += new System.EventHandler(this.pbSave_Click);
@@ -393,9 +447,10 @@
             this.pbOpen.BackgroundImage = global::HOZProject.Properties.Resources.open;
             this.pbOpen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbOpen.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbOpen.Location = new System.Drawing.Point(5, 4);
+            this.pbOpen.Location = new System.Drawing.Point(7, 5);
+            this.pbOpen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbOpen.Name = "pbOpen";
-            this.pbOpen.Size = new System.Drawing.Size(68, 71);
+            this.pbOpen.Size = new System.Drawing.Size(91, 89);
             this.pbOpen.TabIndex = 3;
             this.pbOpen.TabStop = false;
             this.pbOpen.Click += new System.EventHandler(this.pbOpen_Click);
@@ -405,50 +460,25 @@
             this.pbNew.BackgroundImage = global::HOZProject.Properties.Resources.New;
             this.pbNew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbNew.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbNew.Location = new System.Drawing.Point(5, 4);
+            this.pbNew.Location = new System.Drawing.Point(7, 5);
+            this.pbNew.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbNew.Name = "pbNew";
-            this.pbNew.Size = new System.Drawing.Size(68, 71);
+            this.pbNew.Size = new System.Drawing.Size(91, 89);
             this.pbNew.TabIndex = 3;
             this.pbNew.TabStop = false;
             this.pbNew.Visible = false;
             this.pbNew.Click += new System.EventHandler(this.pbNew_Click);
             // 
-            // pbClose
-            // 
-            this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
-            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
-            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbClose.Location = new System.Drawing.Point(969, 0);
-            this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(28, 31);
-            this.pbClose.TabIndex = 7;
-            this.pbClose.TabStop = false;
-            this.pbClose.Click += new System.EventHandler(this.pbClose_Click);
-            this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
-            this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
-            // 
-            // pbPause
-            // 
-            this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
-            this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
-            this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbPause.Location = new System.Drawing.Point(521, 4);
-            this.pbPause.Name = "pbPause";
-            this.pbPause.Size = new System.Drawing.Size(68, 71);
-            this.pbPause.TabIndex = 8;
-            this.pbPause.TabStop = false;
-            this.pbPause.Visible = false;
-            // 
             // FormHOZMain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.WindowFrame;
-            this.ClientSize = new System.Drawing.Size(1024, 740);
+            this.ClientSize = new System.Drawing.Size(1365, 925);
             this.ControlBox = false;
             this.Controls.Add(this.plMain);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "FormHOZMain";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "FormHOZMain";
@@ -465,17 +495,17 @@
             this.plLeft.PerformLayout();
             this.plTop.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbPause)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMax)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMin)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbImportTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbLog)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbInit)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbSave)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbOpen)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbNew)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbPause)).EndInit();
             this.ResumeLayout(false);
 
         }

+ 7 - 0
HOZProject/FormHOZMain.cs

@@ -378,6 +378,13 @@ namespace HOZProject
                 //清空内容容器中的控件
                 ClearPanelControls();
             }
+            //实例初始化窗体对象
+            if (uControl_Init == null)
+            {
+                uControl_Init = new UControl_Init(this);
+                uControl_Init.ReloadConfig();
+            }
+            m_MeasureFile.MParam = uControl_Init.GetMeasureParam();
         }
 
         private void pbSave_Click(object sender, EventArgs e)

+ 427 - 159
HOZProject/FormUnitControl.Designer.cs

@@ -28,11 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(65D, 65D);
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(65D, 65D);
             this.btnGrabImage = new System.Windows.Forms.Button();
             this.btnenlargeGet = new System.Windows.Forms.Button();
             this.btnWriteXml = new System.Windows.Forms.Button();
@@ -104,15 +104,10 @@
             this.txtenlargeSet = new System.Windows.Forms.TextBox();
             this.label1 = new System.Windows.Forms.Label();
             this.panelControl = new System.Windows.Forms.Panel();
+            this.button4 = new System.Windows.Forms.Button();
             this.btnMILL = new System.Windows.Forms.Button();
             this.btnFIB = new System.Windows.Forms.Button();
             this.panelSEM = new System.Windows.Forms.Panel();
-            this.button1 = new System.Windows.Forms.Button();
-            this.txtVoltage = new System.Windows.Forms.TextBox();
-            this.button2 = new System.Windows.Forms.Button();
-            this.label67 = new System.Windows.Forms.Label();
-            this.btnScanRotationSetOn = new System.Windows.Forms.Button();
-            this.btnTiltAngleSetOn = new System.Windows.Forms.Button();
             this.panelFIB = new System.Windows.Forms.Panel();
             this.btnExeEly3 = new System.Windows.Forms.Button();
             this.btnFIBStatus = new System.Windows.Forms.Button();
@@ -143,6 +138,12 @@
             this.btnFIBWDGet = new System.Windows.Forms.Button();
             this.label16 = new System.Windows.Forms.Label();
             this.txtFIBWD = new System.Windows.Forms.TextBox();
+            this.button1 = new System.Windows.Forms.Button();
+            this.txtVoltage = new System.Windows.Forms.TextBox();
+            this.button2 = new System.Windows.Forms.Button();
+            this.label67 = new System.Windows.Forms.Label();
+            this.btnScanRotationSetOn = new System.Windows.Forms.Button();
+            this.btnTiltAngleSetOn = new System.Windows.Forms.Button();
             this.btnTiltAngleSetOff = new System.Windows.Forms.Button();
             this.btnScanRotationSetLock = new System.Windows.Forms.Button();
             this.btnFrozen = new System.Windows.Forms.Button();
@@ -178,6 +179,15 @@
             this.tabControl1 = new System.Windows.Forms.TabControl();
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.tabPage2 = new System.Windows.Forms.TabPage();
+            this.txtfirm = new System.Windows.Forms.TextBox();
+            this.txtTypee = new System.Windows.Forms.TextBox();
+            this.btntest = new System.Windows.Forms.Button();
+            this.txtaddr2 = new System.Windows.Forms.TextBox();
+            this.txtaddr = new System.Windows.Forms.TextBox();
+            this.lbllocationy2 = new System.Windows.Forms.Label();
+            this.label71 = new System.Windows.Forms.Label();
+            this.lbllocationx2 = new System.Windows.Forms.Label();
+            this.label75 = new System.Windows.Forms.Label();
             this.lblstate6 = new System.Windows.Forms.Label();
             this.label47 = new System.Windows.Forms.Label();
             this.lblcentery = new System.Windows.Forms.Label();
@@ -204,9 +214,9 @@
             this.label35 = new System.Windows.Forms.Label();
             this.lblstate2 = new System.Windows.Forms.Label();
             this.label27 = new System.Windows.Forms.Label();
-            this.lbllocationy = new System.Windows.Forms.Label();
+            this.lbllocationy1 = new System.Windows.Forms.Label();
             this.label31 = new System.Windows.Forms.Label();
-            this.lbllocationx = new System.Windows.Forms.Label();
+            this.lbllocationx1 = new System.Windows.Forms.Label();
             this.label33 = new System.Windows.Forms.Label();
             this.btnPost8 = new System.Windows.Forms.Button();
             this.btnPost7 = new System.Windows.Forms.Button();
@@ -223,6 +233,7 @@
             this.label25 = new System.Windows.Forms.Label();
             this.btnPost1 = new System.Windows.Forms.Button();
             this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.button3 = new System.Windows.Forms.Button();
             this.cbbWPZD = new System.Windows.Forms.ComboBox();
             this.cbbWPZF = new System.Windows.Forms.ComboBox();
             this.cbbWQGD = new System.Windows.Forms.ComboBox();
@@ -274,6 +285,17 @@
             this.btnReadConfig = new System.Windows.Forms.Button();
             this.btnCreateConfig = new System.Windows.Forms.Button();
             this.tabPage4 = new System.Windows.Forms.TabPage();
+            this.txtstageny = new System.Windows.Forms.TextBox();
+            this.txtstagenx = new System.Windows.Forms.TextBox();
+            this.txtps = new System.Windows.Forms.TextBox();
+            this.label77 = new System.Windows.Forms.Label();
+            this.btnimgv = new System.Windows.Forms.Button();
+            this.txtstagevy = new System.Windows.Forms.TextBox();
+            this.txtstagevx = new System.Windows.Forms.TextBox();
+            this.txtimgy = new System.Windows.Forms.TextBox();
+            this.txtimgx = new System.Windows.Forms.TextBox();
+            this.label69 = new System.Windows.Forms.Label();
+            this.label73 = new System.Windows.Forms.Label();
             this.btn60 = new System.Windows.Forms.Button();
             this.btn45 = new System.Windows.Forms.Button();
             this.btn30 = new System.Windows.Forms.Button();
@@ -293,7 +315,6 @@
             this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.lblPs1 = new System.Windows.Forms.Label();
             this.btnPsFile = new System.Windows.Forms.Button();
-            this.button3 = new System.Windows.Forms.Button();
             this.panelControl.SuspendLayout();
             this.panelSEM.SuspendLayout();
             this.panelFIB.SuspendLayout();
@@ -1080,6 +1101,7 @@
             // 
             // panelControl
             // 
+            this.panelControl.Controls.Add(this.button4);
             this.panelControl.Controls.Add(this.btnMILL);
             this.panelControl.Controls.Add(this.btnGrabImage);
             this.panelControl.Controls.Add(this.btnFIB);
@@ -1091,6 +1113,18 @@
             this.panelControl.Size = new System.Drawing.Size(780, 565);
             this.panelControl.TabIndex = 20;
             // 
+            // button4
+            // 
+            this.button4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button4.Location = new System.Drawing.Point(464, 10);
+            this.button4.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(144, 41);
+            this.button4.TabIndex = 50;
+            this.button4.Text = "连续拍照";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click);
+            // 
             // btnMILL
             // 
             this.btnMILL.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1117,13 +1151,13 @@
             // 
             // panelSEM
             // 
+            this.panelSEM.Controls.Add(this.panelFIB);
             this.panelSEM.Controls.Add(this.button1);
             this.panelSEM.Controls.Add(this.txtVoltage);
             this.panelSEM.Controls.Add(this.button2);
             this.panelSEM.Controls.Add(this.label67);
             this.panelSEM.Controls.Add(this.btnScanRotationSetOn);
             this.panelSEM.Controls.Add(this.btnTiltAngleSetOn);
-            this.panelSEM.Controls.Add(this.panelFIB);
             this.panelSEM.Controls.Add(this.btnTiltAngleSetOff);
             this.panelSEM.Controls.Add(this.btnScanRotationSetLock);
             this.panelSEM.Controls.Add(this.btnFrozen);
@@ -1191,74 +1225,6 @@
             this.panelSEM.Size = new System.Drawing.Size(780, 509);
             this.panelSEM.TabIndex = 47;
             // 
-            // button1
-            // 
-            this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button1.Location = new System.Drawing.Point(693, 365);
-            this.button1.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(54, 34);
-            this.button1.TabIndex = 97;
-            this.button1.Text = "写";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            // 
-            // txtVoltage
-            // 
-            this.txtVoltage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
-            this.txtVoltage.Location = new System.Drawing.Point(551, 367);
-            this.txtVoltage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.txtVoltage.Name = "txtVoltage";
-            this.txtVoltage.Size = new System.Drawing.Size(85, 30);
-            this.txtVoltage.TabIndex = 96;
-            this.txtVoltage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // button2
-            // 
-            this.button2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button2.Location = new System.Drawing.Point(640, 365);
-            this.button2.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(54, 34);
-            this.button2.TabIndex = 94;
-            this.button2.Text = "读";
-            this.button2.UseVisualStyleBackColor = true;
-            this.button2.Click += new System.EventHandler(this.button2_Click);
-            // 
-            // label67
-            // 
-            this.label67.AutoSize = true;
-            this.label67.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label67.Location = new System.Drawing.Point(469, 369);
-            this.label67.Name = "label67";
-            this.label67.Size = new System.Drawing.Size(72, 27);
-            this.label67.TabIndex = 95;
-            this.label67.Text = "电压:";
-            // 
-            // btnScanRotationSetOn
-            // 
-            this.btnScanRotationSetOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnScanRotationSetOn.Location = new System.Drawing.Point(353, 367);
-            this.btnScanRotationSetOn.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.btnScanRotationSetOn.Name = "btnScanRotationSetOn";
-            this.btnScanRotationSetOn.Size = new System.Drawing.Size(54, 34);
-            this.btnScanRotationSetOn.TabIndex = 93;
-            this.btnScanRotationSetOn.Text = "开";
-            this.btnScanRotationSetOn.UseVisualStyleBackColor = true;
-            this.btnScanRotationSetOn.Click += new System.EventHandler(this.btnScanRotationSetOn_Click);
-            // 
-            // btnTiltAngleSetOn
-            // 
-            this.btnTiltAngleSetOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnTiltAngleSetOn.Location = new System.Drawing.Point(353, 302);
-            this.btnTiltAngleSetOn.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
-            this.btnTiltAngleSetOn.Name = "btnTiltAngleSetOn";
-            this.btnTiltAngleSetOn.Size = new System.Drawing.Size(54, 34);
-            this.btnTiltAngleSetOn.TabIndex = 92;
-            this.btnTiltAngleSetOn.Text = "开";
-            this.btnTiltAngleSetOn.UseVisualStyleBackColor = true;
-            this.btnTiltAngleSetOn.Click += new System.EventHandler(this.btnTiltAngleSetOn_Click);
-            // 
             // panelFIB
             // 
             this.panelFIB.Controls.Add(this.btnExeEly3);
@@ -1621,6 +1587,74 @@
             this.txtFIBWD.TabIndex = 20;
             this.txtFIBWD.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
+            // button1
+            // 
+            this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button1.Location = new System.Drawing.Point(693, 365);
+            this.button1.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(54, 34);
+            this.button1.TabIndex = 97;
+            this.button1.Text = "写";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // txtVoltage
+            // 
+            this.txtVoltage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.txtVoltage.Location = new System.Drawing.Point(551, 367);
+            this.txtVoltage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txtVoltage.Name = "txtVoltage";
+            this.txtVoltage.Size = new System.Drawing.Size(85, 30);
+            this.txtVoltage.TabIndex = 96;
+            this.txtVoltage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // button2
+            // 
+            this.button2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button2.Location = new System.Drawing.Point(640, 365);
+            this.button2.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(54, 34);
+            this.button2.TabIndex = 94;
+            this.button2.Text = "读";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // label67
+            // 
+            this.label67.AutoSize = true;
+            this.label67.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label67.Location = new System.Drawing.Point(469, 369);
+            this.label67.Name = "label67";
+            this.label67.Size = new System.Drawing.Size(72, 27);
+            this.label67.TabIndex = 95;
+            this.label67.Text = "电压:";
+            // 
+            // btnScanRotationSetOn
+            // 
+            this.btnScanRotationSetOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnScanRotationSetOn.Location = new System.Drawing.Point(353, 367);
+            this.btnScanRotationSetOn.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.btnScanRotationSetOn.Name = "btnScanRotationSetOn";
+            this.btnScanRotationSetOn.Size = new System.Drawing.Size(54, 34);
+            this.btnScanRotationSetOn.TabIndex = 93;
+            this.btnScanRotationSetOn.Text = "开";
+            this.btnScanRotationSetOn.UseVisualStyleBackColor = true;
+            this.btnScanRotationSetOn.Click += new System.EventHandler(this.btnScanRotationSetOn_Click);
+            // 
+            // btnTiltAngleSetOn
+            // 
+            this.btnTiltAngleSetOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnTiltAngleSetOn.Location = new System.Drawing.Point(353, 302);
+            this.btnTiltAngleSetOn.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.btnTiltAngleSetOn.Name = "btnTiltAngleSetOn";
+            this.btnTiltAngleSetOn.Size = new System.Drawing.Size(54, 34);
+            this.btnTiltAngleSetOn.TabIndex = 92;
+            this.btnTiltAngleSetOn.Text = "开";
+            this.btnTiltAngleSetOn.UseVisualStyleBackColor = true;
+            this.btnTiltAngleSetOn.Click += new System.EventHandler(this.btnTiltAngleSetOn_Click);
+            // 
             // btnTiltAngleSetOff
             // 
             this.btnTiltAngleSetOff.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -2056,6 +2090,15 @@
             // 
             // tabPage2
             // 
+            this.tabPage2.Controls.Add(this.txtfirm);
+            this.tabPage2.Controls.Add(this.txtTypee);
+            this.tabPage2.Controls.Add(this.btntest);
+            this.tabPage2.Controls.Add(this.txtaddr2);
+            this.tabPage2.Controls.Add(this.txtaddr);
+            this.tabPage2.Controls.Add(this.lbllocationy2);
+            this.tabPage2.Controls.Add(this.label71);
+            this.tabPage2.Controls.Add(this.lbllocationx2);
+            this.tabPage2.Controls.Add(this.label75);
             this.tabPage2.Controls.Add(this.lblstate6);
             this.tabPage2.Controls.Add(this.label47);
             this.tabPage2.Controls.Add(this.lblcentery);
@@ -2082,9 +2125,9 @@
             this.tabPage2.Controls.Add(this.label35);
             this.tabPage2.Controls.Add(this.lblstate2);
             this.tabPage2.Controls.Add(this.label27);
-            this.tabPage2.Controls.Add(this.lbllocationy);
+            this.tabPage2.Controls.Add(this.lbllocationy1);
             this.tabPage2.Controls.Add(this.label31);
-            this.tabPage2.Controls.Add(this.lbllocationx);
+            this.tabPage2.Controls.Add(this.lbllocationx1);
             this.tabPage2.Controls.Add(this.label33);
             this.tabPage2.Controls.Add(this.btnPost8);
             this.tabPage2.Controls.Add(this.btnPost7);
@@ -2108,6 +2151,89 @@
             this.tabPage2.Text = "POST";
             this.tabPage2.UseVisualStyleBackColor = true;
             // 
+            // txtfirm
+            // 
+            this.txtfirm.Location = new System.Drawing.Point(347, 125);
+            this.txtfirm.Name = "txtfirm";
+            this.txtfirm.Size = new System.Drawing.Size(50, 25);
+            this.txtfirm.TabIndex = 103;
+            this.txtfirm.Text = "LG";
+            // 
+            // txtTypee
+            // 
+            this.txtTypee.Location = new System.Drawing.Point(347, 86);
+            this.txtTypee.Name = "txtTypee";
+            this.txtTypee.Size = new System.Drawing.Size(50, 25);
+            this.txtTypee.TabIndex = 102;
+            this.txtTypee.Text = "1";
+            // 
+            // btntest
+            // 
+            this.btntest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btntest.Location = new System.Drawing.Point(321, 26);
+            this.btntest.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.btntest.Name = "btntest";
+            this.btntest.Size = new System.Drawing.Size(101, 41);
+            this.btntest.TabIndex = 101;
+            this.btntest.Text = "复制图片";
+            this.btntest.UseVisualStyleBackColor = true;
+            this.btntest.Click += new System.EventHandler(this.btntest_Click);
+            // 
+            // txtaddr2
+            // 
+            this.txtaddr2.Location = new System.Drawing.Point(446, 168);
+            this.txtaddr2.Multiline = true;
+            this.txtaddr2.Name = "txtaddr2";
+            this.txtaddr2.Size = new System.Drawing.Size(556, 48);
+            this.txtaddr2.TabIndex = 100;
+            this.txtaddr2.Text = "\\\\10.31.250.34\\tplcd小组项目管理\\21.白盒化实验室";
+            // 
+            // txtaddr
+            // 
+            this.txtaddr.Location = new System.Drawing.Point(446, 6);
+            this.txtaddr.Name = "txtaddr";
+            this.txtaddr.Size = new System.Drawing.Size(848, 25);
+            this.txtaddr.TabIndex = 99;
+            this.txtaddr.Text = "\\\\10.31.250.34\\tplcd小组项目管理\\21.白盒化实验室";
+            // 
+            // lbllocationy2
+            // 
+            this.lbllocationy2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lbllocationy2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lbllocationy2.Location = new System.Drawing.Point(859, 125);
+            this.lbllocationy2.Name = "lbllocationy2";
+            this.lbllocationy2.Size = new System.Drawing.Size(112, 27);
+            this.lbllocationy2.TabIndex = 98;
+            // 
+            // label71
+            // 
+            this.label71.AutoSize = true;
+            this.label71.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label71.Location = new System.Drawing.Point(730, 125);
+            this.label71.Name = "label71";
+            this.label71.Size = new System.Drawing.Size(129, 27);
+            this.label71.TabIndex = 97;
+            this.label71.Text = "LocationY2:";
+            // 
+            // lbllocationx2
+            // 
+            this.lbllocationx2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lbllocationx2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lbllocationx2.Location = new System.Drawing.Point(570, 125);
+            this.lbllocationx2.Name = "lbllocationx2";
+            this.lbllocationx2.Size = new System.Drawing.Size(112, 27);
+            this.lbllocationx2.TabIndex = 96;
+            // 
+            // label75
+            // 
+            this.label75.AutoSize = true;
+            this.label75.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label75.Location = new System.Drawing.Point(441, 125);
+            this.label75.Name = "label75";
+            this.label75.Size = new System.Drawing.Size(144, 27);
+            this.label75.TabIndex = 95;
+            this.label75.Text = "LocationX2:";
+            // 
             // lblstate6
             // 
             this.lblstate6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -2355,14 +2481,14 @@
             this.label27.TabIndex = 69;
             this.label27.Text = "成功失败";
             // 
-            // lbllocationy
+            // lbllocationy1
             // 
-            this.lbllocationy.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.lbllocationy.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lbllocationy.Location = new System.Drawing.Point(859, 98);
-            this.lbllocationy.Name = "lbllocationy";
-            this.lbllocationy.Size = new System.Drawing.Size(112, 27);
-            this.lbllocationy.TabIndex = 68;
+            this.lbllocationy1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lbllocationy1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lbllocationy1.Location = new System.Drawing.Point(859, 98);
+            this.lbllocationy1.Name = "lbllocationy1";
+            this.lbllocationy1.Size = new System.Drawing.Size(112, 27);
+            this.lbllocationy1.TabIndex = 68;
             // 
             // label31
             // 
@@ -2370,18 +2496,18 @@
             this.label31.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label31.Location = new System.Drawing.Point(730, 98);
             this.label31.Name = "label31";
-            this.label31.Size = new System.Drawing.Size(126, 27);
+            this.label31.Size = new System.Drawing.Size(129, 27);
             this.label31.TabIndex = 67;
-            this.label31.Text = "Location-Y:";
+            this.label31.Text = "LocationY1:";
             // 
-            // lbllocationx
+            // lbllocationx1
             // 
-            this.lbllocationx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.lbllocationx.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lbllocationx.Location = new System.Drawing.Point(570, 98);
-            this.lbllocationx.Name = "lbllocationx";
-            this.lbllocationx.Size = new System.Drawing.Size(112, 27);
-            this.lbllocationx.TabIndex = 66;
+            this.lbllocationx1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lbllocationx1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lbllocationx1.Location = new System.Drawing.Point(570, 98);
+            this.lbllocationx1.Name = "lbllocationx1";
+            this.lbllocationx1.Size = new System.Drawing.Size(112, 27);
+            this.lbllocationx1.TabIndex = 66;
             // 
             // label33
             // 
@@ -2389,9 +2515,9 @@
             this.label33.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label33.Location = new System.Drawing.Point(441, 98);
             this.label33.Name = "label33";
-            this.label33.Size = new System.Drawing.Size(141, 27);
+            this.label33.Size = new System.Drawing.Size(144, 27);
             this.label33.TabIndex = 65;
-            this.label33.Text = "Location-X:";
+            this.label33.Text = "LocationX1:";
             // 
             // btnPost8
             // 
@@ -2481,7 +2607,7 @@
             // 
             this.lblstate1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lblstate1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lblstate1.Location = new System.Drawing.Point(1182, 33);
+            this.lblstate1.Location = new System.Drawing.Point(1182, 48);
             this.lblstate1.Name = "lblstate1";
             this.lblstate1.Size = new System.Drawing.Size(112, 27);
             this.lblstate1.TabIndex = 57;
@@ -2490,7 +2616,7 @@
             // 
             this.label30.AutoSize = true;
             this.label30.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label30.Location = new System.Drawing.Point(1053, 33);
+            this.label30.Location = new System.Drawing.Point(1053, 48);
             this.label30.Name = "label30";
             this.label30.Size = new System.Drawing.Size(92, 27);
             this.label30.TabIndex = 56;
@@ -2500,7 +2626,7 @@
             // 
             this.lbldirection1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lbldirection1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lbldirection1.Location = new System.Drawing.Point(859, 33);
+            this.lbldirection1.Location = new System.Drawing.Point(859, 48);
             this.lbldirection1.Name = "lbldirection1";
             this.lbldirection1.Size = new System.Drawing.Size(112, 27);
             this.lbldirection1.TabIndex = 55;
@@ -2509,7 +2635,7 @@
             // 
             this.label28.AutoSize = true;
             this.label28.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label28.Location = new System.Drawing.Point(730, 33);
+            this.label28.Location = new System.Drawing.Point(730, 48);
             this.label28.Name = "label28";
             this.label28.Size = new System.Drawing.Size(92, 27);
             this.label28.TabIndex = 54;
@@ -2519,7 +2645,7 @@
             // 
             this.lbldegree1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lbldegree1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lbldegree1.Location = new System.Drawing.Point(570, 33);
+            this.lbldegree1.Location = new System.Drawing.Point(570, 48);
             this.lbldegree1.Name = "lbldegree1";
             this.lbldegree1.Size = new System.Drawing.Size(112, 27);
             this.lbldegree1.TabIndex = 53;
@@ -2528,7 +2654,7 @@
             // 
             this.label25.AutoSize = true;
             this.label25.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label25.Location = new System.Drawing.Point(441, 33);
+            this.label25.Location = new System.Drawing.Point(441, 48);
             this.label25.Name = "label25";
             this.label25.Size = new System.Drawing.Size(112, 27);
             this.label25.TabIndex = 52;
@@ -2606,6 +2732,16 @@
             this.tabPage3.Text = "参数文件设计";
             this.tabPage3.UseVisualStyleBackColor = true;
             // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(120, 149);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(132, 93);
+            this.button3.TabIndex = 76;
+            this.button3.Text = "button3";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
             // cbbWPZD
             // 
             this.cbbWPZD.FormattingEnabled = true;
@@ -3066,6 +3202,17 @@
             // 
             // tabPage4
             // 
+            this.tabPage4.Controls.Add(this.txtstageny);
+            this.tabPage4.Controls.Add(this.txtstagenx);
+            this.tabPage4.Controls.Add(this.txtps);
+            this.tabPage4.Controls.Add(this.label77);
+            this.tabPage4.Controls.Add(this.btnimgv);
+            this.tabPage4.Controls.Add(this.txtstagevy);
+            this.tabPage4.Controls.Add(this.txtstagevx);
+            this.tabPage4.Controls.Add(this.txtimgy);
+            this.tabPage4.Controls.Add(this.txtimgx);
+            this.tabPage4.Controls.Add(this.label69);
+            this.tabPage4.Controls.Add(this.label73);
             this.tabPage4.Controls.Add(this.btn60);
             this.tabPage4.Controls.Add(this.btn45);
             this.tabPage4.Controls.Add(this.btn30);
@@ -3092,6 +3239,116 @@
             this.tabPage4.Text = "自动计算坐标";
             this.tabPage4.UseVisualStyleBackColor = true;
             // 
+            // txtstageny
+            // 
+            this.txtstageny.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtstageny.Location = new System.Drawing.Point(92, 534);
+            this.txtstageny.Name = "txtstageny";
+            this.txtstageny.Size = new System.Drawing.Size(100, 28);
+            this.txtstageny.TabIndex = 87;
+            this.txtstageny.Text = "69354";
+            this.txtstageny.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtstagenx
+            // 
+            this.txtstagenx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtstagenx.Location = new System.Drawing.Point(92, 480);
+            this.txtstagenx.Name = "txtstagenx";
+            this.txtstagenx.Size = new System.Drawing.Size(100, 28);
+            this.txtstagenx.TabIndex = 86;
+            this.txtstagenx.Text = "46994";
+            this.txtstagenx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtps
+            // 
+            this.txtps.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtps.Location = new System.Drawing.Point(363, 523);
+            this.txtps.Name = "txtps";
+            this.txtps.Size = new System.Drawing.Size(100, 28);
+            this.txtps.TabIndex = 85;
+            this.txtps.Text = "0.07366";
+            this.txtps.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label77
+            // 
+            this.label77.AutoSize = true;
+            this.label77.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label77.Location = new System.Drawing.Point(225, 520);
+            this.label77.Name = "label77";
+            this.label77.Size = new System.Drawing.Size(99, 27);
+            this.label77.TabIndex = 84;
+            this.label77.Text = "piexlsize";
+            // 
+            // btnimgv
+            // 
+            this.btnimgv.Location = new System.Drawing.Point(524, 513);
+            this.btnimgv.Name = "btnimgv";
+            this.btnimgv.Size = new System.Drawing.Size(127, 38);
+            this.btnimgv.TabIndex = 83;
+            this.btnimgv.Text = "计算";
+            this.btnimgv.UseVisualStyleBackColor = true;
+            this.btnimgv.Click += new System.EventHandler(this.btnimgv_Click);
+            // 
+            // txtstagevy
+            // 
+            this.txtstagevy.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtstagevy.Location = new System.Drawing.Point(424, 480);
+            this.txtstagevy.Name = "txtstagevy";
+            this.txtstagevy.Size = new System.Drawing.Size(183, 28);
+            this.txtstagevy.TabIndex = 82;
+            this.txtstagevy.Text = "130";
+            this.txtstagevy.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtstagevx
+            // 
+            this.txtstagevx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtstagevx.Location = new System.Drawing.Point(424, 426);
+            this.txtstagevx.Name = "txtstagevx";
+            this.txtstagevx.Size = new System.Drawing.Size(183, 28);
+            this.txtstagevx.TabIndex = 81;
+            this.txtstagevx.Text = "0";
+            this.txtstagevx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtimgy
+            // 
+            this.txtimgy.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtimgy.Location = new System.Drawing.Point(318, 479);
+            this.txtimgy.Name = "txtimgy";
+            this.txtimgy.Size = new System.Drawing.Size(100, 28);
+            this.txtimgy.TabIndex = 80;
+            this.txtimgy.Text = "91";
+            this.txtimgy.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtimgx
+            // 
+            this.txtimgx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtimgx.Location = new System.Drawing.Point(318, 425);
+            this.txtimgx.Name = "txtimgx";
+            this.txtimgx.Size = new System.Drawing.Size(100, 28);
+            this.txtimgx.TabIndex = 79;
+            this.txtimgx.Text = "261";
+            this.txtimgx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label69
+            // 
+            this.label69.AutoSize = true;
+            this.label69.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label69.Location = new System.Drawing.Point(224, 477);
+            this.label69.Name = "label69";
+            this.label69.Size = new System.Drawing.Size(85, 27);
+            this.label69.TabIndex = 78;
+            this.label69.Text = "图像Y值";
+            // 
+            // label73
+            // 
+            this.label73.AutoSize = true;
+            this.label73.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label73.Location = new System.Drawing.Point(224, 426);
+            this.label73.Name = "label73";
+            this.label73.Size = new System.Drawing.Size(86, 27);
+            this.label73.TabIndex = 77;
+            this.label73.Text = "图像X值";
+            // 
             // btn60
             // 
             this.btn60.Location = new System.Drawing.Point(476, 201);
@@ -3124,11 +3381,11 @@
             // 
             // btnrect
             // 
-            this.btnrect.Location = new System.Drawing.Point(51, 472);
+            this.btnrect.Location = new System.Drawing.Point(32, 435);
             this.btnrect.Name = "btnrect";
             this.btnrect.Size = new System.Drawing.Size(127, 38);
             this.btnrect.TabIndex = 73;
-            this.btnrect.Text = "计算显示";
+            this.btnrect.Text = "计算";
             this.btnrect.UseVisualStyleBackColor = true;
             this.btnrect.Click += new System.EventHandler(this.btnrect_Click);
             // 
@@ -3254,44 +3511,44 @@
             // 
             // chart1
             // 
-            chartArea2.AxisX.IntervalAutoMode = System.Windows.Forms.DataVisualization.Charting.IntervalAutoMode.VariableCount;
-            chartArea2.AxisX.MajorGrid.Enabled = false;
-            chartArea2.AxisX.Maximum = 130D;
-            chartArea2.AxisX.Minimum = 0D;
-            chartArea2.AxisY.MajorGrid.Enabled = false;
-            chartArea2.AxisY.Maximum = 130D;
-            chartArea2.AxisY.Minimum = 0D;
-            chartArea2.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
-            chartArea2.Name = "ChartArea1";
-            chartArea2.Position.Auto = false;
-            chartArea2.Position.Height = 94F;
-            chartArea2.Position.Width = 94F;
-            this.chart1.ChartAreas.Add(chartArea2);
-            legend2.Enabled = false;
-            legend2.Name = "Legend1";
-            this.chart1.Legends.Add(legend2);
+            chartArea1.AxisX.IntervalAutoMode = System.Windows.Forms.DataVisualization.Charting.IntervalAutoMode.VariableCount;
+            chartArea1.AxisX.MajorGrid.Enabled = false;
+            chartArea1.AxisX.Maximum = 130D;
+            chartArea1.AxisX.Minimum = 0D;
+            chartArea1.AxisY.MajorGrid.Enabled = false;
+            chartArea1.AxisY.Maximum = 130D;
+            chartArea1.AxisY.Minimum = 0D;
+            chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
+            chartArea1.Name = "ChartArea1";
+            chartArea1.Position.Auto = false;
+            chartArea1.Position.Height = 94F;
+            chartArea1.Position.Width = 94F;
+            this.chart1.ChartAreas.Add(chartArea1);
+            legend1.Enabled = false;
+            legend1.Name = "Legend1";
+            this.chart1.Legends.Add(legend1);
             this.chart1.Location = new System.Drawing.Point(667, 6);
             this.chart1.Name = "chart1";
-            series3.ChartArea = "ChartArea1";
-            series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
-            series3.IsValueShownAsLabel = true;
-            series3.Legend = "Legend1";
-            series3.MarkerBorderColor = System.Drawing.Color.Red;
-            series3.MarkerColor = System.Drawing.Color.White;
-            series3.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
-            series3.Name = "Series1";
-            series4.ChartArea = "ChartArea1";
-            series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
-            series4.Legend = "Legend1";
-            series4.MarkerBorderColor = System.Drawing.Color.Black;
-            series4.MarkerColor = System.Drawing.Color.Black;
-            series4.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Square;
-            series4.Name = "Series2";
-            dataPoint2.MarkerBorderWidth = 3;
-            dataPoint2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Star4;
-            series4.Points.Add(dataPoint2);
-            this.chart1.Series.Add(series3);
-            this.chart1.Series.Add(series4);
+            series1.ChartArea = "ChartArea1";
+            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+            series1.IsValueShownAsLabel = true;
+            series1.Legend = "Legend1";
+            series1.MarkerBorderColor = System.Drawing.Color.Red;
+            series1.MarkerColor = System.Drawing.Color.White;
+            series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
+            series1.Name = "Series1";
+            series2.ChartArea = "ChartArea1";
+            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+            series2.Legend = "Legend1";
+            series2.MarkerBorderColor = System.Drawing.Color.Black;
+            series2.MarkerColor = System.Drawing.Color.Black;
+            series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Square;
+            series2.Name = "Series2";
+            dataPoint1.MarkerBorderWidth = 3;
+            dataPoint1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Star4;
+            series2.Points.Add(dataPoint1);
+            this.chart1.Series.Add(series1);
+            this.chart1.Series.Add(series2);
             this.chart1.Size = new System.Drawing.Size(590, 557);
             this.chart1.TabIndex = 2;
             this.chart1.Text = "chart1";
@@ -3318,16 +3575,6 @@
             this.btnPsFile.UseVisualStyleBackColor = true;
             this.btnPsFile.Click += new System.EventHandler(this.btnPsFile_Click);
             // 
-            // button3
-            // 
-            this.button3.Location = new System.Drawing.Point(120, 149);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(132, 93);
-            this.button3.TabIndex = 76;
-            this.button3.Text = "button3";
-            this.button3.UseVisualStyleBackColor = true;
-            this.button3.Click += new System.EventHandler(this.button3_Click);
-            // 
             // FormUnitControl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -3524,9 +3771,9 @@
         private System.Windows.Forms.Label label35;
         private System.Windows.Forms.Label lblstate2;
         private System.Windows.Forms.Label label27;
-        private System.Windows.Forms.Label lbllocationy;
+        private System.Windows.Forms.Label lbllocationy1;
         private System.Windows.Forms.Label label31;
-        private System.Windows.Forms.Label lbllocationx;
+        private System.Windows.Forms.Label lbllocationx1;
         private System.Windows.Forms.Label label33;
         private System.Windows.Forms.Button btnPost8;
         private System.Windows.Forms.Button btnPost7;
@@ -3622,6 +3869,27 @@
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Label label67;
         private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Label lbllocationy2;
+        private System.Windows.Forms.Label label71;
+        private System.Windows.Forms.Label lbllocationx2;
+        private System.Windows.Forms.Label label75;
+        private System.Windows.Forms.TextBox txtaddr;
+        private System.Windows.Forms.TextBox txtaddr2;
+        private System.Windows.Forms.Button btntest;
+        private System.Windows.Forms.TextBox txtfirm;
+        private System.Windows.Forms.TextBox txtTypee;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button btnimgv;
+        private System.Windows.Forms.TextBox txtstagevy;
+        private System.Windows.Forms.TextBox txtstagevx;
+        private System.Windows.Forms.TextBox txtimgy;
+        private System.Windows.Forms.TextBox txtimgx;
+        private System.Windows.Forms.Label label69;
+        private System.Windows.Forms.Label label73;
+        private System.Windows.Forms.TextBox txtps;
+        private System.Windows.Forms.Label label77;
+        private System.Windows.Forms.TextBox txtstageny;
+        private System.Windows.Forms.TextBox txtstagenx;
     }
 }
 

+ 180 - 47
HOZProject/FormUnitControl.cs

@@ -31,6 +31,8 @@ namespace HOZProject
         //全局只有一个fatorySEM
         static FactoryHardware factorySEM = FactoryHardware.Instance;
         ISEMControl iSEM = factorySEM.ISEM;
+        //static FactoryHardware factorySEM = null;
+        //ISEMControl iSEM = null;
 
         public XmlManager xmg = new XmlManager();
 
@@ -38,7 +40,9 @@ namespace HOZProject
         private String path = Directory.GetCurrentDirectory();
         private int st_flag = 0;
 
-        WebResult wr = new WebResult("127.0.0.1", "18080","");
+        WebResult wr = new WebResult(ConfigurationManager.AppSettings["WebServerIP"].ToString(),
+                       ConfigurationManager.AppSettings["WebServerPort"].ToString(),
+                       ConfigurationManager.AppSettings["WebServerUrl"].ToString());
 
         String[] sT;
         String[] firms;
@@ -52,24 +56,24 @@ namespace HOZProject
 
             Control.CheckForIllegalCrossThreadCalls = false;
 
-            if(iSEM.ConnectStatus())
-            {
-                float ret = iSEM.GetFIBIMAGING();
-                if(ret==0)
-                {
-                    btnSEM.BackColor = Color.Lime;
-                }
-                else if(ret==1)
-                {
-                    btnFIB.BackColor = Color.Lime;
-                    panelFIB.Visible = true;
-                }
-                else if(ret==2)
-                {
-                    btnMILL.BackColor = Color.Lime;
-                }
-            }
-            //Calling Notification for updated status
+            //if(iSEM.ConnectStatus())
+            //{
+            //    float ret = iSEM.GetFIBIMAGING();
+            //    if(ret==0)
+            //    {
+            //        btnSEM.BackColor = Color.Lime;
+            //    }
+            //    else if(ret==1)
+            //    {
+            //        btnFIB.BackColor = Color.Lime;
+            //        panelFIB.Visible = true;
+            //    }
+            //    else if(ret==2)
+            //    {
+            //        btnMILL.BackColor = Color.Lime;
+            //    }
+            //}
+            ////Calling Notification for updated status
             //CZEMApi.Notify += new _EMApiEvents_NotifyEventHandler(CZEMApi_Notify);
             //CZEMApi.NotifyWithCurrentValue += new _EMApiEvents_NotifyWithCurrentValueEventHandler(CZEMApi_NotifyWithCurrentValue);
             //加载参数
@@ -287,6 +291,7 @@ namespace HOZProject
         #region 抓取图像
         private void btnGrabImage_Click(object sender, EventArgs e)
         {
+            
             SaveFileDialog sfd = new SaveFileDialog();
             sfd.Title = "图像保存位置:";
             sfd.FileName = "test.tif";
@@ -644,7 +649,7 @@ namespace HOZProject
             mf.FilePath = path;
 
             CutHole ch = new CutHole();
-            ch.OPT = Operation.Image;
+            //ch.OPT = Operation.Image;
             ch.START = System.DateTime.Now;
             ch.END = System.DateTime.Now.AddHours(2);
             ch.STATE = State.Success;
@@ -663,7 +668,7 @@ namespace HOZProject
             mf.ListCutHole.Add(ch);
 
             ch = new CutHole();
-            ch.OPT = Operation.Image;
+            //ch.OPT = Operation.Image;
             ch.START = System.DateTime.Now;
             ch.END = System.DateTime.Now.AddHours(2);
             ch.STATE = State.Success;
@@ -1293,10 +1298,10 @@ namespace HOZProject
 
         private void btnPost1_Click(object sender, EventArgs e)
         {
-            double degree = 0;
+            float degree = 0;
             int direction = 0;
             int state = 0;
-            wr.Img_OffsetAngle_Direction("D:/aaaa.jpg",1,"LG", out degree, out direction, out state);
+            wr.Img_OffsetAngle_Direction(txtaddr.Text,Convert.ToInt32(txtTypee.Text),txtfirm.Text, out degree, out direction, out state);
             lbldegree1.Text = degree.ToString("0.0");
             lbldirection1.Text = direction.ToString();
             lblstate1.Text = state.ToString();
@@ -1304,19 +1309,23 @@ namespace HOZProject
 
         private void btnPost2_Click(object sender, EventArgs e)
         {
-            double offsetx = 0;
-            double offsety = 0;
+            float offsetx1 = 0;
+            float offsety1 = 0;
+            float offsetx2 = 0;
+            float offsety2 = 0;
             int state = 0;
-            //wr.Img_Cut_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
-            lbllocationx.Text = offsetx.ToString("0.0");
-            lbllocationy.Text = offsety.ToString("0.0");
+            wr.Img_Cut_Position(txtaddr.Text, Convert.ToInt32(txtTypee.Text), txtfirm.Text, out offsetx1, out offsety1, out offsetx2, out offsety2, out state);
+            lbllocationx1.Text = offsetx1.ToString("0.0");
+            lbllocationy1.Text = offsety1.ToString("0.0");
+            lbllocationx2.Text = offsetx2.ToString("0.0");
+            lbllocationy2.Text = offsety2.ToString("0.0");
             lblstate2.Text = state.ToString();
         }
 
         private void btnPost3_Click(object sender, EventArgs e)
         {
             int state = 0;
-            wr.Img_Cut_Success("D:/aaaa.jpg", "D:/bbbb.jpg", out state);
+            wr.Img_Cut_Success(txtaddr.Text, txtaddr2.Text, out state);
             lblstate3.Text = state.ToString();
         }
 
@@ -1325,7 +1334,7 @@ namespace HOZProject
             float offsetx = 0;
             float offsety = 0;
             int state = 0;
-            wr.Img_Trapezoid_Top_Center_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
+            wr.Img_Trapezoid_Top_Center_Position(txtaddr.Text, out offsetx, out offsety, out state);
             lbltopcx.Text = offsetx.ToString("0.0");
             lbltopcy.Text = offsety.ToString("0.0");
             lblstate4.Text = state.ToString();
@@ -1351,14 +1360,12 @@ namespace HOZProject
 
         private void btnPost7_Click(object sender, EventArgs e)
         {
-            double offsetx = 0;
-            double offsety = 0;
-            double degree = 0;
+            float degree = 0;
             int direction = 0;
             int state = 0;
-            //wr.Img_Center_Position_OffsetAngle_Direction("D:/aaaa.jpg", out offsetx, out offsety, out degree, out direction, out state);
-            lblcenterx.Text = offsetx.ToString("0.0");
-            lblcentery.Text = offsety.ToString("0.0");
+            wr.Img_Center_Position_OffsetAngle_Direction(txtaddr.Text, out degree, out direction, out state);
+            //lblcenterx.Text = offsetx.ToString("0.0");
+            //lblcentery.Text = offsety.ToString("0.0");
             lbldegree2.Text = degree.ToString();
             lbldirection2.Text = direction.ToString();
             lblstate5.Text = state.ToString();
@@ -1367,7 +1374,7 @@ namespace HOZProject
         private void btnPost8_Click(object sender, EventArgs e)
         {
             int state = 0;
-            wr.Img_Measure_Size("D:/aaaa.jpg", 1000, (float)0.005, out state);
+            wr.Img_Measure_Size(txtaddr.Text, 1000, (float)0.005, out state);
             lblstate6.Text = state.ToString();
         }
 
@@ -1733,19 +1740,22 @@ namespace HOZProject
         {
             try
             {
-                double xr = x1 - x0;//倾斜图到中心的距离差x
-                double yr = y1 - y0;//倾斜图到中心的距离差y
-                double R = Math.Sqrt(xr * xr + yr * yr);//圆心到倾斜图的长度
+                float xr = x1 - x0;//倾斜图到中心的距离差x
+                float yr = y1 - y0;//倾斜图到中心的距离差y
+                float R =(float)Math.Sqrt(xr * xr + yr * yr);//圆心到倾斜图的长度
                 //double D = 2 * R * Math.Sin(ScanRotation / 2);//倾斜图与矫正图底边的长度
-                double k = Math.Atan(y1 / x1) / Math.PI * 180;//x1,y1的直角三角形圆心角度
-                double k_S = k - Slope;//通过夹角差求x2,y2
-                int y2 = (int)Math.Round(Math.Sin(Math.PI / (180 / k_S)) * R);
-                int x2 = (int)Math.Round(Math.Cos(Math.PI / (180 / k_S)) * R);
+                float k = (float)(Math.Atan(yr / xr) / Math.PI * 180);//x1,y1的直角三角形圆心角度
+                float k_S = k - Slope;//通过夹角差求x2,y2
+                //int y2 = (int)Math.Round(Math.Sin(Math.PI / (180 / k_S)) * R);
+                //int x2 = (int)Math.Round(Math.Cos(Math.PI / (180 / k_S)) * R);
+
+                float y2 = (float)(Math.Sin(Math.PI / (180 / k_S)) * R);
+                float x2 = (float)(Math.Cos(Math.PI / (180 / k_S)) * R);
 
                 if (Slope > 0 || Slope < 0)
                 {
-                    Hx = x1 - x2;
-                    Hy = y1 - y2;
+                    Hx = x0 + x2;
+                    Hy = y0 + y2;
                 }
                 else
                 {
@@ -1765,8 +1775,131 @@ namespace HOZProject
         private void button3_Click(object sender, EventArgs e)
         {
             float x1 = 0, y1 = 0;
-            Straightening(5, 65, 65, (float)59.016, (float)58.837, ref x1, ref y1);
+            Straightening(45, 48.156f, 49.968f, (float)31.679, (float)58.870, ref x1, ref y1);
             button3.Text = x1.ToString("0.00") + "\n" + y1.ToString("0.00");
         }
+
+        private void btntest_Click(object sender, EventArgs e)
+        {
+            //FileStream fs = new FileStream(txtaddr.Text, FileMode.Create, FileAccess.Write);
+            //StreamWriter sw = new StreamWriter(fs);
+            //sw.WriteLine("aaaa");
+            //sw.Close();
+            //sw.Dispose();
+            //fs.Close();
+            //fs.Dispose();
+            File.Copy(txtaddr2.Text, txtaddr.Text, true);
+        }
+
+        private void button4_Click(object sender, EventArgs e)
+        {
+
+            iSEM.SetWorkingDistance(0.006f);
+            Thread.Sleep(8000);
+            iSEM.GrabImage("D:\\HOZ1.0\\6.tif", 0, 0, 1024, 768, 0);
+            Thread.Sleep(3000);
+            iSEM.SetWorkingDistance(0.007f);
+            Thread.Sleep(8000);
+            iSEM.GrabImage("D:\\HOZ1.0\\7.tif", 0, 0, 1024, 768, 0);
+            Thread.Sleep(3000);
+            iSEM.SetWorkingDistance(0.0073f);
+            Thread.Sleep(8000);
+            iSEM.GrabImage("D:\\HOZ1.0\\73.tif", 0, 0, 1024, 768, 0);
+            Thread.Sleep(3000);
+        }
+
+        //移动到像素位置
+        bool MoveToPix(float sx,float sy,float xc, float yc,float ps,out float nx,out float ny)
+        {
+  
+            int width = 1024/2;
+            int height = 768/2;
+
+            float deltX = (xc - (float)width) * ps;
+            float deltY = (yc - (float)height) * ps;
+
+            float xpCur = sx;
+            float ypCur = sy;
+
+            float xpNew = xpCur - deltX;
+            float ypNew = ypCur - deltY;
+
+            nx = xpNew;
+            ny = ypNew;
+            //if (deltX > 10)//使用移动样品台实现
+            //{
+            //    if (!iSEM.SetStageGotoX(xpNew))
+            //    {
+            //        return false;
+            //    }
+
+            //    //判断是否移动完成
+            //    while (true)
+            //    {
+            //        Thread.Sleep(5000);
+            //        if (iSEM.GetStageIs() == 0)
+            //        {
+            //            break;
+            //        }
+            //    }
+            //    //arg.Message = "移动到新x" + xpNew.ToString() + "位置失败";
+            //    //arg.State = true;
+            //    //SendMsg("1-7");
+            //}
+            //else//使用移动光束实现
+            //{
+            //    float beamX = deltX * (float)0.66;
+            //    if (!iSEM.SetBeamShiftX(beamX))
+            //    {
+            //        return false;
+            //    }
+            //}
+
+            //if (deltY > 10)//使用移动样品台实现
+            //{
+            //    if (!iSEM.SetStageGotoY(ypNew))
+            //    {
+            //        return false;
+            //    }
+
+            //    //判断是否移动完成
+            //    while (true)
+            //    {
+            //        Thread.Sleep(5000);
+            //        if (iSEM.GetStageIs() == 0)
+            //        {
+            //            break;
+            //        }
+            //    }
+            //}
+            //else//使用移动光束实现
+            //{
+            //    float beamY = deltY * (float)0.671;
+            //    if (!iSEM.SetBeamShiftY(beamY))
+            //    {
+            //        return false;
+            //    }
+            //}
+
+            return true;
+        }
+
+        private void btnimgv_Click(object sender, EventArgs e)
+        {
+            float sx = 0, sy = 0;
+            float x1 = 0, y1 = 0;
+            float nx = 0, ny = 0;
+            float ps = 0;
+            sx = Convert.ToSingle(txtstagenx.Text);
+            sy = Convert.ToSingle(txtstageny.Text);
+            x1 = Convert.ToSingle(txtimgx.Text);
+            y1 = Convert.ToSingle(txtimgy.Text);
+            ps = Convert.ToSingle(txtps.Text);
+            MoveToPix(sx,sy,x1, y1, ps,out nx,out ny);
+
+            txtstagevx.Text = nx.ToString("0.000000");
+            txtstagevy.Text = ny.ToString("0.000000");
+
+        }
     }
 }

+ 32 - 4
HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

@@ -60,10 +60,11 @@ namespace HOZProject
                     //显示状态信息
                     ShowStateMessage(formHOZ, args);
                     //设置图像
-                    FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
-                    formHOZ.pbImage.Image = Image.FromStream(fileStream);
-                    fileStream.Close();
-                    fileStream.Dispose();
+                    //FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
+                    //formHOZ.pbImage.Image = Image.FromStream(fileStream);
+                    //fileStream.Close();
+                    //fileStream.Dispose();
+                    formHOZ.pbImage.Image = GetFile(args.Picture_Information.Picture_FullPath);
                     //流程内容
                     double Work_Voltage = args.Picture_Information.Work_Voltage / 1000;
                     double Magnification = args.Picture_Information.Magnification;
@@ -82,6 +83,33 @@ namespace HOZProject
             ChageCutHoleFlowNodeState(formHOZ, args);
         }
 
+        #region 将文件改换为内存流
+        public static MemoryStream ReadFile(string path)
+        {
+            if (!File.Exists(path))
+                return null;
+
+            using (FileStream file = new FileStream(path, FileMode.Open))
+            {
+                byte[] b = new byte[file.Length];
+                file.Read(b, 0, b.Length);
+
+                MemoryStream stream = new MemoryStream(b);
+                return stream;
+            }
+        }
+        /// 
+        /// 将内存流转为图片 
+        /// 
+        ///  
+        ///  
+        public static Image GetFile(string path)
+        {
+            MemoryStream stream = ReadFile(path);
+            return stream == null ? null : Image.FromStream(stream);
+        }
+        #endregion
+
         /// <summary>
         /// 显示状态信息
         /// </summary>

+ 6 - 6
HOZProject/MeasureXML/MeasureStructXml.xml

@@ -4,7 +4,7 @@
     <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="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
-    <Step Index="3"  Code="1-3" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
+    <Step Index="3"  Code="1-3" IsData="False" Type="FIB" 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>
@@ -13,10 +13,10 @@
     <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="Photo" IsShow="True" Title="保存六轴坐标" Details="将六轴坐标保存到数据库中"></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="切割验证结果"></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="分析验证结果"></Step>
     <Step Index="15" Code="1-15" IsData="False" Type="Pt" IsShow="True" Title="拔出PT针" Details="根据样品类型决定是否撤出PT针"></Step>
 
     <Step Index="16" Code="1-16" IsData="False" Type="FIB" IsShow="True" Title="切换到SEM模式" Details="从FIB模式切换到SEM模式"></Step>
@@ -28,7 +28,7 @@
     
     <Step Index="22" Code="1-22" IsData="False" Type="Photo" IsShow="True" Title="放大指定倍数" Details="控制SEM放大到指定参数大小范围"></Step>
     <Step Index="23" Code="1-23" IsData="True" Type="Photo" IsShow="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-    <Step Index="24" Code="1-24" IsData="False" Type="Photo" IsShow="True" Title="角度补偿" Details="设置SEM角度补偿"></Step>
+    <Step Index="24" Code="1-24" IsData="False" Type="FIB" 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>

+ 111 - 77
HOZProject/UserControls/UControl_Init.Designer.cs

@@ -71,6 +71,8 @@
             this.pbPTTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbCutHoleFile = new System.Windows.Forms.PictureBox();
             this.btnSaveDefalutPara = new System.Windows.Forms.Button();
+            this.cbbWFIB = new System.Windows.Forms.ComboBox();
+            this.label2 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
@@ -93,7 +95,7 @@
             this.label1.ForeColor = System.Drawing.Color.LightGray;
             this.label1.Location = new System.Drawing.Point(15, 9);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(77, 14);
+            this.label1.Size = new System.Drawing.Size(93, 17);
             this.label1.TabIndex = 0;
             this.label1.Text = "初始化设置";
             // 
@@ -105,7 +107,7 @@
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(576, 33);
+            this.panel1.Size = new System.Drawing.Size(608, 33);
             this.panel1.TabIndex = 3;
             // 
             // pbClose
@@ -115,7 +117,7 @@
             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(544, 0);
+            this.pbClose.Location = new System.Drawing.Point(576, 0);
             this.pbClose.Name = "pbClose";
             this.pbClose.Size = new System.Drawing.Size(32, 33);
             this.pbClose.TabIndex = 106;
@@ -127,19 +129,19 @@
             // tbCutHoleFilePath
             // 
             this.tbCutHoleFilePath.Font = new System.Drawing.Font("宋体", 10F);
-            this.tbCutHoleFilePath.Location = new System.Drawing.Point(104, 49);
+            this.tbCutHoleFilePath.Location = new System.Drawing.Point(129, 49);
             this.tbCutHoleFilePath.Name = "tbCutHoleFilePath";
             this.tbCutHoleFilePath.ReadOnly = true;
-            this.tbCutHoleFilePath.Size = new System.Drawing.Size(347, 23);
+            this.tbCutHoleFilePath.Size = new System.Drawing.Size(347, 27);
             this.tbCutHoleFilePath.TabIndex = 5;
             // 
             // txtWPTF
             // 
             this.txtWPTF.Font = new System.Drawing.Font("宋体", 10F);
-            this.txtWPTF.Location = new System.Drawing.Point(104, 100);
+            this.txtWPTF.Location = new System.Drawing.Point(129, 100);
             this.txtWPTF.Name = "txtWPTF";
             this.txtWPTF.ReadOnly = true;
-            this.txtWPTF.Size = new System.Drawing.Size(346, 23);
+            this.txtWPTF.Size = new System.Drawing.Size(346, 27);
             this.txtWPTF.TabIndex = 7;
             // 
             // lblCutHoleCount
@@ -147,21 +149,21 @@
             this.lblCutHoleCount.AutoSize = true;
             this.lblCutHoleCount.Font = new System.Drawing.Font("宋体", 10F);
             this.lblCutHoleCount.ForeColor = System.Drawing.Color.LightGray;
-            this.lblCutHoleCount.Location = new System.Drawing.Point(103, 79);
+            this.lblCutHoleCount.Location = new System.Drawing.Point(127, 79);
             this.lblCutHoleCount.Name = "lblCutHoleCount";
-            this.lblCutHoleCount.Size = new System.Drawing.Size(112, 14);
+            this.lblCutHoleCount.Size = new System.Drawing.Size(153, 17);
             this.lblCutHoleCount.TabIndex = 8;
-            this.lblCutHoleCount.Text = "成功导入0个切孔";
+            this.lblCutHoleCount.Text = "成功导入0个分析点";
             // 
             // chkManul
             // 
             this.chkManul.AutoSize = true;
             this.chkManul.Font = new System.Drawing.Font("宋体", 10F);
             this.chkManul.ForeColor = System.Drawing.Color.LightGray;
-            this.chkManul.Location = new System.Drawing.Point(322, 182);
+            this.chkManul.Location = new System.Drawing.Point(365, 182);
             this.chkManul.Margin = new System.Windows.Forms.Padding(2);
             this.chkManul.Name = "chkManul";
-            this.chkManul.Size = new System.Drawing.Size(82, 18);
+            this.chkManul.Size = new System.Drawing.Size(98, 21);
             this.chkManul.TabIndex = 15;
             this.chkManul.Text = "手动对焦";
             this.chkManul.UseVisualStyleBackColor = true;
@@ -172,12 +174,12 @@
             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(41, 53);
+            this.label6.Location = new System.Drawing.Point(13, 54);
             this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(63, 14);
+            this.label6.Size = new System.Drawing.Size(93, 17);
             this.label6.TabIndex = 17;
-            this.label6.Text = "导入切孔";
+            this.label6.Text = "导入分析点";
             // 
             // cbbWPZD
             // 
@@ -190,10 +192,10 @@
             "2000",
             "2500",
             "3000"});
-            this.cbbWPZD.Location = new System.Drawing.Point(106, 258);
+            this.cbbWPZD.Location = new System.Drawing.Point(129, 258);
             this.cbbWPZD.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWPZD.Name = "cbbWPZD";
-            this.cbbWPZD.Size = new System.Drawing.Size(132, 21);
+            this.cbbWPZD.Size = new System.Drawing.Size(132, 25);
             this.cbbWPZD.TabIndex = 99;
             // 
             // cbbWPZF
@@ -206,10 +208,10 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWPZF.Location = new System.Drawing.Point(408, 258);
+            this.cbbWPZF.Location = new System.Drawing.Point(439, 258);
             this.cbbWPZF.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWPZF.Name = "cbbWPZF";
-            this.cbbWPZF.Size = new System.Drawing.Size(132, 21);
+            this.cbbWPZF.Size = new System.Drawing.Size(132, 25);
             this.cbbWPZF.TabIndex = 98;
             // 
             // cbbWQGD
@@ -223,10 +225,10 @@
             "2000",
             "2500",
             "3000"});
-            this.cbbWQGD.Location = new System.Drawing.Point(106, 301);
+            this.cbbWQGD.Location = new System.Drawing.Point(129, 301);
             this.cbbWQGD.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWQGD.Name = "cbbWQGD";
-            this.cbbWQGD.Size = new System.Drawing.Size(132, 21);
+            this.cbbWQGD.Size = new System.Drawing.Size(132, 25);
             this.cbbWQGD.TabIndex = 97;
             // 
             // cbbWQGF
@@ -239,10 +241,10 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWQGF.Location = new System.Drawing.Point(408, 301);
+            this.cbbWQGF.Location = new System.Drawing.Point(439, 301);
             this.cbbWQGF.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWQGF.Name = "cbbWQGF";
-            this.cbbWQGF.Size = new System.Drawing.Size(132, 21);
+            this.cbbWQGF.Size = new System.Drawing.Size(132, 25);
             this.cbbWQGF.TabIndex = 96;
             // 
             // cbbWLZ
@@ -255,10 +257,10 @@
             "1000",
             "2000",
             "10000"});
-            this.cbbWLZ.Location = new System.Drawing.Point(408, 344);
+            this.cbbWLZ.Location = new System.Drawing.Point(439, 344);
             this.cbbWLZ.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWLZ.Name = "cbbWLZ";
-            this.cbbWLZ.Size = new System.Drawing.Size(132, 21);
+            this.cbbWLZ.Size = new System.Drawing.Size(132, 25);
             this.cbbWLZ.TabIndex = 95;
             // 
             // cbbWXZ
@@ -270,10 +272,10 @@
             this.cbbWXZ.Items.AddRange(new object[] {
             "截面观测",
             "表面观测"});
-            this.cbbWXZ.Location = new System.Drawing.Point(106, 344);
+            this.cbbWXZ.Location = new System.Drawing.Point(129, 344);
             this.cbbWXZ.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWXZ.Name = "cbbWXZ";
-            this.cbbWXZ.Size = new System.Drawing.Size(132, 21);
+            this.cbbWXZ.Size = new System.Drawing.Size(132, 25);
             this.cbbWXZ.TabIndex = 94;
             // 
             // cbbWCS
@@ -281,10 +283,10 @@
             this.cbbWCS.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWCS.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWCS.FormattingEnabled = true;
-            this.cbbWCS.Location = new System.Drawing.Point(407, 215);
+            this.cbbWCS.Location = new System.Drawing.Point(438, 215);
             this.cbbWCS.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWCS.Name = "cbbWCS";
-            this.cbbWCS.Size = new System.Drawing.Size(132, 21);
+            this.cbbWCS.Size = new System.Drawing.Size(132, 25);
             this.cbbWCS.TabIndex = 93;
             // 
             // cbbWYP
@@ -292,10 +294,10 @@
             this.cbbWYP.Font = new System.Drawing.Font("宋体", 10F);
             this.cbbWYP.ForeColor = System.Drawing.SystemColors.WindowText;
             this.cbbWYP.FormattingEnabled = true;
-            this.cbbWYP.Location = new System.Drawing.Point(106, 215);
+            this.cbbWYP.Location = new System.Drawing.Point(129, 215);
             this.cbbWYP.Margin = new System.Windows.Forms.Padding(2);
             this.cbbWYP.Name = "cbbWYP";
-            this.cbbWYP.Size = new System.Drawing.Size(132, 21);
+            this.cbbWYP.Size = new System.Drawing.Size(132, 25);
             this.cbbWYP.TabIndex = 92;
             // 
             // label58
@@ -303,10 +305,10 @@
             this.label58.AutoSize = true;
             this.label58.Font = new System.Drawing.Font("宋体", 10F);
             this.label58.ForeColor = System.Drawing.Color.LightGray;
-            this.label58.Location = new System.Drawing.Point(39, 347);
+            this.label58.Location = new System.Drawing.Point(13, 347);
             this.label58.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label58.Name = "label58";
-            this.label58.Size = new System.Drawing.Size(63, 14);
+            this.label58.Size = new System.Drawing.Size(76, 17);
             this.label58.TabIndex = 91;
             this.label58.Text = "校正角度";
             // 
@@ -315,22 +317,22 @@
             this.label50.AutoSize = true;
             this.label50.Font = new System.Drawing.Font("宋体", 10F);
             this.label50.ForeColor = System.Drawing.Color.LightGray;
-            this.label50.Location = new System.Drawing.Point(42, 261);
+            this.label50.Location = new System.Drawing.Point(13, 261);
             this.label50.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label50.Name = "label50";
-            this.label50.Size = new System.Drawing.Size(63, 14);
+            this.label50.Size = new System.Drawing.Size(94, 17);
             this.label50.TabIndex = 90;
-            this.label50.Text = "拍照电压";
+            this.label50.Text = "拍照电压/V";
             // 
             // label54
             // 
             this.label54.AutoSize = true;
             this.label54.Font = new System.Drawing.Font("宋体", 10F);
             this.label54.ForeColor = System.Drawing.Color.LightGray;
-            this.label54.Location = new System.Drawing.Point(313, 261);
+            this.label54.Location = new System.Drawing.Point(299, 262);
             this.label54.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label54.Name = "label54";
-            this.label54.Size = new System.Drawing.Size(91, 14);
+            this.label54.Size = new System.Drawing.Size(110, 17);
             this.label54.TabIndex = 89;
             this.label54.Text = "拍照放大倍数";
             // 
@@ -339,34 +341,34 @@
             this.label46.AutoSize = true;
             this.label46.Font = new System.Drawing.Font("宋体", 10F);
             this.label46.ForeColor = System.Drawing.Color.LightGray;
-            this.label46.Location = new System.Drawing.Point(11, 304);
+            this.label46.Location = new System.Drawing.Point(13, 304);
             this.label46.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label46.Name = "label46";
-            this.label46.Size = new System.Drawing.Size(91, 14);
+            this.label46.Size = new System.Drawing.Size(94, 17);
             this.label46.TabIndex = 88;
-            this.label46.Text = "定位切割电压";
+            this.label46.Text = "定位电压/V";
             // 
             // label42
             // 
             this.label42.AutoSize = true;
             this.label42.Font = new System.Drawing.Font("宋体", 10F);
             this.label42.ForeColor = System.Drawing.Color.LightGray;
-            this.label42.Location = new System.Drawing.Point(285, 304);
+            this.label42.Location = new System.Drawing.Point(299, 305);
             this.label42.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label42.Name = "label42";
-            this.label42.Size = new System.Drawing.Size(119, 14);
+            this.label42.Size = new System.Drawing.Size(110, 17);
             this.label42.TabIndex = 87;
-            this.label42.Text = "定位切割放大倍数";
+            this.label42.Text = "定位放大倍数";
             // 
             // label38
             // 
             this.label38.AutoSize = true;
             this.label38.Font = new System.Drawing.Font("宋体", 10F);
             this.label38.ForeColor = System.Drawing.Color.LightGray;
-            this.label38.Location = new System.Drawing.Point(285, 347);
+            this.label38.Location = new System.Drawing.Point(299, 348);
             this.label38.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label38.Name = "label38";
-            this.label38.Size = new System.Drawing.Size(119, 14);
+            this.label38.Size = new System.Drawing.Size(144, 17);
             this.label38.TabIndex = 86;
             this.label38.Text = "拉直操作放大倍数";
             // 
@@ -375,12 +377,12 @@
             this.chkWIsP.AutoSize = true;
             this.chkWIsP.Font = new System.Drawing.Font("宋体", 10F);
             this.chkWIsP.ForeColor = System.Drawing.Color.LightGray;
-            this.chkWIsP.Location = new System.Drawing.Point(104, 182);
+            this.chkWIsP.Location = new System.Drawing.Point(129, 182);
             this.chkWIsP.Margin = new System.Windows.Forms.Padding(2);
             this.chkWIsP.Name = "chkWIsP";
-            this.chkWIsP.Size = new System.Drawing.Size(96, 18);
+            this.chkWIsP.Size = new System.Drawing.Size(81, 21);
             this.chkWIsP.TabIndex = 85;
-            this.chkWIsP.Text = "是否仅拍照";
+            this.chkWIsP.Text = "仅拍照";
             this.chkWIsP.UseVisualStyleBackColor = true;
             this.chkWIsP.CheckedChanged += new System.EventHandler(this.chkWIsP_CheckedChanged);
             // 
@@ -389,10 +391,10 @@
             this.label48.AutoSize = true;
             this.label48.Font = new System.Drawing.Font("宋体", 10F);
             this.label48.ForeColor = System.Drawing.Color.LightGray;
-            this.label48.Location = new System.Drawing.Point(41, 218);
+            this.label48.Location = new System.Drawing.Point(13, 218);
             this.label48.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label48.Name = "label48";
-            this.label48.Size = new System.Drawing.Size(63, 14);
+            this.label48.Size = new System.Drawing.Size(76, 17);
             this.label48.TabIndex = 81;
             this.label48.Text = "样品类型";
             // 
@@ -401,10 +403,10 @@
             this.label56.AutoSize = true;
             this.label56.Font = new System.Drawing.Font("宋体", 10F);
             this.label56.ForeColor = System.Drawing.Color.LightGray;
-            this.label56.Location = new System.Drawing.Point(368, 218);
+            this.label56.Location = new System.Drawing.Point(299, 219);
             this.label56.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label56.Name = "label56";
-            this.label56.Size = new System.Drawing.Size(35, 14);
+            this.label56.Size = new System.Drawing.Size(42, 17);
             this.label56.TabIndex = 80;
             this.label56.Text = "厂商";
             // 
@@ -413,10 +415,10 @@
             this.label59.AutoSize = true;
             this.label59.Font = new System.Drawing.Font("宋体", 10F);
             this.label59.ForeColor = System.Drawing.Color.LightGray;
-            this.label59.Location = new System.Drawing.Point(20, 146);
+            this.label59.Location = new System.Drawing.Point(13, 147);
             this.label59.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label59.Name = "label59";
-            this.label59.Size = new System.Drawing.Size(84, 14);
+            this.label59.Size = new System.Drawing.Size(103, 17);
             this.label59.TabIndex = 79;
             this.label59.Text = "FIB文件名称";
             // 
@@ -425,10 +427,10 @@
             this.label61.AutoSize = true;
             this.label61.Font = new System.Drawing.Font("宋体", 10F);
             this.label61.ForeColor = System.Drawing.Color.LightGray;
-            this.label61.Location = new System.Drawing.Point(27, 104);
+            this.label61.Location = new System.Drawing.Point(13, 105);
             this.label61.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label61.Name = "label61";
-            this.label61.Size = new System.Drawing.Size(77, 14);
+            this.label61.Size = new System.Drawing.Size(94, 17);
             this.label61.TabIndex = 78;
             this.label61.Text = "PT文件名称";
             // 
@@ -437,12 +439,12 @@
             this.chkWPT.AutoSize = true;
             this.chkWPT.Font = new System.Drawing.Font("宋体", 10F);
             this.chkWPT.ForeColor = System.Drawing.Color.LightGray;
-            this.chkWPT.Location = new System.Drawing.Point(213, 182);
+            this.chkWPT.Location = new System.Drawing.Point(246, 182);
             this.chkWPT.Margin = new System.Windows.Forms.Padding(2);
             this.chkWPT.Name = "chkWPT";
-            this.chkWPT.Size = new System.Drawing.Size(96, 18);
+            this.chkWPT.Size = new System.Drawing.Size(82, 21);
             this.chkWPT.TabIndex = 77;
-            this.chkWPT.Text = "是否使用PT";
+            this.chkWPT.Text = "使用PT";
             this.chkWPT.UseVisualStyleBackColor = true;
             this.chkWPT.CheckedChanged += new System.EventHandler(this.chkWPT_CheckedChanged);
             // 
@@ -450,7 +452,7 @@
             // 
             this.btnCreateConfig.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnCreateConfig.ForeColor = System.Drawing.Color.Black;
-            this.btnCreateConfig.Location = new System.Drawing.Point(14, 384);
+            this.btnCreateConfig.Location = new System.Drawing.Point(14, 421);
             this.btnCreateConfig.Margin = new System.Windows.Forms.Padding(2);
             this.btnCreateConfig.Name = "btnCreateConfig";
             this.btnCreateConfig.Size = new System.Drawing.Size(135, 41);
@@ -462,10 +464,10 @@
             // txtWFIBF
             // 
             this.txtWFIBF.Font = new System.Drawing.Font("宋体", 10F);
-            this.txtWFIBF.Location = new System.Drawing.Point(104, 142);
+            this.txtWFIBF.Location = new System.Drawing.Point(129, 142);
             this.txtWFIBF.Name = "txtWFIBF";
             this.txtWFIBF.ReadOnly = true;
-            this.txtWFIBF.Size = new System.Drawing.Size(346, 23);
+            this.txtWFIBF.Size = new System.Drawing.Size(346, 27);
             this.txtWFIBF.TabIndex = 103;
             // 
             // pbDelWLZ
@@ -474,7 +476,7 @@
             this.pbDelWLZ.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWLZ.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWLZ.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWLZ.Location = new System.Drawing.Point(541, 344);
+            this.pbDelWLZ.Location = new System.Drawing.Point(573, 344);
             this.pbDelWLZ.Name = "pbDelWLZ";
             this.pbDelWLZ.Size = new System.Drawing.Size(25, 21);
             this.pbDelWLZ.TabIndex = 111;
@@ -487,7 +489,7 @@
             this.pbDelWQGD.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWQGD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWQGD.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWQGD.Location = new System.Drawing.Point(239, 301);
+            this.pbDelWQGD.Location = new System.Drawing.Point(268, 301);
             this.pbDelWQGD.Name = "pbDelWQGD";
             this.pbDelWQGD.Size = new System.Drawing.Size(25, 21);
             this.pbDelWQGD.TabIndex = 110;
@@ -500,7 +502,7 @@
             this.pbWQGFDel.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbWQGFDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbWQGFDel.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbWQGFDel.Location = new System.Drawing.Point(541, 301);
+            this.pbWQGFDel.Location = new System.Drawing.Point(573, 301);
             this.pbWQGFDel.Name = "pbWQGFDel";
             this.pbWQGFDel.Size = new System.Drawing.Size(25, 21);
             this.pbWQGFDel.TabIndex = 109;
@@ -513,7 +515,7 @@
             this.pbDelWPZD.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWPZD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWPZD.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWPZD.Location = new System.Drawing.Point(239, 258);
+            this.pbDelWPZD.Location = new System.Drawing.Point(268, 258);
             this.pbDelWPZD.Name = "pbDelWPZD";
             this.pbDelWPZD.Size = new System.Drawing.Size(25, 21);
             this.pbDelWPZD.TabIndex = 108;
@@ -526,7 +528,7 @@
             this.pbDelWPZF.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWPZF.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWPZF.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWPZF.Location = new System.Drawing.Point(541, 258);
+            this.pbDelWPZF.Location = new System.Drawing.Point(573, 258);
             this.pbDelWPZF.Name = "pbDelWPZF";
             this.pbDelWPZF.Size = new System.Drawing.Size(25, 21);
             this.pbDelWPZF.TabIndex = 107;
@@ -539,7 +541,7 @@
             this.pbDelWYP.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWYP.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWYP.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWYP.Location = new System.Drawing.Point(240, 215);
+            this.pbDelWYP.Location = new System.Drawing.Point(269, 215);
             this.pbDelWYP.Name = "pbDelWYP";
             this.pbDelWYP.Size = new System.Drawing.Size(25, 21);
             this.pbDelWYP.TabIndex = 106;
@@ -552,7 +554,7 @@
             this.pbDelWCS.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
             this.pbDelWCS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWCS.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWCS.Location = new System.Drawing.Point(542, 215);
+            this.pbDelWCS.Location = new System.Drawing.Point(574, 215);
             this.pbDelWCS.Name = "pbDelWCS";
             this.pbDelWCS.Size = new System.Drawing.Size(25, 21);
             this.pbDelWCS.TabIndex = 105;
@@ -565,7 +567,7 @@
             this.pbCutHoleAuto.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbCutHoleAuto.BackgroundImage")));
             this.pbCutHoleAuto.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.pbCutHoleAuto.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbCutHoleAuto.Location = new System.Drawing.Point(512, 49);
+            this.pbCutHoleAuto.Location = new System.Drawing.Point(537, 49);
             this.pbCutHoleAuto.Name = "pbCutHoleAuto";
             this.pbCutHoleAuto.Size = new System.Drawing.Size(53, 25);
             this.pbCutHoleAuto.TabIndex = 104;
@@ -578,7 +580,7 @@
             this.pbFIBTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportTemplateFile;
             this.pbFIBTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.pbFIBTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbFIBTemplateFile.Location = new System.Drawing.Point(456, 142);
+            this.pbFIBTemplateFile.Location = new System.Drawing.Point(481, 142);
             this.pbFIBTemplateFile.Name = "pbFIBTemplateFile";
             this.pbFIBTemplateFile.Size = new System.Drawing.Size(109, 25);
             this.pbFIBTemplateFile.TabIndex = 102;
@@ -591,7 +593,7 @@
             this.pbPTTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportTemplateFile;
             this.pbPTTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.pbPTTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbPTTemplateFile.Location = new System.Drawing.Point(456, 100);
+            this.pbPTTemplateFile.Location = new System.Drawing.Point(481, 100);
             this.pbPTTemplateFile.Name = "pbPTTemplateFile";
             this.pbPTTemplateFile.Size = new System.Drawing.Size(109, 25);
             this.pbPTTemplateFile.TabIndex = 6;
@@ -604,7 +606,7 @@
             this.pbCutHoleFile.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbCutHoleFile.BackgroundImage")));
             this.pbCutHoleFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.pbCutHoleFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbCutHoleFile.Location = new System.Drawing.Point(457, 49);
+            this.pbCutHoleFile.Location = new System.Drawing.Point(482, 49);
             this.pbCutHoleFile.Name = "pbCutHoleFile";
             this.pbCutHoleFile.Size = new System.Drawing.Size(53, 25);
             this.pbCutHoleFile.TabIndex = 4;
@@ -615,7 +617,7 @@
             // 
             this.btnSaveDefalutPara.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnSaveDefalutPara.ForeColor = System.Drawing.Color.Black;
-            this.btnSaveDefalutPara.Location = new System.Drawing.Point(432, 384);
+            this.btnSaveDefalutPara.Location = new System.Drawing.Point(455, 421);
             this.btnSaveDefalutPara.Margin = new System.Windows.Forms.Padding(2);
             this.btnSaveDefalutPara.Name = "btnSaveDefalutPara";
             this.btnSaveDefalutPara.Size = new System.Drawing.Size(135, 41);
@@ -624,12 +626,42 @@
             this.btnSaveDefalutPara.UseVisualStyleBackColor = true;
             this.btnSaveDefalutPara.Click += new System.EventHandler(this.btnSaveDefalutPara_Click);
             // 
+            // cbbWFIB
+            // 
+            this.cbbWFIB.Font = new System.Drawing.Font("宋体", 10F);
+            this.cbbWFIB.ForeColor = System.Drawing.SystemColors.WindowText;
+            this.cbbWFIB.FormattingEnabled = true;
+            this.cbbWFIB.Items.AddRange(new object[] {
+            "600",
+            "1000",
+            "2000",
+            "10000"});
+            this.cbbWFIB.Location = new System.Drawing.Point(130, 390);
+            this.cbbWFIB.Margin = new System.Windows.Forms.Padding(2);
+            this.cbbWFIB.Name = "cbbWFIB";
+            this.cbbWFIB.Size = new System.Drawing.Size(132, 25);
+            this.cbbWFIB.TabIndex = 114;
+            // 
+            // 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(13, 393);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(103, 17);
+            this.label2.TabIndex = 113;
+            this.label2.Text = "FIB放大倍数";
+            // 
             // UControl_Init
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.cbbWFIB);
+            this.Controls.Add(this.label2);
             this.Controls.Add(this.btnSaveDefalutPara);
             this.Controls.Add(this.label50);
             this.Controls.Add(this.pbDelWLZ);
@@ -673,7 +705,7 @@
             this.Font = new System.Drawing.Font("宋体", 10F);
             this.ForeColor = System.Drawing.SystemColors.WindowText;
             this.Name = "UControl_Init";
-            this.Size = new System.Drawing.Size(576, 436);
+            this.Size = new System.Drawing.Size(608, 472);
             this.Load += new System.EventHandler(this.UControl_Init_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
@@ -737,5 +769,7 @@
         private System.Windows.Forms.PictureBox pbWQGFDel;
         private System.Windows.Forms.PictureBox pbDelWLZ;
         private System.Windows.Forms.Button btnSaveDefalutPara;
+        private System.Windows.Forms.ComboBox cbbWFIB;
+        private System.Windows.Forms.Label label2;
     }
 }

+ 78 - 0
HOZProject/UserControls/UControl_Init.cs

@@ -24,6 +24,7 @@ namespace HOZProject
         String[] WQGD;
         String[] WQGF;
         String[] WLZ;
+        String[] WFIB;
         Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
         private FormHOZMain formHOZMain;
         public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
@@ -302,6 +303,7 @@ namespace HOZProject
             cfm.Location_Voltage = Convert.ToSingle(cbbWQGD.Text);
             cfm.Photograph_Magnification = Convert.ToSingle(cbbWPZF.Text);
             cfm.Photograph_Voltage = Convert.ToSingle(cbbWPZD.Text);
+            cfm.FIB_Magnification = Convert.ToSingle(cbbWFIB.Text);
             if (cbbWXZ.SelectedIndex == 0)
             {
                 cfm.Correction_Angle = 36;
@@ -330,6 +332,7 @@ namespace HOZProject
             cfm.Location_Voltage = Convert.ToSingle(cbbWQGD.Text);
             cfm.Photograph_Magnification = Convert.ToSingle(cbbWPZF.Text);
             cfm.Photograph_Voltage = Convert.ToSingle(cbbWPZD.Text);
+            cfm.FIB_Magnification = Convert.ToSingle(cbbWFIB.Text);
             if (cbbWXZ.SelectedIndex == 0)
             {
                 cfm.Correction_Angle = 36;
@@ -429,6 +432,14 @@ namespace HOZProject
                     string wWLZ = string.Join(",", _WLZ.ToArray());
                     config.AppSettings.Settings["WLZ"].Value = wWLZ;
                 }
+                //FIB放大位数
+                List<String> _WFIB = WFIB.ToList();
+                if (_WFIB.IndexOf(cbbWFIB.Text) < 0)
+                {
+                    _WFIB.Add(cbbWFIB.Text);
+                    string wWFIB = string.Join(",", _WFIB.ToArray());
+                    config.AppSettings.Settings["WFIB"].Value = wWFIB;
+                }
 
                 MeasureParam cfm = new MeasureParam();
                 cfm.Is_Photograph = chkWIsP.Checked;
@@ -443,6 +454,7 @@ namespace HOZProject
                 cfm.Location_Voltage = Convert.ToSingle(cbbWQGD.Text);
                 cfm.Photograph_Magnification = Convert.ToSingle(cbbWPZF.Text);
                 cfm.Photograph_Voltage = Convert.ToSingle(cbbWPZD.Text);
+                cfm.FIB_Magnification = Convert.ToSingle(cbbWFIB.Text);
                 if (cbbWXZ.SelectedIndex == 0)
                 {
                     cfm.Correction_Angle = 36;
@@ -575,6 +587,7 @@ namespace HOZProject
             cbbWQGD.Items.Clear();
             cbbWQGF.Items.Clear();
             cbbWLZ.Items.Clear();
+            cbbWFIB.Items.Clear();
 
             m_TemplateFilePath = config.AppSettings.Settings["TemplateFilePath"].Value.ToString();
             string sample_Type = config.AppSettings.Settings["Sample_Type"].Value.ToString();
@@ -584,6 +597,7 @@ namespace HOZProject
             string WQGDTemp = config.AppSettings.Settings["WQGD"].Value.ToString();
             string WQGFTemp = config.AppSettings.Settings["WQGF"].Value.ToString();
             string WLZTemp = config.AppSettings.Settings["WLZ"].Value.ToString();
+            string WFIBTemp = config.AppSettings.Settings["WFIB"].Value.ToString();
             //样品类型
             sT = sample_Type.Split(',');
             BindComboxData(cbbWYP, sT);
@@ -605,6 +619,9 @@ namespace HOZProject
             //拉直操作放大位数
             WLZ = WLZTemp.Split(',');
             BindComboxData(cbbWLZ, WLZ);
+            //FIB放大倍数
+            WFIB = WFIBTemp.Split(',');
+            BindComboxData(cbbWFIB, WFIB);
             
             //设置配置文件默认值
             chkWIsP.Checked=Convert.ToBoolean(config.AppSettings.Settings["Is_Photograph"].Value);
@@ -618,6 +635,7 @@ namespace HOZProject
             cbbWQGD.Text = config.AppSettings.Settings["Location_Voltage"].Value;
             cbbWPZF.Text = config.AppSettings.Settings["Photograph_Magnification"].Value;
             cbbWPZD.Text = config.AppSettings.Settings["Photograph_Voltage"].Value;
+            cbbWFIB.Text = config.AppSettings.Settings["FIB_Magnification"].Value;
             string Correction_Angle = config.AppSettings.Settings["Correction_Angle"].Value;
             if (Correction_Angle == "36")
             {
@@ -652,6 +670,7 @@ namespace HOZProject
                 cbbWQGD.Text = cfm.m_Config.Location_Voltage.ToString();
                 cbbWPZF.Text = cfm.m_Config.Photograph_Magnification.ToString();
                 cbbWPZD.Text = cfm.m_Config.Photograph_Voltage.ToString();
+                cbbWFIB.Text = cfm.m_Config.FIB_Magnification.ToString();
                 string Correction_Angle = cfm.m_Config.Correction_Angle.ToString();
                 if (Correction_Angle == "36")
                 {
@@ -724,11 +743,27 @@ namespace HOZProject
             {
                 chkWPT.Checked = false;
                 chkWPT.Visible = false;
+                label61.Visible = false;
+                label59.Visible = false;
+                txtWFIBF.Visible = false;
+                txtWPTF.Visible = false;
+                pbPTTemplateFile.Visible = false;
+                pbFIBTemplateFile.Visible = false;
+                label58.Visible = false;
+                cbbWXZ.Visible = false;
                 FormHOZMainObject.m_MeasureType = (int)MeasureMsgManage.measureType.Photo;
             }
             else
             {
                 chkWPT.Visible = true;
+                label61.Visible = true;
+                label59.Visible = true;
+                txtWFIBF.Visible = true;
+                txtWPTF.Visible = true;
+                pbPTTemplateFile.Visible = true;
+                pbFIBTemplateFile.Visible = true;
+                label58.Visible = true;
+                cbbWXZ.Visible = true;
                 if (!chkWPT.Checked)
                 {
                     FormHOZMainObject.m_MeasureType = (int)MeasureMsgManage.measureType.FIB;
@@ -738,6 +773,49 @@ namespace HOZProject
         }
         #endregion
 
+        public MeasureParam GetMeasureParam()
+        {
+            MeasureParam cfm = new MeasureParam();
+
+            //设置配置文件默认值
+            bool bResult = false;
+
+            bool.TryParse(config.AppSettings.Settings["Is_Photograph"].Value, out bResult);
+            cfm.Is_Photograph = bResult;
+
+            bool.TryParse(config.AppSettings.Settings["PT_Depostion"].Value, out bResult);
+            cfm.PT = bResult;
+
+            cfm.PTTemp = config.AppSettings.Settings["PT_ELYFile"].Value;
+            cfm.FIBTemp = config.AppSettings.Settings["FIB_ELYFile"].Value;
+
+            float fResult = (float)0.0;
+            float.TryParse(config.AppSettings.Settings["Stretch_Magnification"].Value, out fResult);
+            cfm.Stretch_Magnification = fResult;
+
+            float.TryParse(config.AppSettings.Settings["Location_Magnification"].Value, out fResult);
+            cfm.Location_Magnification = fResult;
+
+            float.TryParse(config.AppSettings.Settings["Location_Voltage"].Value, out fResult);
+            cfm.Location_Voltage = fResult;
+
+            float.TryParse(config.AppSettings.Settings["Photograph_Magnification"].Value, out fResult);
+            cfm.Photograph_Magnification = fResult;
+
+            float.TryParse(config.AppSettings.Settings["Photograph_Voltage"].Value, out fResult);
+            cfm.Photograph_Voltage = fResult;
+
+            float.TryParse(config.AppSettings.Settings["Correction_Angle"].Value, out fResult);
+            cfm.Correction_Angle = fResult;
+
+            cfm.SampleName = config.AppSettings.Settings["SampleName"].Value;
+
+            cfm.Firm = config.AppSettings.Settings["Firms"].Value;
+
+            return cfm;
+        }
+
+
         #region 创建切孔列表
         private void CreateCutHoleList()
         {

+ 56 - 48
HOZProject/UserControls/UControl_Log.Designer.cs

@@ -36,13 +36,13 @@
             this.panel1 = new System.Windows.Forms.Panel();
             this.pbClose = new System.Windows.Forms.PictureBox();
             this.dgvLog = new System.Windows.Forms.DataGridView();
+            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.panel2 = new System.Windows.Forms.Panel();
-            this.label2 = new System.Windows.Forms.Label();
-            this.lblLogCount = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvLog)).BeginInit();
@@ -54,9 +54,10 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
             this.label1.ForeColor = System.Drawing.Color.LightGray;
-            this.label1.Location = new System.Drawing.Point(13, 8);
+            this.label1.Location = new System.Drawing.Point(17, 10);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(63, 14);
+            this.label1.Size = new System.Drawing.Size(76, 17);
             this.label1.TabIndex = 0;
             this.label1.Text = "查看日志";
             // 
@@ -67,8 +68,9 @@
             this.panel1.Controls.Add(this.label1);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(718, 30);
+            this.panel1.Size = new System.Drawing.Size(957, 38);
             this.panel1.TabIndex = 3;
             // 
             // pbClose
@@ -78,9 +80,10 @@
             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.Location = new System.Drawing.Point(914, 0);
+            this.pbClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(32, 30);
+            this.pbClose.Size = new System.Drawing.Size(43, 38);
             this.pbClose.TabIndex = 107;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
@@ -117,7 +120,8 @@
             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.Location = new System.Drawing.Point(0, 38);
+            this.dgvLog.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.dgvLog.MultiSelect = false;
             this.dgvLog.Name = "dgvLog";
             this.dgvLog.ReadOnly = true;
@@ -140,15 +144,52 @@
             this.dgvLog.ShowCellToolTips = false;
             this.dgvLog.ShowEditingIcon = false;
             this.dgvLog.ShowRowErrors = false;
-            this.dgvLog.Size = new System.Drawing.Size(718, 368);
+            this.dgvLog.Size = new System.Drawing.Size(957, 460);
             this.dgvLog.TabIndex = 4;
             this.dgvLog.TabStop = false;
             this.dgvLog.SelectionChanged += new System.EventHandler(this.dgvLog_SelectionChanged);
             // 
+            // panel2
+            // 
+            this.panel2.BackColor = System.Drawing.Color.White;
+            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel2.Controls.Add(this.label2);
+            this.panel2.Controls.Add(this.lblLogCount);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.panel2.Location = new System.Drawing.Point(0, 470);
+            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(957, 28);
+            this.panel2.TabIndex = 5;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("宋体", 10F);
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(11, 5);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(59, 17);
+            this.label2.TabIndex = 1;
+            this.label2.Text = "共计:";
+            // 
+            // lblLogCount
+            // 
+            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(76, 5);
+            this.lblLogCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblLogCount.Name = "lblLogCount";
+            this.lblLogCount.Size = new System.Drawing.Size(34, 17);
+            this.lblLogCount.TabIndex = 0;
+            this.lblLogCount.Text = "0条";
+            // 
             // ColCutHoleName
             // 
             this.ColCutHoleName.DataPropertyName = "HoleName";
-            this.ColCutHoleName.HeaderText = "切孔名称";
+            this.ColCutHoleName.HeaderText = "分析点名称";
             this.ColCutHoleName.Name = "ColCutHoleName";
             this.ColCutHoleName.ReadOnly = true;
             this.ColCutHoleName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -183,51 +224,18 @@
             this.ColState.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.ColState.Width = 180;
             // 
-            // panel2
-            // 
-            this.panel2.BackColor = System.Drawing.Color.White;
-            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.panel2.Controls.Add(this.label2);
-            this.panel2.Controls.Add(this.lblLogCount);
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel2.Location = new System.Drawing.Point(0, 375);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(718, 23);
-            this.panel2.TabIndex = 5;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("宋体", 10F);
-            this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(8, 4);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(49, 14);
-            this.label2.TabIndex = 1;
-            this.label2.Text = "共计:";
-            // 
-            // lblLogCount
-            // 
-            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(57, 4);
-            this.lblLogCount.Name = "lblLogCount";
-            this.lblLogCount.Size = new System.Drawing.Size(28, 14);
-            this.lblLogCount.TabIndex = 0;
-            this.lblLogCount.Text = "0条";
-            // 
             // UControl_Log
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.dgvLog);
             this.Controls.Add(this.panel1);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "UControl_Log";
-            this.Size = new System.Drawing.Size(718, 398);
+            this.Size = new System.Drawing.Size(957, 498);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
@@ -245,10 +253,10 @@
         private System.Windows.Forms.Label lblLogCount;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.PictureBox pbClose;
+        public System.Windows.Forms.DataGridView dgvLog;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColCutHoleName;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColTime;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColStep;
         private System.Windows.Forms.DataGridViewTextBoxColumn ColState;
-        public System.Windows.Forms.DataGridView dgvLog;
     }
 }

+ 188 - 64
HOZProject/UserControls/UControl_ParaInfo.Designer.cs

@@ -63,6 +63,12 @@
             this.pbMeasure = new System.Windows.Forms.ProgressBar();
             this.panel4 = new System.Windows.Forms.Panel();
             this.label8 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
+            this.label12 = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.label14 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.plMeasureFlow.SuspendLayout();
@@ -75,9 +81,10 @@
             this.lblLocation.AutoSize = true;
             this.lblLocation.Font = new System.Drawing.Font("宋体", 10F);
             this.lblLocation.ForeColor = System.Drawing.Color.LightGray;
-            this.lblLocation.Location = new System.Drawing.Point(8, 44);
+            this.lblLocation.Location = new System.Drawing.Point(11, 55);
+            this.lblLocation.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblLocation.Name = "lblLocation";
-            this.lblLocation.Size = new System.Drawing.Size(63, 14);
+            this.lblLocation.Size = new System.Drawing.Size(76, 17);
             this.lblLocation.TabIndex = 0;
             this.lblLocation.Text = "检测位置";
             // 
@@ -86,9 +93,10 @@
             this.lblStartTime.AutoSize = true;
             this.lblStartTime.Font = new System.Drawing.Font("宋体", 10F);
             this.lblStartTime.ForeColor = System.Drawing.Color.LightGray;
-            this.lblStartTime.Location = new System.Drawing.Point(8, 89);
+            this.lblStartTime.Location = new System.Drawing.Point(11, 111);
+            this.lblStartTime.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblStartTime.Name = "lblStartTime";
-            this.lblStartTime.Size = new System.Drawing.Size(63, 14);
+            this.lblStartTime.Size = new System.Drawing.Size(76, 17);
             this.lblStartTime.TabIndex = 0;
             this.lblStartTime.Text = "开始时间";
             // 
@@ -97,9 +105,10 @@
             this.lblEndTime.AutoSize = true;
             this.lblEndTime.Font = new System.Drawing.Font("宋体", 10F);
             this.lblEndTime.ForeColor = System.Drawing.Color.LightGray;
-            this.lblEndTime.Location = new System.Drawing.Point(8, 120);
+            this.lblEndTime.Location = new System.Drawing.Point(11, 150);
+            this.lblEndTime.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblEndTime.Name = "lblEndTime";
-            this.lblEndTime.Size = new System.Drawing.Size(63, 14);
+            this.lblEndTime.Size = new System.Drawing.Size(76, 17);
             this.lblEndTime.TabIndex = 0;
             this.lblEndTime.Text = "结束时间";
             // 
@@ -108,9 +117,10 @@
             this.lblState.AutoSize = true;
             this.lblState.Font = new System.Drawing.Font("宋体", 10F);
             this.lblState.ForeColor = System.Drawing.Color.LightGray;
-            this.lblState.Location = new System.Drawing.Point(8, 151);
+            this.lblState.Location = new System.Drawing.Point(11, 189);
+            this.lblState.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblState.Name = "lblState";
-            this.lblState.Size = new System.Drawing.Size(63, 14);
+            this.lblState.Size = new System.Drawing.Size(76, 17);
             this.lblState.TabIndex = 0;
             this.lblState.Text = "检测结果";
             // 
@@ -119,9 +129,10 @@
             this.CkIsSwitch.AutoSize = true;
             this.CkIsSwitch.Checked = true;
             this.CkIsSwitch.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.CkIsSwitch.Location = new System.Drawing.Point(9, 9);
+            this.CkIsSwitch.Location = new System.Drawing.Point(12, 11);
+            this.CkIsSwitch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CkIsSwitch.Name = "CkIsSwitch";
-            this.CkIsSwitch.Size = new System.Drawing.Size(15, 14);
+            this.CkIsSwitch.Size = new System.Drawing.Size(18, 17);
             this.CkIsSwitch.TabIndex = 1;
             this.CkIsSwitch.UseVisualStyleBackColor = true;
             this.CkIsSwitch.CheckedChanged += new System.EventHandler(this.CkIsSwitch_CheckedChanged);
@@ -131,9 +142,10 @@
             this.lblCutHoleName.AutoSize = true;
             this.lblCutHoleName.Font = new System.Drawing.Font("宋体", 10F);
             this.lblCutHoleName.ForeColor = System.Drawing.Color.White;
-            this.lblCutHoleName.Location = new System.Drawing.Point(26, 9);
+            this.lblCutHoleName.Location = new System.Drawing.Point(35, 11);
+            this.lblCutHoleName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblCutHoleName.Name = "lblCutHoleName";
-            this.lblCutHoleName.Size = new System.Drawing.Size(63, 14);
+            this.lblCutHoleName.Size = new System.Drawing.Size(76, 17);
             this.lblCutHoleName.TabIndex = 0;
             this.lblCutHoleName.Text = "切孔名称";
             // 
@@ -146,8 +158,9 @@
             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.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(345, 30);
+            this.panel1.Size = new System.Drawing.Size(460, 37);
             this.panel1.TabIndex = 2;
             // 
             // pbClose
@@ -156,9 +169,10 @@
             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(311, 0);
+            this.pbClose.Location = new System.Drawing.Point(415, 0);
+            this.pbClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(32, 28);
+            this.pbClose.Size = new System.Drawing.Size(43, 35);
             this.pbClose.TabIndex = 108;
             this.pbClose.TabStop = false;
             this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
@@ -170,9 +184,10 @@
             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(103, 43);
+            this.lblX.Location = new System.Drawing.Point(137, 54);
+            this.lblX.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblX.Name = "lblX";
-            this.lblX.Size = new System.Drawing.Size(0, 14);
+            this.lblX.Size = new System.Drawing.Size(0, 17);
             this.lblX.TabIndex = 3;
             // 
             // lblShowStartTime
@@ -180,9 +195,10 @@
             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.Location = new System.Drawing.Point(101, 111);
+            this.lblShowStartTime.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblShowStartTime.Name = "lblShowStartTime";
-            this.lblShowStartTime.Size = new System.Drawing.Size(119, 14);
+            this.lblShowStartTime.Size = new System.Drawing.Size(152, 17);
             this.lblShowStartTime.TabIndex = 3;
             this.lblShowStartTime.Text = "2020-09-02 12:00";
             // 
@@ -191,9 +207,10 @@
             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.Location = new System.Drawing.Point(101, 150);
+            this.lblShowEndTime.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblShowEndTime.Name = "lblShowEndTime";
-            this.lblShowEndTime.Size = new System.Drawing.Size(119, 14);
+            this.lblShowEndTime.Size = new System.Drawing.Size(152, 17);
             this.lblShowEndTime.TabIndex = 3;
             this.lblShowEndTime.Text = "2020-09-02 12:35";
             // 
@@ -202,9 +219,10 @@
             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.Location = new System.Drawing.Point(101, 189);
+            this.lblShowState.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblShowState.Name = "lblShowState";
-            this.lblShowState.Size = new System.Drawing.Size(35, 14);
+            this.lblShowState.Size = new System.Drawing.Size(42, 17);
             this.lblShowState.TabIndex = 3;
             this.lblShowState.Text = "完成";
             // 
@@ -213,9 +231,10 @@
             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(181, 43);
+            this.lblY.Location = new System.Drawing.Point(248, 54);
+            this.lblY.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblY.Name = "lblY";
-            this.lblY.Size = new System.Drawing.Size(0, 14);
+            this.lblY.Size = new System.Drawing.Size(0, 17);
             this.lblY.TabIndex = 4;
             // 
             // lblZ
@@ -223,9 +242,10 @@
             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(262, 43);
+            this.lblZ.Location = new System.Drawing.Point(364, 54);
+            this.lblZ.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblZ.Name = "lblZ";
-            this.lblZ.Size = new System.Drawing.Size(0, 14);
+            this.lblZ.Size = new System.Drawing.Size(0, 17);
             this.lblZ.TabIndex = 5;
             // 
             // lblM
@@ -233,9 +253,10 @@
             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(262, 66);
+            this.lblM.Location = new System.Drawing.Point(364, 82);
+            this.lblM.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblM.Name = "lblM";
-            this.lblM.Size = new System.Drawing.Size(0, 14);
+            this.lblM.Size = new System.Drawing.Size(0, 17);
             this.lblM.TabIndex = 8;
             // 
             // lblT
@@ -243,9 +264,10 @@
             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(181, 66);
+            this.lblT.Location = new System.Drawing.Point(248, 82);
+            this.lblT.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblT.Name = "lblT";
-            this.lblT.Size = new System.Drawing.Size(0, 14);
+            this.lblT.Size = new System.Drawing.Size(0, 17);
             this.lblT.TabIndex = 7;
             // 
             // lblR
@@ -253,9 +275,10 @@
             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(103, 66);
+            this.lblR.Location = new System.Drawing.Point(137, 82);
+            this.lblR.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblR.Name = "lblR";
-            this.lblR.Size = new System.Drawing.Size(0, 14);
+            this.lblR.Size = new System.Drawing.Size(0, 17);
             this.lblR.TabIndex = 6;
             // 
             // label2
@@ -263,9 +286,10 @@
             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(239, 66);
+            this.label2.Location = new System.Drawing.Point(334, 82);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(21, 14);
+            this.label2.Size = new System.Drawing.Size(26, 17);
             this.label2.TabIndex = 14;
             this.label2.Text = "M:";
             // 
@@ -274,9 +298,10 @@
             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(158, 66);
+            this.label3.Location = new System.Drawing.Point(218, 82);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(21, 14);
+            this.label3.Size = new System.Drawing.Size(26, 17);
             this.label3.TabIndex = 13;
             this.label3.Text = "T:";
             // 
@@ -285,9 +310,10 @@
             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, 66);
+            this.label4.Location = new System.Drawing.Point(107, 82);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(21, 14);
+            this.label4.Size = new System.Drawing.Size(26, 17);
             this.label4.TabIndex = 12;
             this.label4.Text = "R:";
             // 
@@ -296,9 +322,10 @@
             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(239, 43);
+            this.label5.Location = new System.Drawing.Point(334, 54);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(21, 14);
+            this.label5.Size = new System.Drawing.Size(26, 17);
             this.label5.TabIndex = 11;
             this.label5.Text = "Z:";
             // 
@@ -307,9 +334,10 @@
             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(158, 43);
+            this.label6.Location = new System.Drawing.Point(218, 54);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(21, 14);
+            this.label6.Size = new System.Drawing.Size(26, 17);
             this.label6.TabIndex = 10;
             this.label6.Text = "Y:";
             // 
@@ -318,9 +346,10 @@
             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.Location = new System.Drawing.Point(107, 54);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(21, 14);
+            this.label7.Size = new System.Drawing.Size(26, 17);
             this.label7.TabIndex = 9;
             this.label7.Text = "X:";
             // 
@@ -331,17 +360,19 @@
             this.plMeasureFlow.Controls.Add(this.panel3);
             this.plMeasureFlow.Controls.Add(this.panel4);
             this.plMeasureFlow.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.plMeasureFlow.Location = new System.Drawing.Point(0, 180);
+            this.plMeasureFlow.Location = new System.Drawing.Point(0, 226);
+            this.plMeasureFlow.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plMeasureFlow.Name = "plMeasureFlow";
-            this.plMeasureFlow.Size = new System.Drawing.Size(345, 370);
+            this.plMeasureFlow.Size = new System.Drawing.Size(460, 462);
             this.plMeasureFlow.TabIndex = 15;
             // 
             // plTimeLine
             // 
             this.plTimeLine.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.plTimeLine.Location = new System.Drawing.Point(0, 30);
+            this.plTimeLine.Location = new System.Drawing.Point(0, 37);
+            this.plTimeLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.plTimeLine.Name = "plTimeLine";
-            this.plTimeLine.Size = new System.Drawing.Size(345, 294);
+            this.plTimeLine.Size = new System.Drawing.Size(460, 368);
             this.plTimeLine.TabIndex = 8;
             // 
             // lvMeasureFlow
@@ -353,14 +384,16 @@
             this.lvMeasureFlow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lvMeasureFlow.ForeColor = System.Drawing.Color.LightGray;
             this.lvMeasureFlow.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+            this.lvMeasureFlow.HideSelection = false;
             this.lvMeasureFlow.HotTracking = true;
             this.lvMeasureFlow.HoverSelection = true;
             this.lvMeasureFlow.LabelWrap = false;
-            this.lvMeasureFlow.Location = new System.Drawing.Point(1, 276);
+            this.lvMeasureFlow.Location = new System.Drawing.Point(1, 345);
+            this.lvMeasureFlow.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.lvMeasureFlow.MultiSelect = false;
             this.lvMeasureFlow.Name = "lvMeasureFlow";
             this.lvMeasureFlow.ShowGroups = false;
-            this.lvMeasureFlow.Size = new System.Drawing.Size(345, 68);
+            this.lvMeasureFlow.Size = new System.Drawing.Size(459, 84);
             this.lvMeasureFlow.SmallImageList = this.imageList1;
             this.lvMeasureFlow.TabIndex = 7;
             this.lvMeasureFlow.TabStop = false;
@@ -386,18 +419,20 @@
             this.panel3.Controls.Add(this.label1);
             this.panel3.Controls.Add(this.pbMeasure);
             this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel3.Location = new System.Drawing.Point(0, 324);
+            this.panel3.Location = new System.Drawing.Point(0, 405);
+            this.panel3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(345, 46);
+            this.panel3.Size = new System.Drawing.Size(460, 57);
             this.panel3.TabIndex = 5;
             // 
             // lblCompletedAmount
             // 
             this.lblCompletedAmount.AutoSize = true;
             this.lblCompletedAmount.ForeColor = System.Drawing.Color.White;
-            this.lblCompletedAmount.Location = new System.Drawing.Point(308, 18);
+            this.lblCompletedAmount.Location = new System.Drawing.Point(411, 22);
+            this.lblCompletedAmount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblCompletedAmount.Name = "lblCompletedAmount";
-            this.lblCompletedAmount.Size = new System.Drawing.Size(17, 12);
+            this.lblCompletedAmount.Size = new System.Drawing.Size(23, 15);
             this.lblCompletedAmount.TabIndex = 2;
             this.lblCompletedAmount.Text = "0%";
             // 
@@ -406,17 +441,19 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
             this.label1.ForeColor = System.Drawing.Color.LightGray;
-            this.label1.Location = new System.Drawing.Point(5, 16);
+            this.label1.Location = new System.Drawing.Point(7, 20);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(77, 14);
+            this.label1.Size = new System.Drawing.Size(93, 17);
             this.label1.TabIndex = 1;
             this.label1.Text = "检测总进度";
             // 
             // pbMeasure
             // 
-            this.pbMeasure.Location = new System.Drawing.Point(88, 16);
+            this.pbMeasure.Location = new System.Drawing.Point(117, 20);
+            this.pbMeasure.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pbMeasure.Name = "pbMeasure";
-            this.pbMeasure.Size = new System.Drawing.Size(212, 14);
+            this.pbMeasure.Size = new System.Drawing.Size(283, 18);
             this.pbMeasure.Step = 1;
             this.pbMeasure.TabIndex = 0;
             // 
@@ -427,8 +464,9 @@
             this.panel4.Controls.Add(this.label8);
             this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel4.Location = new System.Drawing.Point(0, 0);
+            this.panel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(345, 30);
+            this.panel4.Size = new System.Drawing.Size(460, 37);
             this.panel4.TabIndex = 6;
             // 
             // label8
@@ -436,18 +474,97 @@
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("宋体", 10F);
             this.label8.ForeColor = System.Drawing.Color.White;
-            this.label8.Location = new System.Drawing.Point(5, 7);
+            this.label8.Location = new System.Drawing.Point(7, 9);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(63, 14);
+            this.label8.Size = new System.Drawing.Size(76, 17);
             this.label8.TabIndex = 3;
             this.label8.Text = "检测流程";
             // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("宋体", 10F);
+            this.label9.ForeColor = System.Drawing.Color.LightGray;
+            this.label9.Location = new System.Drawing.Point(191, 54);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(26, 17);
+            this.label9.TabIndex = 16;
+            this.label9.Text = "mm";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("宋体", 10F);
+            this.label10.ForeColor = System.Drawing.Color.LightGray;
+            this.label10.Location = new System.Drawing.Point(304, 54);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(26, 17);
+            this.label10.TabIndex = 17;
+            this.label10.Text = "mm";
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Font = new System.Drawing.Font("宋体", 10F);
+            this.label11.ForeColor = System.Drawing.Color.LightGray;
+            this.label11.Location = new System.Drawing.Point(413, 55);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(26, 17);
+            this.label11.TabIndex = 18;
+            this.label11.Text = "mm";
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Font = new System.Drawing.Font("宋体", 10F);
+            this.label12.ForeColor = System.Drawing.Color.LightGray;
+            this.label12.Location = new System.Drawing.Point(413, 83);
+            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(26, 17);
+            this.label12.TabIndex = 21;
+            this.label12.Text = "mm";
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("宋体", 10F);
+            this.label13.ForeColor = System.Drawing.Color.LightGray;
+            this.label13.Location = new System.Drawing.Point(304, 82);
+            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(25, 17);
+            this.label13.TabIndex = 20;
+            this.label13.Text = "°";
+            // 
+            // label14
+            // 
+            this.label14.AutoSize = true;
+            this.label14.Font = new System.Drawing.Font("宋体", 10F);
+            this.label14.ForeColor = System.Drawing.Color.LightGray;
+            this.label14.Location = new System.Drawing.Point(191, 82);
+            this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(25, 17);
+            this.label14.TabIndex = 19;
+            this.label14.Text = "°";
+            // 
             // UControl_ParaInfo
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.label12);
+            this.Controls.Add(this.label11);
+            this.Controls.Add(this.label13);
+            this.Controls.Add(this.label14);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.plMeasureFlow);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label3);
@@ -469,8 +586,9 @@
             this.Controls.Add(this.lblEndTime);
             this.Controls.Add(this.lblStartTime);
             this.Controls.Add(this.lblLocation);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "UControl_ParaInfo";
-            this.Size = new System.Drawing.Size(345, 550);
+            this.Size = new System.Drawing.Size(460, 688);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
@@ -518,5 +636,11 @@
         public System.Windows.Forms.Label lblShowState;
         private System.Windows.Forms.Label lblCompletedAmount;
         public System.Windows.Forms.CheckBox CkIsSwitch;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.Label label14;
     }
 }

+ 34 - 5
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -58,8 +58,22 @@ namespace HOZProject
         #region 显示开始与结束时间
         public void ShowTime()
         {
-            lblShowStartTime.Text = startTime;
-            lblShowEndTime.Text = endTime;
+            if (StartTime == "0001/1/1 0:00:00")
+            {
+                lblShowStartTime.Text = "";
+            }
+            else
+            {
+                lblShowStartTime.Text = StartTime;
+            }
+            if (EndTime == "0001/1/1 0:00:00")
+            {
+                lblShowEndTime.Text = "";
+            }
+            else
+            {
+                lblShowEndTime.Text = EndTime;
+            }
         }
         #endregion
 
@@ -151,9 +165,24 @@ namespace HOZProject
             lblZ.Text = (Position.Z * multiple).ToString("f3");
             lblR.Text = Position.R.ToString();
             lblT.Text = Position.T.ToString();
-            lblM.Text = Position.M.ToString();
-            lblShowStartTime.Text = StartTime;
-            lblShowEndTime.Text = EndTime;
+            lblM.Text = (Position.M * multiple).ToString();
+            if(StartTime== "0001/1/1 0:00:00")
+            {
+                lblShowStartTime.Text = "";
+            }
+            else
+            {
+                lblShowStartTime.Text = StartTime;
+            }
+            if (EndTime == "0001/1/1 0:00:00")
+            {
+                lblShowEndTime.Text = "";
+            }
+            else
+            {
+                lblShowEndTime.Text = EndTime;
+            }
+            
             //设置切孔状态
             switch (State)
             {

+ 1 - 1
HOZProject/UserControls/UControl_ParaInfo.resx

@@ -125,7 +125,7 @@
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAS
-        GAAAAk1TRnQBSQFMAgEBBQEAAWgBAAFoAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+        GAAAAk1TRnQBSQFMAgEBBQEAAXABAAFwAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
         AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
         AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
         AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

+ 0 - 14
MeasureData/CutHole.cs

@@ -64,14 +64,6 @@ namespace MeasureData
         #endregion
 
         #region 工作状态
-        //操作步骤
-        private Operation m_opt;
-
-        public Operation OPT
-        {
-            get { return this.m_opt; }
-            set { this.m_opt = value; }
-        }
 
         //开始时间
         private DateTime m_start;
@@ -120,7 +112,6 @@ namespace MeasureData
         private void Init()
         {
             //设定初始值
-            m_opt = Operation.Init;
             m_state = State.Ready;
             m_switch = false;
             Position = new SemPosition();
@@ -143,10 +134,6 @@ namespace MeasureData
 
             slo_cuthole.Register("Position", this.Position);
            
-            //操作步骤
-            xInt OPT = new xInt();
-            OPT.AssignValue(this.OPT.GetHashCode());
-            slo_cuthole.Register("OPT", OPT);
             //开始时间
             xTime_t START = new xTime_t();
             START.AssignValue(this.START);
@@ -172,7 +159,6 @@ namespace MeasureData
             {
                 slo_cuthole.Serialize(false, xml, rootNode);
 
-                this.OPT = (Operation)OPT.value();
                 this.START = START.value();
                 this.END = END.value();
                 this.STATE = (State)STATE.value();

+ 19 - 0
MeasureData/MeasureFile.cs

@@ -60,6 +60,14 @@ namespace MeasureData
             get { return this.m_measureParam; }
             set { this.m_measureParam = value; }
         }
+
+        //是否需要保存文件
+        private bool m_IsModified;
+        public bool IsModified
+        {
+            get { return this.m_IsModified; }
+            set { this.m_IsModified = value; }
+        }
         #endregion
         /// <summary>
         /// 创建XML文件
@@ -166,6 +174,7 @@ namespace MeasureData
 
             // 设置路径为初始默认路径
             this.FileName = UNTITLED_FILE_NAME;
+            this.IsModified = false;
             // Ok, return TRUE
             return true;
         }
@@ -180,12 +189,20 @@ namespace MeasureData
 
             Serialize(false, doc, root);
 
+            this.IsModified = false;
+
             doc.Save(this.FileName);
         }
 
         //保存
         public bool Save()
         {
+            //没有修改不需要重新保存文件
+            if (this.IsModified == false)
+            {
+                return true;
+            }
+
             //如果是新文件
             this.FileName.Trim();
             if (string.Compare(this.FileName,UNTITLED_FILE_NAME) == 0)
@@ -361,6 +378,8 @@ namespace MeasureData
 
                 }
 
+                this.IsModified = true;
+
                 return true;
             }
             catch (Exception ex)

+ 422 - 0
MeasureData/MeasureFile1.cs

@@ -0,0 +1,422 @@
+//时间:20200610
+//作者:郝爽
+//功能:测量文件
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using FileManager;
+using System.Xml;
+using System.IO;
+using System.Drawing;
+
+namespace MeasureData
+{
+    
+    public class MeasureFile:ISlo
+    {
+        public const string UNTITLED_FILE_NAME = "Untitled";
+
+        #region 内容
+        //文件名
+        private string m_fileName;
+        public string FileName
+        {
+            get { return this.m_fileName; }
+            set { this.m_fileName = value; }
+        }
+
+        //文件路径
+        private string m_filepath;
+        public string FilePath
+        {
+            get { return this.m_filepath; }
+            set { this.m_filepath = value; }
+        }
+
+        //切孔文件路径
+        private string m_CutHoleFilePath;
+        public string CutHoleFilePath
+        {
+            get { return this.m_CutHoleFilePath; }
+            set { this.m_CutHoleFilePath = value; }
+        }
+
+        //切孔链表
+        private List<CutHole> m_listCutHole;
+        public List<CutHole> ListCutHole
+        {
+            get { return this.m_listCutHole; }
+            set { this.m_listCutHole = value; }
+        }
+
+        //测量参数
+        private MeasureParam m_measureParam;
+        public MeasureParam MParam
+        {
+            get { return this.m_measureParam; }
+            set { this.m_measureParam = value; }
+        }
+        #endregion
+        /// <summary>
+        /// 创建XML文件
+        /// </summary>
+        /// <returns>0:失败;1:成功;2:文件已存在</returns>
+        public int CreateXml()
+        {
+            if (!File.Exists(this.FileName))
+            {
+                if( XmlManager.CreateXmlFile(this.FileName))
+                {
+                    //创建一个新的
+                    return 1;
+                }
+                else
+                {
+                    //创建失败
+                    return 0;
+                }
+            }
+            else
+            {
+                //重新创建
+                XmlManager.CreateXmlFile(this.FileName);
+                return 2;
+            }
+        }
+
+        //XML文件保存
+        //样品孔存储xml文档
+        public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
+        {
+            Slo sFile = new Slo();
+            Slo sParam = new Slo();
+            Collection<CutHole> sCutHoles = new Collection<CutHole>();
+
+            foreach (CutHole hole in ListCutHole)
+            {
+                sCutHoles.addItem(hole);
+            }            
+            
+            xString FileName = new xString();
+            xString FilePath = new xString();
+            FileName.AssignValue(this.FileName);
+            FilePath.AssignValue(this.FilePath);
+            sFile.Register("FileName", FileName);
+            sFile.Register("FilePath", FilePath);
+            sFile.Register("Param", this.MParam);
+            sFile.Register("ListCutHole", sCutHoles);            
+
+            if (isStoring)
+            {
+                sFile.Serialize(true, xml, rootNode);                
+            }
+            else
+            {
+                sFile.Serialize(false, xml, rootNode);
+
+                this.FileName = FileName.value();
+                this.FilePath = FilePath.value();
+                List<CutHole> tempCutHoleList = new List<CutHole>();
+                for (int i = 0; i < sCutHoles.size(); i++)
+                {
+                    tempCutHoleList.Add(sCutHoles.getItem(i));
+                }
+                if (tempCutHoleList.Count == sCutHoles.size())
+                {
+                    ListCutHole.Clear();
+                    ListCutHole = tempCutHoleList;
+                }
+            }
+        }
+       
+        //构造函数
+        public MeasureFile()
+        {
+            Init();
+        }
+
+        public void Init()
+        {
+            this.ListCutHole = new List<CutHole>();
+            this.FileName = @"";
+            this.FilePath = @"";
+            this.MParam = new MeasureParam();
+        }
+        #region 操作
+
+        //新建
+        public bool New()
+        {
+            int ret = CreateXml();
+            if (ret > 0)
+            {
+                XmlDocument doc = new XmlDocument();
+                doc.Load(this.FileName);//载入xml文件
+
+                XmlNode root = doc.SelectSingleNode("XMLData");
+
+                Serialize(true, doc, root);
+
+                doc.Save(this.FileName);
+            }
+
+            // 设置路径为初始默认路径
+            this.FileName = UNTITLED_FILE_NAME;
+            // Ok, return TRUE
+            return true;
+        }
+
+        //打开
+        public void Open()
+        {
+            XmlDocument doc = new XmlDocument();
+            doc.Load(this.FileName);//载入xml文件
+
+            XmlNode root = doc.SelectSingleNode("XMLData");
+
+            Serialize(false, doc, root);
+
+            doc.Save(this.FileName);
+        }
+
+        //保存
+        public bool Save()
+        {
+            //如果是新文件
+            this.FileName.Trim();
+            if (string.Compare(this.FileName,UNTITLED_FILE_NAME) == 0)
+            {
+                return SaveAs();
+            }
+
+            XmlDocument doc = new XmlDocument();
+            if (CreateXml() == 0)//创建该文件?
+            {
+                return false;
+            }
+            if (File.Exists(FileName))
+            {
+                doc.Load(this.FileName);//载入xml文件   
+            }
+            else
+            {
+                return SaveAs(); //当前路径不存在               
+            }
+                      
+            XmlNode root = doc.SelectSingleNode("XMLData");
+            Serialize(true, doc, root);
+            doc.Save(this.FileName);
+            return true;
+        }
+
+        //另存为
+        public bool SaveAs()
+        {
+            //打开保存文件的对话框
+            this.FileName.Trim();
+            if (!string.IsNullOrEmpty(this.FileName))
+            {
+                this.FilePath = System.IO.Path.GetDirectoryName(this.FileName);
+            }
+
+            SaveFileDialog sfd = new SaveFileDialog();
+            sfd.Title = "保存测量文件";
+            sfd.Filter = "测量文件(*.msf)|*.msf";
+            
+            if (Directory.Exists(this.FilePath))
+            {
+                sfd.InitialDirectory = this.FilePath;
+            }
+
+            if (sfd.ShowDialog() == DialogResult.OK)
+            {
+
+                this.FileName = sfd.FileName.ToString(); //获得文件路径
+                FilePath = System.IO.Path.GetDirectoryName(this.FileName);
+
+                //创建一个新的文件
+                XmlDocument doc = new XmlDocument();
+                if (CreateXml() == 0)//创建该文件?
+                {
+                    return false;
+                }
+                doc.Load(this.FileName);
+                XmlNode root = doc.SelectSingleNode("XMLData");
+                Serialize(true, doc, root);
+                doc.Save(this.FileName);
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+        //从文件生成切割孔信息
+        public bool GetCutHolesFromFile(string a_FilePathName)
+        {
+            try
+            {
+                //清空原文件中的切孔
+                this.ListCutHole.Clear();
+
+                //弹出打开txt文件的对话矿
+                a_FilePathName.Trim();
+                if (string.IsNullOrEmpty(a_FilePathName))
+                {
+                    //新建一个文件对话框
+                    OpenFileDialog pOpenFileDialog = new OpenFileDialog();
+                    //设置对话框标题
+                    pOpenFileDialog.Title = "打开电镜位置列表文件";
+                    //设置打开文件类型
+                    pOpenFileDialog.Filter = "txt文件(*.txt)|*.txt";
+                    //监测文件是否存在
+                    pOpenFileDialog.CheckFileExists = true;
+                    //文件打开后执行以下程序
+                    if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
+                    {
+                        a_FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);                             
+                        //绝对路径
+                        CutHoleFilePath = a_FilePathName;
+
+                    }
+                }
+
+                //按行取出txt文件
+                string[] lines = File.ReadAllLines(a_FilePathName, System.Text.Encoding.Default);
+
+                LogManager.AddHardwareLog("read " + lines.Count().ToString() + "lines", true);
+                //按现有的文件格式生成
+                string posMode = lines[1];
+                if (posMode.CompareTo(@"Absolute") != 0)
+                {
+                    return false;
+                }
+
+                //解析切孔生成带有位置的切孔
+                //验证数量是否正确
+                int nNum = Convert.ToInt32(lines[3]);
+                int nLines = lines.Length;
+                if (nNum != (lines.Length - 4))
+                {
+                    return false;
+                }
+
+                //行内标识的个数及位置
+                string[] titles = lines[2].Split(',');
+                int numPos = titles.Length;
+
+                int nLabelPos = Array.IndexOf(titles, "Label");
+                int nXPos = Array.IndexOf(titles, "X");
+                int nYPos = Array.IndexOf(titles, "Y");
+                int nZPos = Array.IndexOf(titles, "Z");
+                int nTPos = Array.IndexOf(titles, "T");
+                int nRPos = Array.IndexOf(titles, "R");
+                int nMPos = Array.IndexOf(titles, "M");
+
+                for (int i = 0; i < nNum; i++)
+                {
+                    int currentLine = i + 4;
+                    string currentString = lines[currentLine];
+
+                    LogManager.AddHardwareLog(currentString, true);
+
+                    string[] CurrentPos = currentString.Split(',');
+                    int nCurrentPosNum = CurrentPos.Length;
+
+                    //当前行内的标识及位置个数不够
+                    if (nCurrentPosNum != numPos)
+                    {
+                        return false;
+                    }
+
+                    //切孔标识
+                    CutHole CHole = new CutHole();
+                    CHole.HoleName = CurrentPos[nLabelPos];
+                    //切孔位置
+                    SemPosition holePos = new SemPosition();
+                    holePos.X = Convert.ToSingle(CurrentPos[nXPos]);
+                    holePos.Y = Convert.ToSingle(CurrentPos[nYPos]);
+                    holePos.Z = Convert.ToSingle(CurrentPos[nZPos]);
+                    holePos.M = Convert.ToSingle(CurrentPos[nMPos]);
+                    holePos.T = Convert.ToSingle(CurrentPos[nTPos]);
+                    holePos.R = Convert.ToSingle(CurrentPos[nRPos]);
+                    CHole.Position = holePos;
+                    //默认切割点均参与测试
+                    CHole.SWITCH = true;
+
+                    //更新切孔链表
+                    this.ListCutHole.Add(CHole);
+                    LogManager.AddHardwareLog("X =" + CurrentPos[nXPos]
+                        + "Y =" + CurrentPos[nYPos]
+                        + "Z =" + CurrentPos[nZPos]
+                        + "M =" + CurrentPos[nTPos]
+                        + "T =" + CurrentPos[nRPos]
+                        + "R =" + CurrentPos[nMPos]
+                        , true);
+
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                LogManager.LogError(ex.Message);
+                return false;
+            }         
+        }
+
+        //从点集合对象中生成切割孔信息
+        public bool GetCutHolesFromAnalysisPosition(List<PointF> cutHolePointF)
+        {
+            //集合中的数量
+            int nNum = Convert.ToInt32(cutHolePointF.Count);
+            if (nNum == 0)
+            {
+                return false;
+            }
+            else
+            {
+                List<CutHole> tempCutHoleList = new List<CutHole>();
+                for (int i = 0; i < nNum; i++)
+                {
+                    //切孔标识
+                    CutHole CHole = new CutHole();
+                    CHole.HoleName = (i + 1).ToString();
+                    //切孔位置
+                    SemPosition holePos = new SemPosition();
+                    holePos.X = Convert.ToSingle(cutHolePointF[i].X);
+                    holePos.Y = Convert.ToSingle(cutHolePointF[i].Y);
+                    holePos.Z = Convert.ToSingle(0);
+                    holePos.M = Convert.ToSingle(0);
+                    holePos.T = Convert.ToSingle(0);
+                    holePos.R = Convert.ToSingle(0);
+                    CHole.Position = holePos;
+                    //默认切割点均参与测试
+                    CHole.SWITCH = true;
+
+                    //更新切孔链表
+                    tempCutHoleList.Add(CHole);
+                    LogManager.AddHardwareLog("X =" + cutHolePointF[i].X
+                        + "Y =" + cutHolePointF[i].Y
+                        + "Z =" + 0
+                        + "M =" + 0
+                        + "T =" + 0
+                        + "R =" + 0
+                        , true);
+                }
+                if (tempCutHoleList.Count > 0)
+                {
+                    this.ListCutHole.Clear();
+                    this.ListCutHole = tempCutHoleList;
+                }
+            }
+            return true;
+        }
+        #endregion
+    }
+}

+ 11 - 0
MeasureData/MeasureParam.cs

@@ -106,6 +106,14 @@ namespace MeasureData
             get { return this.photograph_Voltage; }
             set { this.photograph_Voltage = value; }
         }
+        
+        //FIB拍照时的放大倍数
+        private float fib_Magnification;
+        public float FIB_Magnification
+        {
+            get { return this.fib_Magnification; }
+            set { this.fib_Magnification = value; }
+        }
 
         //校正角度选择
         private float correction_Angle;
@@ -183,16 +191,19 @@ namespace MeasureData
             xDouble locationVoltage = new xDouble();
             xDouble photographMagnification = new xDouble();
             xDouble photographVoltage = new xDouble();
+            xDouble fibMagnification = new xDouble();
             stretchMagnification.AssignValue(this.stretch_Magnification);
             locationMagnification.AssignValue(this.location_Magnification);
             locationVoltage.AssignValue(this.location_Voltage);
             photographMagnification.AssignValue(this.photograph_Magnification);
             photographVoltage.AssignValue(this.photograph_Voltage);
+            fibMagnification.AssignValue(this.fib_Magnification);
             sFile.Register("Strectch_Magnification", stretchMagnification);
             sFile.Register("Locatio_Magnification", locationMagnification);
             sFile.Register("Location_Voltage", locationVoltage);
             sFile.Register("Photograph_Magnification", photographMagnification);
             sFile.Register("Photograph_Voltage", photographVoltage);
+            sFile.Register("FIB_Magnification", fibMagnification);
 
             //校正角度
             xDouble correctionAngle = new xDouble();

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 426 - 211
MeasureThread/Measure.cs


+ 12 - 0
SmartSEMControl/HardwareInterface.cs

@@ -106,6 +106,8 @@ namespace SmartSEMControl
 
         //抓图
         Boolean GrabImage(String filename, short xoff, short yoff, short width, short height, short type);
+        //扫描周期
+        float GetCycleTime();
         //读取图像冻结状态
         float GetImageFrozen();
         //冻结
@@ -149,6 +151,12 @@ namespace SmartSEMControl
         Boolean SetBeamShiftX(float set);
         Boolean SetBeamShiftY(float set);
 
+        //电子束移动距离接口
+        float GetBeamOffsetX();
+        float GetBeamOffsetY();
+        Boolean SetBeamOffsetX(float set);
+        Boolean SetBeamOffsetY(float set);
+
         //FIB电子束移动接口
         float GetFIBBeamShiftX();
         float GetFIBBeamShiftY();
@@ -202,6 +210,10 @@ namespace SmartSEMControl
         //FIB执行.ely文件
         Boolean CmdFIBSTARTELY();
 
+        Boolean CmdFocusRate();
+        Boolean CmdSaveRate();
+
+        Boolean SetStageDeltaR(float set);
 
         //清除控件
         Boolean Dispose();

+ 136 - 3
SmartSEMControl/SmartSEM.cs

@@ -166,6 +166,9 @@ namespace SmartSEMControl
         //M轴坐标
         private readonly String AP_STAGE_AT_M = "AP_STAGE_AT_M";
 
+        //扫描周期
+        private readonly String AP_FRAME_TIME = "AP_FRAME_TIME";
+
         //FIB缩放
         private readonly String AP_FIB_MAGNIFICATION = "AP_FIB_MAGNIFICATION";
         //FIB焦距
@@ -181,6 +184,13 @@ namespace SmartSEMControl
 
         //SEM电压
         private readonly String AP_MANUALKV = "AP_MANUALKV";
+
+        //拉直
+        private readonly String AP_STAGE_DELTA_R = "AP_STAGE_DELTA_R";
+
+        //光束移动位置值
+        private readonly String AP_BEAM_OFFSET_X = "AP_BEAM_OFFSET_X";
+        private readonly String AP_BEAM_OFFSET_Y = "AP_BEAM_OFFSET_Y";
         #endregion
 
         #region 数字参数
@@ -215,6 +225,9 @@ namespace SmartSEMControl
         #endregion
 
         #region 命令
+        //20201016 设置图像速度 CMD_SCANRATE0...CMD_SCANRATE15
+        private readonly String CMD_SCANRATE3 = "CMD_SCANRATE3";
+        private readonly String CMD_SCANRATE6 = "CMD_SCANRATE6";
         //开启电压
         private readonly String CMD_BEAM_ON = "CMD_BEAM_ON";
         //关闭电压
@@ -926,6 +939,25 @@ namespace SmartSEMControl
         }
         #endregion
 
+        #region 扫描周期
+        public float GetCycleTime()
+        {
+            float ret = 0;
+            if (ReadParams(AP_FRAME_TIME, ref ret))
+            {
+                
+
+                LogManager.AddHardwareLog("GetCycleTime=" + ret.ToString(), true);
+            }
+            else
+            {
+                LogManager.AddHardwareLog("GetCycleTime Faild!", false);
+               
+            }
+            return ret;
+        }
+        #endregion
+
         #region SEM电压
         /// <summary>
         /// 读取电压
@@ -978,10 +1010,16 @@ namespace SmartSEMControl
                 {
                     LogManager.AddHardwareLog("GrabImage Filename=" + filename + ",x,y,w,h,type=" + xoff.ToString() + "," + 
                         yoff.ToString() + "," + width.ToString() + "," + height.ToString() + "," + type.ToString(), true);
-                    float sta = GetImageFrozen();
-                    if (sta == 1)
+                    while (true)
                     {
-                        ImageLive();
+                        Thread.Sleep(1000);
+                        float sta = GetImageFrozen();
+                        if (sta == 1)
+                        {
+                            LogManager.AddHardwareLog("ImageLive", true);
+                            ImageLive();
+                            break;
+                        }
                     }
                     return true;
                 }
@@ -1096,6 +1134,70 @@ namespace SmartSEMControl
         }
         #endregion
 
+        #region SEM电子束移动距离接口
+        /// <summary>
+        /// 获取电子束移动距离接口X值
+        /// </summary>
+        /// <returns>true:float or false:NaN</returns>
+        public float GetBeamOffsetX()
+        {
+            float ret = 0;
+            if (ReadParams(AP_BEAM_OFFSET_X, ref ret))
+            {
+                LogManager.AddHardwareLog("AP_BEAM_OFFSET_X " + ret.ToString() + " Success!", true);
+                return ret;
+            }
+            else
+            {
+                LogManager.AddHardwareLog("AP_BEAM_OFFSET_X Faild!", false);
+                return float.NaN;
+            }
+        }
+
+        /// <summary>
+        /// 获取电子束移动距离接口Y值
+        /// </summary>
+        /// <returns>true:float or false:NaN</returns>
+        public float GetBeamOffsetY()
+        {
+            float ret = 0;
+            if (ReadParams(AP_BEAM_OFFSET_Y, ref ret))
+            {
+                LogManager.AddHardwareLog("AP_BEAM_OFFSET_Y " + ret.ToString() + " Success!", true);
+                return ret;
+            }
+            else
+            {
+                LogManager.AddHardwareLog("AP_BEAM_OFFSET_Y Faild!", false);
+                return float.NaN;
+            }
+        }
+
+        /// <summary>
+        /// 设置电子束移动距离接口X值
+        /// </summary>
+        /// <param name="set">X坐标</param>
+        /// <returns>true or false</returns>
+        public Boolean SetBeamOffsetX(float set)
+        {
+            Boolean ret = WriteParams(AP_BEAM_OFFSET_X, set);
+            LogManager.AddHardwareLog("AP_BEAM_OFFSET_X=" + set.ToString(), ret);
+            return ret;
+        }
+
+        /// <summary>
+        /// 设置电子束移动接口Y
+        /// </summary>
+        /// <param name="set">X坐标</param>
+        /// <returns>true or false</returns>
+        public Boolean SetBeamOffsetY(float set)
+        {
+            Boolean ret = WriteParams(AP_BEAM_OFFSET_Y, set);
+            LogManager.AddHardwareLog("AP_BEAM_OFFSET_Y=" + set.ToString(), ret);
+            return ret;
+        }
+        #endregion
+
         #region 样品台移动接口
         /// <summary>
         /// 返回样品台坐标数组
@@ -1337,6 +1439,18 @@ namespace SmartSEMControl
             return ret;
         }
 
+        /// <summary>
+        /// 样品台位置 R轴拉直
+        /// </summary>
+        /// <param name="set">R轴拉直角度</param>
+        /// <returns></returns>
+        public Boolean SetStageDeltaR(float set)
+        {
+            Boolean ret = WriteParams(AP_STAGE_DELTA_R, set);
+            LogManager.AddHardwareLog("AP_STAGE_DELTA_R = " + set.ToString(), ret);
+            return ret;
+        }
+
         /// <summary>
         /// 样品台位置 M轴
         /// </summary>
@@ -2122,5 +2236,24 @@ namespace SmartSEMControl
             return strError;
         }
         #endregion
+
+        //20201016 扫图速度
+        #region Focus rate
+        public Boolean CmdFocusRate()
+        {
+            Boolean ret = ExecuteCmd(CMD_SCANRATE3);
+            LogManager.AddHardwareLog("CMD_SCANRATE3!", ret);
+            return ret;
+        }
+        #endregion
+
+        #region Save rate
+        public Boolean CmdSaveRate()
+        {
+            Boolean ret = ExecuteCmd(CMD_SCANRATE6);
+            LogManager.AddHardwareLog("CMD_SCANRATE6!", ret);
+            return ret;
+        }
+        #endregion
     }
 }

+ 103 - 29
WebManager/WebResult.cs

@@ -96,7 +96,7 @@ namespace WebManager
         /// <param name="imageType">孔类型</param>
         /// <param name="firm">厂家类型</param>
         /// <returns>json字符串</returns>
-        public void Img_OffsetAngle_Direction(String imagePath, int imageType, String firm, out double degree, out int direction, out int state)
+        public void Img_OffsetAngle_Direction(String imagePath, int imageType, String firm, out float degree, out int direction, out int state)
         {
             try
             {
@@ -114,12 +114,20 @@ namespace WebManager
             String res = RequestString(JsonConvert.SerializeObject(json));
             JObject jret= (JObject)JsonConvert.DeserializeObject(res);
 
-            if (jret != null && jret.Property("img_name") != null && jret.Property("img_name").ToString() != "")
+            if (jret != null && jret.Property(imagePath) != null && jret.Property(imagePath).ToString() != "")
             {
-                JObject jname = JObject.Parse(jret["img_name"].ToString());
-                degree = Convert.ToDouble(jname["degree"].ToString());
-                direction = Convert.ToInt32(jname["direction"].ToString());
+                JObject jname = JObject.Parse(jret[imagePath].ToString());
                 state = Convert.ToInt32(jname["state"].ToString());
+                if (state == 1)
+                {
+                    degree = Convert.ToSingle(jname["degree"].ToString());
+                    direction = Convert.ToInt32(jname["direction"].ToString());
+                }
+                else
+                {
+                    degree = 0;
+                    direction = 0;
+                }
             }
             else
             {
@@ -141,7 +149,7 @@ namespace WebManager
         /// <param name="offsety2">切割点相对于原点坐标右上角y值</param>
         /// <param name="state">返回状态</param>
         /// <returns>json字符串</returns>
-        public void Img_Cut_Position(String imagePath, String imageType, String firm, out float offsetx1, out float offsety1, out float offsetx2, out float offsety2, out int state)
+        public void Img_Cut_Position(String imagePath, int imageType, String firm, out float offsetx1, out float offsety1, out float offsetx2, out float offsety2, out int state)
         {
             try
             {
@@ -158,15 +166,26 @@ namespace WebManager
             json.Add("firm", firm);
             String res = RequestString(JsonConvert.SerializeObject(json));
             JObject jret = (JObject)JsonConvert.DeserializeObject(res);
-            if (jret != null && jret.Property("img_name") != null && jret.Property("img_name").ToString() != "")
+            if (jret != null && jret.Property(imagePath) != null && jret.Property(imagePath).ToString() != "")
             {
-                JObject jname = JObject.Parse(jret["img_name"].ToString());
+                JObject jname = JObject.Parse(jret[imagePath].ToString());
                 JArray jlocation = JArray.Parse(jname["location"].ToString());
-                offsetx1 = Convert.ToSingle(jlocation[0][0].ToString());
-                offsety1 = Convert.ToSingle(jlocation[0][1].ToString());
-                offsetx2 = Convert.ToSingle(jlocation[1][0].ToString());
-                offsety2 = Convert.ToSingle(jlocation[1][1].ToString());
+                
                 state = Convert.ToInt32(jname["state"].ToString());
+                if (state == 1)
+                {
+                    offsetx1 = Convert.ToSingle(jlocation[0][0].ToString());
+                    offsety1 = Convert.ToSingle(jlocation[0][1].ToString());
+                    offsetx2 = Convert.ToSingle(jlocation[1][0].ToString());
+                    offsety2 = Convert.ToSingle(jlocation[1][1].ToString());
+                }
+                else
+                {
+                    offsetx1 = 0;
+                    offsety1 = 0;
+                    offsetx2 = 0;
+                    offsety2 = 0;
+                }
             }
             else
             {
@@ -230,13 +249,22 @@ namespace WebManager
             json.Add("img_path", imagePath);
             String res = RequestString(JsonConvert.SerializeObject(json));
             JObject jret = (JObject)JsonConvert.DeserializeObject(res);
-            if (jret != null && jret.Property("img_name") != null && jret.Property("img_name").ToString() != "")
+            if (jret != null && jret.Property(imagePath) != null && jret.Property(imagePath).ToString() != "")
             {
-                JObject jname = JObject.Parse(jret["img_name"].ToString());
+                JObject jname = JObject.Parse(jret[imagePath].ToString());
                 JArray jlocation = JArray.Parse(jname["top_center"].ToString());
-                offsetx = Convert.ToSingle(jlocation[0].ToString());
-                offsety = Convert.ToSingle(jlocation[1].ToString());
+                
                 state = Convert.ToInt32(jname["state"].ToString());
+                if(state==1)
+                {
+                    offsetx = Convert.ToSingle(jlocation[0].ToString());
+                    offsety = Convert.ToSingle(jlocation[1].ToString());
+                }
+                else
+                {
+                    offsetx = 0;
+                    offsety = 0;
+                }
             }
             else
             {
@@ -313,11 +341,11 @@ namespace WebManager
         }
 
         /// <summary>
-        /// 计算切割面区域中心坐标,以及偏移角度及方向
+        /// 计算切割面区域偏移角度及方向
         /// </summary>
         /// <param name="imagePath">图片路径</param>
         /// <returns>json字符串</returns>
-        public void Img_Center_Position_OffsetAngle_Direction(String imagePath, String imageType, String firm, out float offsetx, out float offsety, out float degree, out int direction, out int state)
+        public void Img_Center_Position_OffsetAngle_Direction(String imagePath, out float degree, out int direction, out int state)
         {
             try
             {
@@ -330,26 +358,72 @@ namespace WebManager
             Update_Url();
             JObject json = new JObject();
             json.Add("img_path", imagePath);
-            json.Add("img_type", imageType);
-            json.Add("firm", firm);
             String res = RequestString(JsonConvert.SerializeObject(json));
             JObject jret = (JObject)JsonConvert.DeserializeObject(res);
-            if (jret != null && jret.Property("img_name") != null && jret.Property("img_name").ToString() != "")
+            if (jret != null && jret.Property(imagePath) != null && jret.Property(imagePath).ToString() != "")
             {
-                JObject jname = JObject.Parse(jret["img_name"].ToString());
-                JArray jlocation = JArray.Parse(jname["center"].ToString());
-                offsetx = Convert.ToSingle(jlocation[0].ToString());
-                offsety = Convert.ToSingle(jlocation[1].ToString());
+                JObject jname = JObject.Parse(jret[imagePath].ToString());
                 state = Convert.ToInt32(jname["state"].ToString());
-                degree = Convert.ToSingle(jname["degree"].ToString());
-                direction = Convert.ToInt32(jname["direction"].ToString());
-
+                if (state == 1)
+                {
+                    degree = Convert.ToSingle(jname["degree"].ToString());
+                    direction = Convert.ToInt32(jname["direction"].ToString());
+                }
+                else
+                {
+                    degree = 0;
+                    direction = 0;
+                }
             }
             else
             {
                 state = 0;
                 direction = 0;
                 degree = 0;
+                //offsetx = 0;
+                //offsety = 0;
+            }
+        }
+
+        /// <summary>
+        /// 计算切割后图像梯形区域上边中心点坐标
+        /// </summary>
+        /// <param name="imagePath">图片路径</param>
+        /// <returns>json字符串</returns>
+        public void Img_Surface_Center_Position(String imagePath, out float offsetx, out float offsety, out int state)
+        {
+            try
+            {
+                this.webServer_Path = this._url[7];
+            }
+            catch
+            {
+                this.webServer_Path = "test4";
+            }
+            Update_Url();
+            JObject json = new JObject();
+            json.Add("img_path", imagePath);
+            String res = RequestString(JsonConvert.SerializeObject(json));
+            JObject jret = (JObject)JsonConvert.DeserializeObject(res);
+            if (jret != null && jret.Property(imagePath) != null && jret.Property(imagePath).ToString() != "")
+            {
+                JObject jname = JObject.Parse(jret[imagePath].ToString());
+                JArray jlocation = JArray.Parse(jname["top_center"].ToString());
+                state = Convert.ToInt32(jname["state"].ToString());
+                if(state==1)
+                {
+                    offsetx = Convert.ToSingle(jlocation[0].ToString());
+                    offsety = Convert.ToSingle(jlocation[1].ToString());
+                }
+                else
+                {
+                    offsetx = 0;
+                    offsety = 0;
+                }
+            }
+            else
+            {
+                state = 0;
                 offsetx = 0;
                 offsety = 0;
             }
@@ -366,7 +440,7 @@ namespace WebManager
         {
             try
             {
-                this.webServer_Path = this._url[7];
+                this.webServer_Path = this._url[8];
             }
             catch
             {

Vissa filer visades inte eftersom för många filer har ändrats