Browse Source

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

# Conflicts:
#	MeasureData/ConfigFile.cs
#	MeasureData/MeasureParam.cs
#	MeasureThread/Measure.cs
HaoShuang 5 years ago
parent
commit
f94d054598

+ 38 - 1
FileManager/XmlManager.cs

@@ -20,7 +20,7 @@ namespace FileManager
         /// <param name="rootnode">根节点名</param>
         /// <param name="rootnode">根节点名</param>
         /// <param name="list_attributes">根节点的属性键值对</param>
         /// <param name="list_attributes">根节点的属性键值对</param>
         /// <returns></returns>
         /// <returns></returns>
-        public static Boolean CreateXmlFile(String xmlfullname )
+        public static Boolean CreateXmlFile(String xmlfullname)
         {
         {
             XmlDocument xmlDoc = new XmlDocument();
             XmlDocument xmlDoc = new XmlDocument();
             //创建类型声明节点  
             //创建类型声明节点  
@@ -42,5 +42,42 @@ namespace FileManager
             }
             }
         }
         }
         #endregion
         #endregion
+
+        #region 获取Xml文件中节点内的信息
+        /// <summary>
+        /// 获取Xml文件中节点内的信息
+        /// </summary>
+        /// <param name="xmlfullname">Xml文件的全路径</param>
+        /// <param name="measureCode">线程编号</param>
+        /// <returns></returns>
+        public static XmlNodeList GetXmlMeasureFlowNodeInfo(String xmlfullname, string measureCode)
+        {
+            try
+            {
+                XmlDocument xmlDoc = new XmlDocument();
+                //加载XML文件  
+                xmlDoc.Load(xmlfullname);
+                //获得文档中的根节点。
+                XmlElement xmlElement = xmlDoc.DocumentElement;
+                XmlNodeList nodeList = xmlElement.ChildNodes;
+                XmlNodeList nodeChildList = null;
+                foreach (XmlNode item in nodeList)
+                {
+                    if (item.Attributes["Code"].Value == measureCode)
+                    {
+                        //获取当前节点下的所有信息
+                        nodeChildList = item.ChildNodes;
+                        break;
+                    }
+                }
+                return nodeChildList;
+            }
+            catch (Exception ex)
+            {
+                LogManager.LogError(ex.ToString());
+                return null;
+            }
+        }
+        #endregion
     }
     }
 }
 }

+ 32 - 1
HOZProject/App.config

@@ -4,14 +4,45 @@
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
     </startup>
     </startup>
     <appSettings>
     <appSettings>
+      <!--厂商_数据源-->
       <add key="Firm" value="厂商A,厂商B,厂商C,厂商D"/>
       <add key="Firm" value="厂商A,厂商B,厂商C,厂商D"/>
+      <!--样品类型_数据源-->
       <add key="Sample_Type" value="类型A,类型B,类型C"/>
       <add key="Sample_Type" value="类型A,类型B,类型C"/>
+      <!--拍照的工作电压_数据源-->
       <add key="WPZD" value="100,200,300"/>
       <add key="WPZD" value="100,200,300"/>
+      <!--拍照的放大倍数_数据源-->
       <add key="WPZF" value="100,200,300"/>
       <add key="WPZF" value="100,200,300"/>
+      <!--定位切割位置的工作电压_数据源-->
       <add key="WQGD" value="100,200,300"/>
       <add key="WQGD" value="100,200,300"/>
+      <!--定位切割位置的放大倍数_数据源-->
       <add key="WQGF" value="100,200,300"/>
       <add key="WQGF" value="100,200,300"/>
-      <add key="WLZ" value="类型A,类型B,类型C"/>
+      <!--拉直操作需要的放大倍数_数据源-->
+      <add key="WLZ" value="100,200,300"/>
       <add key="ConfigFilePath" value="E:/ConfigFile"/>
       <add key="ConfigFilePath" value="E:/ConfigFile"/>
+      <!--PT使用的ELY文件-->
+      <add key="PT_ELYFile" value=""/>
+      <!--FIB使用的ELY文件-->
+      <add key="FIB_ELYFile" value=""/>
+      <!--拉直操作需要的放大倍数-->
+      <add key="Stretch_Magnification" value="100"/>
+      <!--定位切割位置的放大倍数-->
+      <add key="Location_Magnification" value="100"/>
+      <!--定位切割位置的工作电压-->
+      <add key="Location_Voltage" value="2000"/>
+      <!--拍照的放大倍数-->
+      <add key="Photograph_Magnification" value="100"/>
+      <!--拍照的工作电压-->
+      <add key="Photograph_Voltage" value="2500"/>
+      <!--校正角度选择-->
+      <add key="Correction_Angle" value="54"/>
+      <!--样品类型-->
+      <add key="SampleName" value=""/>
+      <!--厂商-->
+      <add key="Firms" value=""/>
+      <!--是否仅拍照-->
+      <add key="Is_Photograph" value="True"/>
+      <!--是否PT沉积-->
+      <add key="PT_Depostion" value="False"/>
     </appSettings>
     </appSettings>
   <DefaultParam>
   <DefaultParam>
     <add key ="FIB" value ="C:/HOZ/FIB.ELY"/>
     <add key ="FIB" value ="C:/HOZ/FIB.ELY"/>

+ 11 - 10
HOZProject/FormHOZMain.Designer.cs

@@ -183,8 +183,8 @@
             this.plTop.Controls.Add(this.pbLog);
             this.plTop.Controls.Add(this.pbLog);
             this.plTop.Controls.Add(this.pbInit);
             this.plTop.Controls.Add(this.pbInit);
             this.plTop.Controls.Add(this.pbSave);
             this.plTop.Controls.Add(this.pbSave);
-            this.plTop.Controls.Add(this.pbNew);
             this.plTop.Controls.Add(this.pbOpen);
             this.plTop.Controls.Add(this.pbOpen);
+            this.plTop.Controls.Add(this.pbNew);
             this.plTop.Dock = System.Windows.Forms.DockStyle.Top;
             this.plTop.Dock = System.Windows.Forms.DockStyle.Top;
             this.plTop.Location = new System.Drawing.Point(0, 0);
             this.plTop.Location = new System.Drawing.Point(0, 0);
             this.plTop.Name = "plTop";
             this.plTop.Name = "plTop";
@@ -196,7 +196,7 @@
             this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
             this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbStop.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStop.Location = new System.Drawing.Point(595, 6);
+            this.pbStop.Location = new System.Drawing.Point(521, 4);
             this.pbStop.Name = "pbStop";
             this.pbStop.Name = "pbStop";
             this.pbStop.Size = new System.Drawing.Size(68, 71);
             this.pbStop.Size = new System.Drawing.Size(68, 71);
             this.pbStop.TabIndex = 8;
             this.pbStop.TabIndex = 8;
@@ -208,7 +208,7 @@
             this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
             this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Pause;
             this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbPause.Location = new System.Drawing.Point(521, 6);
+            this.pbPause.Location = new System.Drawing.Point(447, 4);
             this.pbPause.Name = "pbPause";
             this.pbPause.Name = "pbPause";
             this.pbPause.Size = new System.Drawing.Size(68, 71);
             this.pbPause.Size = new System.Drawing.Size(68, 71);
             this.pbPause.TabIndex = 8;
             this.pbPause.TabIndex = 8;
@@ -219,7 +219,7 @@
             this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start;
             this.pbStart.BackgroundImage = global::HOZProject.Properties.Resources.Start;
             this.pbStart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbStart.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbStart.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbStart.Location = new System.Drawing.Point(447, 6);
+            this.pbStart.Location = new System.Drawing.Point(373, 4);
             this.pbStart.Name = "pbStart";
             this.pbStart.Name = "pbStart";
             this.pbStart.Size = new System.Drawing.Size(68, 71);
             this.pbStart.Size = new System.Drawing.Size(68, 71);
             this.pbStart.TabIndex = 8;
             this.pbStart.TabIndex = 8;
@@ -276,7 +276,7 @@
             this.pbImportTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportConfigFile;
             this.pbImportTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportConfigFile;
             this.pbImportTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbImportTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbImportTemplateFile.Location = new System.Drawing.Point(374, 6);
+            this.pbImportTemplateFile.Location = new System.Drawing.Point(224, 4);
             this.pbImportTemplateFile.Name = "pbImportTemplateFile";
             this.pbImportTemplateFile.Name = "pbImportTemplateFile";
             this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
             this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
             this.pbImportTemplateFile.TabIndex = 6;
             this.pbImportTemplateFile.TabIndex = 6;
@@ -288,7 +288,7 @@
             this.pbLog.BackgroundImage = global::HOZProject.Properties.Resources.Log;
             this.pbLog.BackgroundImage = global::HOZProject.Properties.Resources.Log;
             this.pbLog.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbLog.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbLog.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbLog.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbLog.Location = new System.Drawing.Point(301, 6);
+            this.pbLog.Location = new System.Drawing.Point(297, 4);
             this.pbLog.Name = "pbLog";
             this.pbLog.Name = "pbLog";
             this.pbLog.Size = new System.Drawing.Size(68, 71);
             this.pbLog.Size = new System.Drawing.Size(68, 71);
             this.pbLog.TabIndex = 6;
             this.pbLog.TabIndex = 6;
@@ -300,7 +300,7 @@
             this.pbInit.BackgroundImage = global::HOZProject.Properties.Resources.init;
             this.pbInit.BackgroundImage = global::HOZProject.Properties.Resources.init;
             this.pbInit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbInit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbInit.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbInit.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbInit.Location = new System.Drawing.Point(227, 6);
+            this.pbInit.Location = new System.Drawing.Point(151, 4);
             this.pbInit.Name = "pbInit";
             this.pbInit.Name = "pbInit";
             this.pbInit.Size = new System.Drawing.Size(68, 71);
             this.pbInit.Size = new System.Drawing.Size(68, 71);
             this.pbInit.TabIndex = 5;
             this.pbInit.TabIndex = 5;
@@ -312,7 +312,7 @@
             this.pbSave.BackgroundImage = global::HOZProject.Properties.Resources.save;
             this.pbSave.BackgroundImage = global::HOZProject.Properties.Resources.save;
             this.pbSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbSave.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbSave.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbSave.Location = new System.Drawing.Point(153, 6);
+            this.pbSave.Location = new System.Drawing.Point(78, 4);
             this.pbSave.Name = "pbSave";
             this.pbSave.Name = "pbSave";
             this.pbSave.Size = new System.Drawing.Size(68, 71);
             this.pbSave.Size = new System.Drawing.Size(68, 71);
             this.pbSave.TabIndex = 4;
             this.pbSave.TabIndex = 4;
@@ -324,11 +324,12 @@
             this.pbNew.BackgroundImage = global::HOZProject.Properties.Resources.New;
             this.pbNew.BackgroundImage = global::HOZProject.Properties.Resources.New;
             this.pbNew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbNew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbNew.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbNew.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbNew.Location = new System.Drawing.Point(5, 6);
+            this.pbNew.Location = new System.Drawing.Point(5, 4);
             this.pbNew.Name = "pbNew";
             this.pbNew.Name = "pbNew";
             this.pbNew.Size = new System.Drawing.Size(68, 71);
             this.pbNew.Size = new System.Drawing.Size(68, 71);
             this.pbNew.TabIndex = 3;
             this.pbNew.TabIndex = 3;
             this.pbNew.TabStop = false;
             this.pbNew.TabStop = false;
+            this.pbNew.Visible = false;
             this.pbNew.Click += new System.EventHandler(this.pbNew_Click);
             this.pbNew.Click += new System.EventHandler(this.pbNew_Click);
             // 
             // 
             // pbOpen
             // pbOpen
@@ -336,7 +337,7 @@
             this.pbOpen.BackgroundImage = global::HOZProject.Properties.Resources.open;
             this.pbOpen.BackgroundImage = global::HOZProject.Properties.Resources.open;
             this.pbOpen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbOpen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbOpen.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbOpen.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbOpen.Location = new System.Drawing.Point(79, 6);
+            this.pbOpen.Location = new System.Drawing.Point(5, 4);
             this.pbOpen.Name = "pbOpen";
             this.pbOpen.Name = "pbOpen";
             this.pbOpen.Size = new System.Drawing.Size(68, 71);
             this.pbOpen.Size = new System.Drawing.Size(68, 71);
             this.pbOpen.TabIndex = 3;
             this.pbOpen.TabIndex = 3;

+ 2 - 2
HOZProject/FormHOZMain.cs

@@ -172,6 +172,7 @@ namespace HOZProject
             pbOpen.Enabled = cState;
             pbOpen.Enabled = cState;
             pbSave.Enabled = cState;
             pbSave.Enabled = cState;
             pbInit.Enabled = cState;
             pbInit.Enabled = cState;
+            pbImportTemplateFile.Enabled = cState;
             pbLog.Enabled = cState;
             pbLog.Enabled = cState;
         }
         }
         #endregion
         #endregion
@@ -249,6 +250,7 @@ namespace HOZProject
             {
             {
                 //清空切孔列表用户控件
                 //清空切孔列表用户控件
                 plLeftContent.Controls.Clear();
                 plLeftContent.Controls.Clear();
+                //加载配置文件
             }
             }
         }
         }
 
 
@@ -447,7 +449,5 @@ namespace HOZProject
                 uControl_Init.ReadConfigInfo();
                 uControl_Init.ReadConfigInfo();
             }
             }
         }
         }
-
-        
     }
     }
 }
 }

+ 255 - 199
HOZProject/FormUnitControl.Designer.cs

@@ -28,11 +28,11 @@
         /// </summary>
         /// </summary>
         private void InitializeComponent()
         private void InitializeComponent()
         {
         {
-            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);
+            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);
             this.btnGrabImage = new System.Windows.Forms.Button();
             this.btnGrabImage = new System.Windows.Forms.Button();
             this.btnenlargeGet = new System.Windows.Forms.Button();
             this.btnenlargeGet = new System.Windows.Forms.Button();
             this.btnWriteXml = new System.Windows.Forms.Button();
             this.btnWriteXml = new System.Windows.Forms.Button();
@@ -270,25 +270,29 @@
             this.btnReadConfig = new System.Windows.Forms.Button();
             this.btnReadConfig = new System.Windows.Forms.Button();
             this.btnCreateConfig = new System.Windows.Forms.Button();
             this.btnCreateConfig = new System.Windows.Forms.Button();
             this.tabPage4 = new System.Windows.Forms.TabPage();
             this.tabPage4 = new System.Windows.Forms.TabPage();
-            this.lblPs1 = new System.Windows.Forms.Label();
-            this.btnPsFile = new System.Windows.Forms.Button();
-            this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
-            this.label68 = new System.Windows.Forms.Label();
-            this.label70 = new System.Windows.Forms.Label();
-            this.label72 = new System.Windows.Forms.Label();
-            this.label74 = new System.Windows.Forms.Label();
-            this.label76 = new System.Windows.Forms.Label();
-            this.label78 = new System.Windows.Forms.Label();
-            this.txtsample1x = new System.Windows.Forms.TextBox();
-            this.txtsample1y = new System.Windows.Forms.TextBox();
-            this.txty = new System.Windows.Forms.TextBox();
-            this.txtx = new System.Windows.Forms.TextBox();
+            this.btn60 = new System.Windows.Forms.Button();
+            this.btn45 = new System.Windows.Forms.Button();
+            this.btn30 = new System.Windows.Forms.Button();
+            this.btnrect = new System.Windows.Forms.Button();
             this.txtdistance = new System.Windows.Forms.TextBox();
             this.txtdistance = new System.Windows.Forms.TextBox();
             this.txtarray = new System.Windows.Forms.TextBox();
             this.txtarray = new System.Windows.Forms.TextBox();
-            this.btnrect = new System.Windows.Forms.Button();
-            this.btn30 = new System.Windows.Forms.Button();
-            this.btn45 = new System.Windows.Forms.Button();
-            this.btn60 = new System.Windows.Forms.Button();
+            this.txty = new System.Windows.Forms.TextBox();
+            this.txtx = new System.Windows.Forms.TextBox();
+            this.txtsample1y = new System.Windows.Forms.TextBox();
+            this.txtsample1x = new System.Windows.Forms.TextBox();
+            this.label76 = new System.Windows.Forms.Label();
+            this.label78 = new System.Windows.Forms.Label();
+            this.label74 = new System.Windows.Forms.Label();
+            this.label72 = new System.Windows.Forms.Label();
+            this.label70 = new System.Windows.Forms.Label();
+            this.label68 = new System.Windows.Forms.Label();
+            this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.lblPs1 = new System.Windows.Forms.Label();
+            this.btnPsFile = new System.Windows.Forms.Button();
+            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.panelControl.SuspendLayout();
             this.panelControl.SuspendLayout();
             this.panelSEM.SuspendLayout();
             this.panelSEM.SuspendLayout();
             this.panelFIB.SuspendLayout();
             this.panelFIB.SuspendLayout();
@@ -1112,6 +1116,10 @@
             // 
             // 
             // panelSEM
             // panelSEM
             // 
             // 
+            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.btnScanRotationSetOn);
             this.panelSEM.Controls.Add(this.btnTiltAngleSetOn);
             this.panelSEM.Controls.Add(this.btnTiltAngleSetOn);
             this.panelSEM.Controls.Add(this.panelFIB);
             this.panelSEM.Controls.Add(this.panelFIB);
@@ -3038,111 +3046,105 @@
             this.tabPage4.Text = "自动计算坐标";
             this.tabPage4.Text = "自动计算坐标";
             this.tabPage4.UseVisualStyleBackColor = true;
             this.tabPage4.UseVisualStyleBackColor = true;
             // 
             // 
-            // lblPs1
+            // btn60
             // 
             // 
-            this.lblPs1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.lblPs1.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lblPs1.ForeColor = System.Drawing.Color.Blue;
-            this.lblPs1.Location = new System.Drawing.Point(229, 22);
-            this.lblPs1.Name = "lblPs1";
-            this.lblPs1.Size = new System.Drawing.Size(107, 38);
-            this.lblPs1.TabIndex = 0;
-            this.lblPs1.Text = "0,0";
-            this.lblPs1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.btn60.Location = new System.Drawing.Point(476, 201);
+            this.btn60.Name = "btn60";
+            this.btn60.Size = new System.Drawing.Size(81, 38);
+            this.btn60.TabIndex = 76;
+            this.btn60.Text = "60度";
+            this.btn60.UseVisualStyleBackColor = true;
+            this.btn60.Click += new System.EventHandler(this.btn60_Click);
             // 
             // 
-            // btnPsFile
+            // btn45
             // 
             // 
-            this.btnPsFile.Location = new System.Drawing.Point(32, 22);
-            this.btnPsFile.Name = "btnPsFile";
-            this.btnPsFile.Size = new System.Drawing.Size(127, 38);
-            this.btnPsFile.TabIndex = 1;
-            this.btnPsFile.Text = "打开位置文件";
-            this.btnPsFile.UseVisualStyleBackColor = true;
-            this.btnPsFile.Click += new System.EventHandler(this.btnPsFile_Click);
+            this.btn45.Location = new System.Drawing.Point(476, 148);
+            this.btn45.Name = "btn45";
+            this.btn45.Size = new System.Drawing.Size(81, 38);
+            this.btn45.TabIndex = 75;
+            this.btn45.Text = "45度";
+            this.btn45.UseVisualStyleBackColor = true;
+            this.btn45.Click += new System.EventHandler(this.btn45_Click);
             // 
             // 
-            // chart1
+            // btn30
             // 
             // 
-            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";
-            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";
+            this.btn30.Location = new System.Drawing.Point(476, 96);
+            this.btn30.Name = "btn30";
+            this.btn30.Size = new System.Drawing.Size(81, 38);
+            this.btn30.TabIndex = 74;
+            this.btn30.Text = "30度";
+            this.btn30.UseVisualStyleBackColor = true;
+            this.btn30.Click += new System.EventHandler(this.btn30_Click);
             // 
             // 
-            // label68
+            // btnrect
             // 
             // 
-            this.label68.AutoSize = true;
-            this.label68.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label68.Location = new System.Drawing.Point(47, 209);
-            this.label68.Name = "label68";
-            this.label68.Size = new System.Drawing.Size(146, 27);
-            this.label68.TabIndex = 54;
-            this.label68.Text = "中心点X轴坐标";
+            this.btnrect.Location = new System.Drawing.Point(51, 472);
+            this.btnrect.Name = "btnrect";
+            this.btnrect.Size = new System.Drawing.Size(127, 38);
+            this.btnrect.TabIndex = 73;
+            this.btnrect.Text = "计算显示";
+            this.btnrect.UseVisualStyleBackColor = true;
+            this.btnrect.Click += new System.EventHandler(this.btnrect_Click);
             // 
             // 
-            // label70
+            // txtdistance
             // 
             // 
-            this.label70.AutoSize = true;
-            this.label70.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label70.Location = new System.Drawing.Point(47, 260);
-            this.label70.Name = "label70";
-            this.label70.Size = new System.Drawing.Size(145, 27);
-            this.label70.TabIndex = 56;
-            this.label70.Text = "中心点Y轴坐标";
+            this.txtdistance.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtdistance.Location = new System.Drawing.Point(307, 367);
+            this.txtdistance.Name = "txtdistance";
+            this.txtdistance.Size = new System.Drawing.Size(100, 28);
+            this.txtdistance.TabIndex = 72;
+            this.txtdistance.Text = "30";
+            this.txtdistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // 
-            // label72
+            // txtarray
             // 
             // 
-            this.label72.AutoSize = true;
-            this.label72.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label72.Location = new System.Drawing.Point(47, 314);
-            this.label72.Name = "label72";
-            this.label72.Size = new System.Drawing.Size(152, 27);
-            this.label72.TabIndex = 58;
-            this.label72.Text = "默认样品排列数";
+            this.txtarray.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtarray.Location = new System.Drawing.Point(307, 316);
+            this.txtarray.Name = "txtarray";
+            this.txtarray.Size = new System.Drawing.Size(100, 28);
+            this.txtarray.TabIndex = 71;
+            this.txtarray.Text = "4";
+            this.txtarray.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // 
-            // label74
+            // txty
             // 
             // 
-            this.label74.AutoSize = true;
-            this.label74.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label74.Location = new System.Drawing.Point(47, 367);
-            this.label74.Name = "label74";
-            this.label74.Size = new System.Drawing.Size(112, 27);
-            this.label74.TabIndex = 60;
-            this.label74.Text = "样品间距离";
+            this.txty.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txty.Location = new System.Drawing.Point(307, 262);
+            this.txty.Name = "txty";
+            this.txty.Size = new System.Drawing.Size(100, 28);
+            this.txty.TabIndex = 70;
+            this.txty.Text = "65";
+            this.txty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtx
+            // 
+            this.txtx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtx.Location = new System.Drawing.Point(307, 211);
+            this.txtx.Name = "txtx";
+            this.txtx.Size = new System.Drawing.Size(100, 28);
+            this.txtx.TabIndex = 69;
+            this.txtx.Text = "65";
+            this.txtx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtsample1y
+            // 
+            this.txtsample1y.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtsample1y.Location = new System.Drawing.Point(307, 154);
+            this.txtsample1y.Name = "txtsample1y";
+            this.txtsample1y.Size = new System.Drawing.Size(100, 28);
+            this.txtsample1y.TabIndex = 68;
+            this.txtsample1y.Text = "130";
+            this.txtsample1y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtsample1x
+            // 
+            this.txtsample1x.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtsample1x.Location = new System.Drawing.Point(307, 103);
+            this.txtsample1x.Name = "txtsample1x";
+            this.txtsample1x.Size = new System.Drawing.Size(100, 28);
+            this.txtsample1x.TabIndex = 67;
+            this.txtsample1x.Text = "0";
+            this.txtsample1x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // 
             // label76
             // label76
             // 
             // 
@@ -3164,105 +3166,155 @@
             this.label78.TabIndex = 63;
             this.label78.TabIndex = 63;
             this.label78.Text = "样品1-X轴坐标";
             this.label78.Text = "样品1-X轴坐标";
             // 
             // 
-            // txtsample1x
-            // 
-            this.txtsample1x.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtsample1x.Location = new System.Drawing.Point(307, 103);
-            this.txtsample1x.Name = "txtsample1x";
-            this.txtsample1x.Size = new System.Drawing.Size(100, 28);
-            this.txtsample1x.TabIndex = 67;
-            this.txtsample1x.Text = "0";
-            this.txtsample1x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // txtsample1y
-            // 
-            this.txtsample1y.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtsample1y.Location = new System.Drawing.Point(307, 154);
-            this.txtsample1y.Name = "txtsample1y";
-            this.txtsample1y.Size = new System.Drawing.Size(100, 28);
-            this.txtsample1y.TabIndex = 68;
-            this.txtsample1y.Text = "130";
-            this.txtsample1y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // txty
-            // 
-            this.txty.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txty.Location = new System.Drawing.Point(307, 262);
-            this.txty.Name = "txty";
-            this.txty.Size = new System.Drawing.Size(100, 28);
-            this.txty.TabIndex = 70;
-            this.txty.Text = "65";
-            this.txty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label74
             // 
             // 
-            // txtx
+            this.label74.AutoSize = true;
+            this.label74.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label74.Location = new System.Drawing.Point(47, 367);
+            this.label74.Name = "label74";
+            this.label74.Size = new System.Drawing.Size(112, 27);
+            this.label74.TabIndex = 60;
+            this.label74.Text = "样品间距离";
             // 
             // 
-            this.txtx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtx.Location = new System.Drawing.Point(307, 211);
-            this.txtx.Name = "txtx";
-            this.txtx.Size = new System.Drawing.Size(100, 28);
-            this.txtx.TabIndex = 69;
-            this.txtx.Text = "65";
-            this.txtx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label72
             // 
             // 
-            // txtdistance
+            this.label72.AutoSize = true;
+            this.label72.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label72.Location = new System.Drawing.Point(47, 314);
+            this.label72.Name = "label72";
+            this.label72.Size = new System.Drawing.Size(152, 27);
+            this.label72.TabIndex = 58;
+            this.label72.Text = "默认样品排列数";
             // 
             // 
-            this.txtdistance.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtdistance.Location = new System.Drawing.Point(307, 367);
-            this.txtdistance.Name = "txtdistance";
-            this.txtdistance.Size = new System.Drawing.Size(100, 28);
-            this.txtdistance.TabIndex = 72;
-            this.txtdistance.Text = "30";
-            this.txtdistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label70
             // 
             // 
-            // txtarray
+            this.label70.AutoSize = true;
+            this.label70.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label70.Location = new System.Drawing.Point(47, 260);
+            this.label70.Name = "label70";
+            this.label70.Size = new System.Drawing.Size(145, 27);
+            this.label70.TabIndex = 56;
+            this.label70.Text = "中心点Y轴坐标";
             // 
             // 
-            this.txtarray.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtarray.Location = new System.Drawing.Point(307, 316);
-            this.txtarray.Name = "txtarray";
-            this.txtarray.Size = new System.Drawing.Size(100, 28);
-            this.txtarray.TabIndex = 71;
-            this.txtarray.Text = "4";
-            this.txtarray.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label68
             // 
             // 
-            // btnrect
+            this.label68.AutoSize = true;
+            this.label68.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label68.Location = new System.Drawing.Point(47, 209);
+            this.label68.Name = "label68";
+            this.label68.Size = new System.Drawing.Size(146, 27);
+            this.label68.TabIndex = 54;
+            this.label68.Text = "中心点X轴坐标";
             // 
             // 
-            this.btnrect.Location = new System.Drawing.Point(51, 472);
-            this.btnrect.Name = "btnrect";
-            this.btnrect.Size = new System.Drawing.Size(127, 38);
-            this.btnrect.TabIndex = 73;
-            this.btnrect.Text = "计算显示";
-            this.btnrect.UseVisualStyleBackColor = true;
-            this.btnrect.Click += new System.EventHandler(this.btnrect_Click);
+            // chart1
             // 
             // 
-            // btn30
+            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);
+            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);
+            this.chart1.Size = new System.Drawing.Size(590, 557);
+            this.chart1.TabIndex = 2;
+            this.chart1.Text = "chart1";
             // 
             // 
-            this.btn30.Location = new System.Drawing.Point(476, 96);
-            this.btn30.Name = "btn30";
-            this.btn30.Size = new System.Drawing.Size(81, 38);
-            this.btn30.TabIndex = 74;
-            this.btn30.Text = "30度";
-            this.btn30.UseVisualStyleBackColor = true;
-            this.btn30.Click += new System.EventHandler(this.btn30_Click);
+            // lblPs1
             // 
             // 
-            // btn45
+            this.lblPs1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lblPs1.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPs1.ForeColor = System.Drawing.Color.Blue;
+            this.lblPs1.Location = new System.Drawing.Point(229, 22);
+            this.lblPs1.Name = "lblPs1";
+            this.lblPs1.Size = new System.Drawing.Size(107, 38);
+            this.lblPs1.TabIndex = 0;
+            this.lblPs1.Text = "0,0";
+            this.lblPs1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // 
-            this.btn45.Location = new System.Drawing.Point(476, 148);
-            this.btn45.Name = "btn45";
-            this.btn45.Size = new System.Drawing.Size(81, 38);
-            this.btn45.TabIndex = 75;
-            this.btn45.Text = "45度";
-            this.btn45.UseVisualStyleBackColor = true;
-            this.btn45.Click += new System.EventHandler(this.btn45_Click);
+            // btnPsFile
             // 
             // 
-            // btn60
+            this.btnPsFile.Location = new System.Drawing.Point(32, 22);
+            this.btnPsFile.Name = "btnPsFile";
+            this.btnPsFile.Size = new System.Drawing.Size(127, 38);
+            this.btnPsFile.TabIndex = 1;
+            this.btnPsFile.Text = "打开位置文件";
+            this.btnPsFile.UseVisualStyleBackColor = true;
+            this.btnPsFile.Click += new System.EventHandler(this.btnPsFile_Click);
             // 
             // 
-            this.btn60.Location = new System.Drawing.Point(476, 201);
-            this.btn60.Name = "btn60";
-            this.btn60.Size = new System.Drawing.Size(81, 38);
-            this.btn60.TabIndex = 76;
-            this.btn60.Text = "60度";
-            this.btn60.UseVisualStyleBackColor = true;
-            this.btn60.Click += new System.EventHandler(this.btn60_Click);
+            // 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 = "电压:";
             // 
             // 
             // FormUnitControl
             // FormUnitControl
             // 
             // 
@@ -3553,6 +3605,10 @@
         private System.Windows.Forms.Button btn60;
         private System.Windows.Forms.Button btn60;
         private System.Windows.Forms.Button btn45;
         private System.Windows.Forms.Button btn45;
         private System.Windows.Forms.Button btn30;
         private System.Windows.Forms.Button btn30;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.TextBox txtVoltage;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Label label67;
     }
     }
 }
 }
 
 

+ 39 - 12
HOZProject/FormUnitControl.cs

@@ -1398,11 +1398,11 @@ namespace HOZProject
 
 
         private void btnCreateConfig_Click(object sender, EventArgs e)
         private void btnCreateConfig_Click(object sender, EventArgs e)
         {
         {
-            ConfigFile cfm = new ConfigFile();
+            MeasureParam cfm = new MeasureParam();
             cfm.Is_Photograph = chkWIsP.Checked;
             cfm.Is_Photograph = chkWIsP.Checked;
-            cfm.PT_Depostion = chkWPT.Checked;
-            cfm.PT_ELYFile = txtWPTF.Text;
-            cfm.FIB_ELYFile = txtWFIBF.Text;
+            cfm.PT = chkWPT.Checked;
+            cfm.PTTemp = txtWPTF.Text;
+            cfm.FIBTemp = txtWFIBF.Text;
             cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
             cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
             cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
             cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
             cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
             cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
@@ -1417,11 +1417,12 @@ namespace HOZProject
                 cfm.Correction_Angle = 54.0;
                 cfm.Correction_Angle = 54.0;
             }
             }
             
             
-            cfm.Sample_Type = cbbWYP.Text;
+            cfm.SampleName = cbbWYP.Text;
             cfm.Firm = cbbWCS.Text;
             cfm.Firm = cbbWCS.Text;
 
 
+            ConfigFile cf = new ConfigFile(cfm);
             
             
-            cfm.Save(@"E:\test.cfg");
+            cf.Save(@"E:\test.cfg");
 
 
             List<String> _sT = sT.ToList();
             List<String> _sT = sT.ToList();
             if(_sT.IndexOf(cbbWYP.Text)<0)
             if(_sT.IndexOf(cbbWYP.Text)<0)
@@ -1456,19 +1457,20 @@ namespace HOZProject
 
 
         private void btnReadConfig_Click(object sender, EventArgs e)
         private void btnReadConfig_Click(object sender, EventArgs e)
         {
         {
-            ConfigFile cfm = new ConfigFile();
-            cfm.Read(@"E:\test.cfg");
+            MeasureParam cfm = new MeasureParam();
+            ConfigFile cf = new ConfigFile(cfm);
+            cf.Read(@"E:\test.cfg");
             chkRIsP.Checked = cfm.Is_Photograph;
             chkRIsP.Checked = cfm.Is_Photograph;
-            chkRPT.Checked = cfm.PT_Depostion;
-            txtRPTF.Text = cfm.PT_ELYFile;
-            txtRFIBF.Text = cfm.FIB_ELYFile;
+            chkRPT.Checked = cfm.PT;
+            txtRPTF.Text = cfm.PTTemp;
+            txtRFIBF.Text = cfm.FIBTemp;
             txtRLZ.Text = cfm.Stretch_Magnification.ToString();
             txtRLZ.Text = cfm.Stretch_Magnification.ToString();
             txtRQGF.Text = cfm.Location_Magnification.ToString();
             txtRQGF.Text = cfm.Location_Magnification.ToString();
             txtRQGD.Text = cfm.Location_Voltage.ToString();
             txtRQGD.Text = cfm.Location_Voltage.ToString();
             txtRPZF.Text = cfm.Photograph_Magnification.ToString();
             txtRPZF.Text = cfm.Photograph_Magnification.ToString();
             txtRPZD.Text = cfm.Photograph_Voltage.ToString();
             txtRPZD.Text = cfm.Photograph_Voltage.ToString();
             txtRXZ.Text = cfm.Correction_Angle.ToString();
             txtRXZ.Text = cfm.Correction_Angle.ToString();
-            txtRYP.Text = cfm.Sample_Type;
+            txtRYP.Text = cfm.SampleName;
             txtRCS.Text = cfm.Firm;
             txtRCS.Text = cfm.Firm;
 
 
         }
         }
@@ -1615,5 +1617,30 @@ namespace HOZProject
             txtsample1y.Text = "108.3";
             txtsample1y.Text = "108.3";
             btnrect_Click(null, null);
             btnrect_Click(null, null);
         }
         }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            float ret = iSEM.GetSEMVoltage();
+            if (float.IsNaN(ret))
+            {
+                txtVoltage.Text = "NaN";
+                txtVoltage.Enabled = false;
+                button2.Enabled = false;
+            }
+            else
+            {
+                txtVoltage.Text = ret.ToString();
+                button2.Enabled = true;
+            }
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            float set = 0;
+            if (float.TryParse(txtVoltage.Text, out set))
+            {
+                iSEM.SetSEMVoltage(set);
+            }
+        }
     }
     }
 }
 }

+ 119 - 119
HOZProject/MeasureXML/MeasureStructXml.xml

@@ -1,141 +1,141 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <?xml version="1.0" encoding="utf-8" ?>
 <MeasureList>
 <MeasureList>
   <MeasureFlow Code="1" Name="拍照">
   <MeasureFlow Code="1" Name="拍照">
-    <Step Index="0" Name="" Code="1-0" IsData="False" Title="移动至切割位置" Tooltip="自动定位切割位置"></Step>
-    <Step Index="1" Name="" Code="1-1" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-    <Step Index="2" Name="" Code="1-2" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-    <Step Index="3" Name="" Code="1-3" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-    <Step Index="4" Name="" Code="1-4" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-    <Step Index="5" Name="" Code="1-5" IsData="False" Title="保存信息" Tooltip="保存切孔位置坐标,保存客户返回值信息"></Step>
+    <Step Index="0" Name="" Code="1-0" IsData="False" Title="移动至切割位置" Details="自动定位切割位置"></Step>
+    <Step Index="1" Name="" Code="1-1" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+    <Step Index="2" Name="" Code="1-2" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="3" Name="" Code="1-3" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+    <Step Index="4" Name="" Code="1-4" IsData="False" Title="保存照片" Details="保存照片"></Step>
+    <Step Index="5" Name="" Code="1-5" IsData="False" Title="保存信息" Details="保存切孔位置坐标,保存客户返回值信息"></Step>
 
 
-    <Step Index="6" Name="" Code="1-6" IsData="False" Title="移动至切割位置" Tooltip="自动定位切割位置"></Step>
-    <Step Index="7" Name="" Code="1-7" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-    <Step Index="8" Name="" Code="1-8" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-    <Step Index="9" Name="" Code="1-9" IsData="True" Title="拍照" Tooltip="控制SEM拍照"></Step>
-    <Step Index="10" Name="" Code="1-10" IsData="True" Title="获取偏移信息" Tooltip="显示照片,获取偏移坐标,以及偏移角度"></Step>
-    <Step Index="11" Name="" Code="1-11" IsData="False" Title="移动至切孔位置" Tooltip="根据坐标控制SEM移动到切孔位置,居中"></Step>
-    <Step Index="12" Name="" Code="1-12" IsData="False" Title="验证移动准确性" Tooltip="获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+    <Step Index="6" Name="" Code="1-6" IsData="False" Title="移动至切割位置" Details="自动定位切割位置"></Step>
+    <Step Index="7" Name="" Code="1-7" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+    <Step Index="8" Name="" Code="1-8" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="9" Name="" Code="1-9" IsData="True" Title="拍照" Details="控制SEM拍照"></Step>
+    <Step Index="10" Name="" Code="1-10" IsData="True" Title="获取偏移信息" Details="显示照片,获取偏移坐标,以及偏移角度"></Step>
+    <Step Index="11" Name="" Code="1-11" IsData="False" Title="移动至切孔位置" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
+    <Step Index="12" Name="" Code="1-12" IsData="False" Title="验证移动准确性" Details="获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
 
 
-    <Step Index="13" Name="" Code="1-13" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-    <Step Index="14" Name="" Code="1-14" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-    <Step Index="15" Name="" Code="1-15" IsData="False" Title="角度补偿" Tooltip="设置SEM角度补偿"></Step>
-    <Step Index="16" Name="" Code="1-16" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-    <Step Index="17" Name="" Code="1-17" IsData="False" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-    <Step Index="18" Name="" Code="1-18" IsData="True" Title="获取偏移坐标" Tooltip="将照片传给客户,获取偏移坐标"></Step>
-    <Step Index="19" Name="" Code="1-19" IsData="False" Title="移动至分析位置" Tooltip="根据坐标控制SEM移动到分析位置"></Step>
-    <Step Index="20" Name="" Code="1-20" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+    <Step Index="13" Name="" Code="1-13" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+    <Step Index="14" Name="" Code="1-14" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+    <Step Index="15" Name="" Code="1-15" IsData="False" Title="角度补偿" Details="设置SEM角度补偿"></Step>
+    <Step Index="16" Name="" Code="1-16" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+    <Step Index="17" Name="" Code="1-17" IsData="False" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+    <Step Index="18" Name="" Code="1-18" IsData="True" Title="获取偏移坐标" Details="将照片传给客户,获取偏移坐标"></Step>
+    <Step Index="19" Name="" Code="1-19" IsData="False" Title="移动至分析位置" Details="根据坐标控制SEM移动到分析位置"></Step>
+    <Step Index="20" Name="" Code="1-20" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
     
     
-    <Step Index="21" Name="" Code="1-21" IsData="False" Title="平行校正" Tooltip="控制SEM平行校正,并记录校正前初始值"></Step>
-    <Step Index="22" Name="" Code="1-22" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大到指定参数大小范围"></Step>
-    <Step Index="23" Name="" Code="1-23" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-    <Step Index="24" Name="" Code="1-24" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-    <Step Index="25" Name="" Code="1-25" IsData="False" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-    <Step Index="26" Name="" Code="1-26" IsData="False" Title="取消电子束校正并初始化" Tooltip="控制SEM取消电子束校正,回到初始值"></Step>
-    <Step Index="27" Name="" Code="1-27" IsData="False" Title="自动能谱分析" Tooltip="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
-    <Step Index="28" Name="" Code="1-28" IsData="False" Title="初始化" Tooltip="多切孔进行初始化操作"></Step>
+    <Step Index="21" Name="" Code="1-21" IsData="False" Title="平行校正" Details="控制SEM平行校正,并记录校正前初始值"></Step>
+    <Step Index="22" Name="" Code="1-22" IsData="False" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
+    <Step Index="23" Name="" Code="1-23" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+    <Step Index="24" Name="" Code="1-24" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+    <Step Index="25" Name="" Code="1-25" IsData="False" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+    <Step Index="26" Name="" Code="1-26" IsData="False" Title="取消电子束校正并初始化" Details="控制SEM取消电子束校正,回到初始值"></Step>
+    <Step Index="27" Name="" Code="1-27" IsData="False" Title="自动能谱分析" Details="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
+    <Step Index="28" Name="" Code="1-28" IsData="False" Title="初始化" Details="多切孔进行初始化操作"></Step>
   </MeasureFlow>
   </MeasureFlow>
   <MeasureFlow Code="2" Name="切割">
   <MeasureFlow Code="2" Name="切割">
-      <Step Index="0" Name="" Code="2-0" IsData="False" Title="移动至切割位置" Tooltip="自动定位切割位置"></Step>
-      <Step Index="1" Name="" Code="2-1" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="2" Name="" Code="2-2" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="3" Name="" Code="2-3" IsData="False" Title="角度补偿" Tooltip="设置SEM进行角度补偿"></Step>
-      <Step Index="4" Name="" Code="2-4" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="5" Name="" Code="2-5" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="6" Name="" Code="2-6" IsData="False" Title="FIB拍照参数" Tooltip="设置FIB拍照参数-扫描时间、束流等"></Step>
-      <Step Index="7" Name="" Code="2-7" IsData="False" Title="FIB设置参数" Tooltip="控制FIB自动亮度、对比度"></Step>
-      <Step Index="8" Name="" Code="2-8" IsData="False" Title="FIB拍照" Tooltip=""></Step>
-      <Step Index="9" Name="" Code="2-9" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="10" Name="" Code="2-10" IsData="True" Title="显示照片" Tooltip="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
-      <Step Index="11" Name="" Code="2-11" IsData="False" Title="FIB调整到中心位置" Tooltip="根据梯形坐标控制FIB调整到中心位置"></Step>
-      <Step Index="12" Name="" Code="2-12" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="13" Name="" Code="2-13" IsData="False" Title="保存信息" Tooltip="保存切孔位置坐标,保存客户返回值信息"></Step>  
+      <Step Index="0" Name="" Code="2-0" IsData="False" Title="移动至切割位置" Details="自动定位切割位置"></Step>
+      <Step Index="1" Name="" Code="2-1" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="2" Name="" Code="2-2" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+      <Step Index="3" Name="" Code="2-3" IsData="False" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
+      <Step Index="4" Name="" Code="2-4" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="5" Name="" Code="2-5" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="6" Name="" Code="2-6" IsData="False" Title="FIB拍照参数" Details="设置FIB拍照参数-扫描时间、束流等"></Step>
+      <Step Index="7" Name="" Code="2-7" IsData="False" Title="FIB设置参数" Details="控制FIB自动亮度、对比度"></Step>
+      <Step Index="8" Name="" Code="2-8" IsData="False" Title="FIB拍照" Details=""></Step>
+      <Step Index="9" Name="" Code="2-9" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="10" Name="" Code="2-10" IsData="True" Title="显示照片" Details="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
+      <Step Index="11" Name="" Code="2-11" IsData="False" Title="FIB调整到中心位置" Details="根据梯形坐标控制FIB调整到中心位置"></Step>
+      <Step Index="12" Name="" Code="2-12" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="13" Name="" Code="2-13" IsData="False" Title="保存信息" Details="保存切孔位置坐标,保存客户返回值信息"></Step>  
     
     
-      <Step Index="14" Name="" Code="2-14" IsData="True" Title="设置FIB参数" Tooltip="根据参数设置FIB扫描时间(使图清晰),设置梯形上下边及深度、设置束流等"></Step>
-      <Step Index="15" Name="" Code="2-15" IsData="False" Title="FIB进行切割" Tooltip="控制FIB进行切割"></Step>
-      <Step Index="16" Name="" Code="2-16" IsData="False" Title="设置FIB放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="17" Name="" Code="2-17" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="18" Name="" Code="2-18" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step><Step Index="13" Name="" Code="2-13" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="19" Name="" Code="2-19" IsData="False" Title="设置FIB解冻" Tooltip="设置FIB解冻:先读取状态,如果冻结状态则进行解冻"></Step>
+      <Step Index="14" Name="" Code="2-14" IsData="True" Title="设置FIB参数" Details="根据参数设置FIB扫描时间(使图清晰),设置梯形上下边及深度、设置束流等"></Step>
+      <Step Index="15" Name="" Code="2-15" IsData="False" Title="FIB进行切割" Details="控制FIB进行切割"></Step>
+      <Step Index="16" Name="" Code="2-16" IsData="False" Title="设置FIB放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="17" Name="" Code="2-17" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="18" Name="" Code="2-18" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step><Step Index="13" Name="" Code="2-13" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="19" Name="" Code="2-19" IsData="False" Title="设置FIB解冻" Details="设置FIB解冻:先读取状态,如果冻结状态则进行解冻"></Step>
 
 
-      <Step Index="20" Name="" Code="2-20" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="21" Name="" Code="2-21" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="22" Name="" Code="2-22" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="23" Name="" Code="2-23" IsData="True" Title="显示照片" Tooltip="获取偏移坐标,以及偏移角度"></Step>
-      <Step Index="24" Name="" Code="2-24" IsData="False" Title="移动到切孔位置" Tooltip="根据坐标控制SEM移动到切孔位置,居中"></Step>
-      <Step Index="25" Name="" Code="2-25" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="20" Name="" Code="2-20" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="21" Name="" Code="2-21" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+      <Step Index="22" Name="" Code="2-22" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="23" Name="" Code="2-23" IsData="True" Title="显示照片" Details="获取偏移坐标,以及偏移角度"></Step>
+      <Step Index="24" Name="" Code="2-24" IsData="False" Title="移动到切孔位置" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
+      <Step Index="25" Name="" Code="2-25" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
 
 
-      <Step Index="26" Name="" Code="2-26" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="27" Name="" Code="2-27" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="28" Name="" Code="2-28" IsData="False" Title="角度补偿" Tooltip="设置SEM角度补偿"></Step>
-      <Step Index="29" Name="" Code="2-29" IsData="True" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-      <Step Index="30" Name="" Code="2-30" IsData="True" Title="显示照片" Tooltip="获取偏移坐标"></Step>
-      <Step Index="31" Name="" Code="2-31" IsData="False" Title="移动到分析位置" Tooltip="根据坐标控制SEM移动到分析位置"></Step>
-      <Step Index="32" Name="" Code="2-32" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="26" Name="" Code="2-26" IsData="False" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
+      <Step Index="27" Name="" Code="2-27" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+      <Step Index="28" Name="" Code="2-28" IsData="False" Title="角度补偿" Details="设置SEM角度补偿"></Step>
+      <Step Index="29" Name="" Code="2-29" IsData="True" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+      <Step Index="30" Name="" Code="2-30" IsData="True" Title="显示照片" Details="获取偏移坐标"></Step>
+      <Step Index="31" Name="" Code="2-31" IsData="False" Title="移动到分析位置" Details="根据坐标控制SEM移动到分析位置"></Step>
+      <Step Index="32" Name="" Code="2-32" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
       
       
-      <Step Index="33" Name="" Code="2-33" IsData="False" Title="平行校正" Tooltip="控制SEM平行校正,并记录校正前初始值"></Step>
-      <Step Index="34" Name="" Code="2-34" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="35" Name="" Code="2-35" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="36" Name="" Code="2-36" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="37" Name="" Code="2-37" IsData="False" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-      <Step Index="38" Name="" Code="2-38" IsData="False" Title="取消电子束校正并初始化" Tooltip="控制SEM取消电子束校正,回到初始值"></Step>
+      <Step Index="33" Name="" Code="2-33" IsData="False" Title="平行校正" Details="控制SEM平行校正,并记录校正前初始值"></Step>
+      <Step Index="34" Name="" Code="2-34" IsData="False" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
+      <Step Index="35" Name="" Code="2-35" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+      <Step Index="36" Name="" Code="2-36" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="37" Name="" Code="2-37" IsData="False" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+      <Step Index="38" Name="" Code="2-38" IsData="False" Title="取消电子束校正并初始化" Details="控制SEM取消电子束校正,回到初始值"></Step>
 
 
-      <Step Index="39" Name="" Code="2-39" IsData="False" Title="传入参数" Tooltip="获取SEM Pixel Size 给客户传入参数"></Step>
-      <Step Index="40" Name="" Code="2-40" IsData="True" Title="显示照片" Tooltip="将照片传给客户,客户进行层高分析"></Step>
-      <Step Index="41" Name="" Code="2-41" IsData="False" Title="自动能谱分析" Tooltip="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
-      <Step Index="42" Name="" Code="2-42" IsData="False" Title="初始化" Tooltip="多切孔进行初始化操作"></Step>
+      <Step Index="39" Name="" Code="2-39" IsData="False" Title="传入参数" Details="获取SEM Pixel Size 给客户传入参数"></Step>
+      <Step Index="40" Name="" Code="2-40" IsData="True" Title="显示照片" Details="将照片传给客户,客户进行层高分析"></Step>
+      <Step Index="41" Name="" Code="2-41" IsData="False" Title="自动能谱分析" Details="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
+      <Step Index="42" Name="" Code="2-42" IsData="False" Title="初始化" Details="多切孔进行初始化操作"></Step>
   </MeasureFlow>
   </MeasureFlow>
   <MeasureFlow Code="3" Name="PT+切割">
   <MeasureFlow Code="3" Name="PT+切割">
-      <Step Index="0" Name="" Code="3-0" IsData="False" Title="PT沉积" Tooltip="自动根据样品类型参数确定是否需要PT沉积"></Step>
-      <Step Index="1" Name="" Code="3-1" IsData="False" Title="移动至切割位置" Tooltip="自动定位切割位置"></Step>
-      <Step Index="2" Name="" Code="3-2" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="3" Name="" Code="3-3" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="4" Name="" Code="3-4" IsData="False" Title="角度补偿" Tooltip="设置SEM进行角度补偿"></Step>
-      <Step Index="5" Name="" Code="3-5" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="6" Name="" Code="3-6" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="7" Name="" Code="3-7" IsData="False" Title="FIB拍照参数" Tooltip="设置FIB拍照参数-扫描时间、束流等"></Step>
-      <Step Index="8" Name="" Code="3-8" IsData="False" Title="FIB设置参数" Tooltip="控制FIB自动亮度、对比度"></Step>
-      <Step Index="9" Name="" Code="3-9" IsData="False" Title="FIB拍照" Tooltip=""></Step>
-      <Step Index="10" Name="" Code="3-10" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="11" Name="" Code="3-11" IsData="True" Title="显示照片" Tooltip="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
-      <Step Index="12" Name="" Code="3-12" IsData="False" Title="PT沉积" Tooltip="自动根据样品类型参数确定是否需要PT沉积"></Step>
-      <Step Index="13" Name="" Code="3-13" IsData="False" Title="FIB调整到中心位置" Tooltip="根据梯形坐标控制FIB调整到中心位置"></Step>
-      <Step Index="14" Name="" Code="3-14" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
-      <Step Index="15" Name="" Code="3-15" IsData="False" Title="保存信息" Tooltip="保存切孔位置坐标,保存客户返回值信息"></Step>
+      <Step Index="0" Name="" Code="3-0" IsData="False" Title="PT沉积" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
+      <Step Index="1" Name="" Code="3-1" IsData="False" Title="移动至切割位置" Details="自动定位切割位置"></Step>
+      <Step Index="2" Name="" Code="3-2" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="3" Name="" Code="3-3" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+      <Step Index="4" Name="" Code="3-4" IsData="False" Title="角度补偿" Details="设置SEM进行角度补偿"></Step>
+      <Step Index="5" Name="" Code="3-5" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="6" Name="" Code="3-6" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="7" Name="" Code="3-7" IsData="False" Title="FIB拍照参数" Details="设置FIB拍照参数-扫描时间、束流等"></Step>
+      <Step Index="8" Name="" Code="3-8" IsData="False" Title="FIB设置参数" Details="控制FIB自动亮度、对比度"></Step>
+      <Step Index="9" Name="" Code="3-9" IsData="False" Title="FIB拍照" Details=""></Step>
+      <Step Index="10" Name="" Code="3-10" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="11" Name="" Code="3-11" IsData="True" Title="显示照片" Details="将照片传给客户,返回梯形位置坐标,及样品类型参数"></Step>
+      <Step Index="12" Name="" Code="3-12" IsData="False" Title="PT沉积" Details="自动根据样品类型参数确定是否需要PT沉积"></Step>
+      <Step Index="13" Name="" Code="3-13" IsData="False" Title="FIB调整到中心位置" Details="根据梯形坐标控制FIB调整到中心位置"></Step>
+      <Step Index="14" Name="" Code="3-14" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="15" Name="" Code="3-15" IsData="False" Title="保存信息" Details="保存切孔位置坐标,保存客户返回值信息"></Step>
 
 
-      <Step Index="16" Name="" Code="3-16" IsData="True" Title="设置FIB参数" Tooltip="根据参数设置FIB扫描时间(使图清晰),设置梯形上下边及深度、设置束流等"></Step>
-      <Step Index="17" Name="" Code="3-17" IsData="False" Title="FIB进行切割" Tooltip="控制FIB进行切割"></Step>
-      <Step Index="18" Name="" Code="3-18" IsData="False" Title="设置FIB放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="19" Name="" Code="3-19" IsData="False" Title="保存照片" Tooltip="保存照片"></Step>
-      <Step Index="20" Name="" Code="3-20" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
-      <Step Index="21" Name="" Code="3-21" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="22" Name="" Code="3-22" IsData="False" Title="设置FIB解冻" Tooltip="设置FIB解冻:先读取状态,如果冻结状态则进行解冻"></Step>
-      <Step Index="23" Name="" Code="3-23" IsData="False" Title="拔出PT针" Tooltip="根据样品类型决定是否撤出PT针"></Step>
+      <Step Index="16" Name="" Code="3-16" IsData="True" Title="设置FIB参数" Details="根据参数设置FIB扫描时间(使图清晰),设置梯形上下边及深度、设置束流等"></Step>
+      <Step Index="17" Name="" Code="3-17" IsData="False" Title="FIB进行切割" Details="控制FIB进行切割"></Step>
+      <Step Index="18" Name="" Code="3-18" IsData="False" Title="设置FIB放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="19" Name="" Code="3-19" IsData="False" Title="保存照片" Details="保存照片"></Step>
+      <Step Index="20" Name="" Code="3-20" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比"></Step>
+      <Step Index="21" Name="" Code="3-21" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="22" Name="" Code="3-22" IsData="False" Title="设置FIB解冻" Details="设置FIB解冻:先读取状态,如果冻结状态则进行解冻"></Step>
+      <Step Index="23" Name="" Code="3-23" IsData="False" Title="拔出PT针" Details="根据样品类型决定是否撤出PT针"></Step>
 
 
-      <Step Index="24" Name="" Code="3-24" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大倍数"></Step>
-      <Step Index="25" Name="" Code="3-25" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、亮度、对比度"></Step>
-      <Step Index="26" Name="" Code="3-26" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="27" Name="" Code="3-27" IsData="True" Title="显示照片" Tooltip="获取偏移坐标,以及偏移角度"></Step>
-      <Step Index="28" Name="" Code="3-28" IsData="False" Title="移动到切孔位置" Tooltip="根据坐标控制SEM移动到切孔位置,居中"></Step>
-      <Step Index="29" Name="" Code="3-29" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="24" Name="" Code="3-24" IsData="False" Title="设置放大倍数" Details="控制SEM放大倍数"></Step>
+      <Step Index="25" Name="" Code="3-25" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、亮度、对比度"></Step>
+      <Step Index="26" Name="" Code="3-26" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="27" Name="" Code="3-27" IsData="True" Title="显示照片" Details="获取偏移坐标,以及偏移角度"></Step>
+      <Step Index="28" Name="" Code="3-28" IsData="False" Title="移动到切孔位置" Details="根据坐标控制SEM移动到切孔位置,居中"></Step>
+      <Step Index="29" Name="" Code="3-29" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
 
 
-      <Step Index="30" Name="" Code="3-30" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="31" Name="" Code="3-31" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="32" Name="" Code="3-32" IsData="False" Title="角度补偿" Tooltip="设置SEM角度补偿"></Step>
-      <Step Index="33" Name="" Code="3-33" IsData="True" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-      <Step Index="34" Name="" Code="3-34" IsData="True" Title="显示照片" Tooltip="获取偏移坐标"></Step>
-      <Step Index="35" Name="" Code="3-35" IsData="False" Title="移动到分析位置" Tooltip="根据坐标控制SEM移动到分析位置"></Step>
-      <Step Index="36" Name="" Code="3-36" IsData="False" Title="验证移动准确性" Tooltip="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
+      <Step Index="30" Name="" Code="3-30" IsData="False" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
+      <Step Index="31" Name="" Code="3-31" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+      <Step Index="32" Name="" Code="3-32" IsData="False" Title="角度补偿" Details="设置SEM角度补偿"></Step>
+      <Step Index="33" Name="" Code="3-33" IsData="True" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+      <Step Index="34" Name="" Code="3-34" IsData="True" Title="显示照片" Details="获取偏移坐标"></Step>
+      <Step Index="35" Name="" Code="3-35" IsData="False" Title="移动到分析位置" Details="根据坐标控制SEM移动到分析位置"></Step>
+      <Step Index="36" Name="" Code="3-36" IsData="False" Title="验证移动准确性" Details="验证移动准确性:获取当前SEM中心位置坐标,与客户返回坐标对比,验证是否移动正确"></Step>
 
 
-      <Step Index="37" Name="" Code="3-37" IsData="False" Title="平行校正" Tooltip="控制SEM平行校正,并记录校正前初始值"></Step>
-      <Step Index="38" Name="" Code="3-38" IsData="False" Title="设置放大倍数" Tooltip="控制SEM放大到指定参数大小范围"></Step>
-      <Step Index="39" Name="" Code="3-39" IsData="True" Title="自动对焦" Tooltip="控制SEM自动对焦、消像散、亮度、对比度"></Step>
-      <Step Index="40" Name="" Code="3-40" IsData="True" Title="拍照" Tooltip="控制SEM对分析位置拍照"></Step>
-      <Step Index="41" Name="" Code="3-41" IsData="False" Title="保存照片" Tooltip="设置图片名称、保存图片"></Step>
-      <Step Index="42" Name="" Code="3-42" IsData="False" Title="取消电子束校正并初始化" Tooltip="控制SEM取消电子束校正,回到初始值"></Step>
+      <Step Index="37" Name="" Code="3-37" IsData="False" Title="平行校正" Details="控制SEM平行校正,并记录校正前初始值"></Step>
+      <Step Index="38" Name="" Code="3-38" IsData="False" Title="设置放大倍数" Details="控制SEM放大到指定参数大小范围"></Step>
+      <Step Index="39" Name="" Code="3-39" IsData="True" Title="自动对焦" Details="控制SEM自动对焦、消像散、亮度、对比度"></Step>
+      <Step Index="40" Name="" Code="3-40" IsData="True" Title="拍照" Details="控制SEM对分析位置拍照"></Step>
+      <Step Index="41" Name="" Code="3-41" IsData="False" Title="保存照片" Details="设置图片名称、保存图片"></Step>
+      <Step Index="42" Name="" Code="3-42" IsData="False" Title="取消电子束校正并初始化" Details="控制SEM取消电子束校正,回到初始值"></Step>
 
 
-      <Step Index="43" Name="" Code="3-43" IsData="False" Title="传入参数" Tooltip="获取SEM Pixel Size 给客户传入参数"></Step>
-      <Step Index="44" Name="" Code="3-44" IsData="True" Title="显示照片" Tooltip="将照片传给客户,客户进行层高分析"></Step>
-      <Step Index="45" Name="" Code="3-45" IsData="False" Title="自动能谱分析" Tooltip="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
-      <Step Index="46" Name="" Code="3-46" IsData="False" Title="初始化" Tooltip="多切孔进行初始化操作"></Step>
+      <Step Index="43" Name="" Code="3-43" IsData="False" Title="传入参数" Details="获取SEM Pixel Size 给客户传入参数"></Step>
+      <Step Index="44" Name="" Code="3-44" IsData="True" Title="显示照片" Details="将照片传给客户,客户进行层高分析"></Step>
+      <Step Index="45" Name="" Code="3-45" IsData="False" Title="自动能谱分析" Details="确定能谱位置、控制牛津打能谱、能谱分析-面扫+线扫"></Step>
+      <Step Index="46" Name="" Code="3-46" IsData="False" Title="初始化" Details="多切孔进行初始化操作"></Step>
     </MeasureFlow>
     </MeasureFlow>
 </MeasureList>
 </MeasureList>

+ 27 - 12
HOZProject/UserControls/UCTimeLine.cs

@@ -118,7 +118,7 @@ namespace HOZProject
         /// <summary>
         /// <summary>
         /// The items
         /// The items
         /// </summary>
         /// </summary>
-        TimeLineItem[] items;
+        public TimeLineItem[] items;
 
 
         /// <summary>
         /// <summary>
         /// Gets or sets the items.
         /// Gets or sets the items.
@@ -137,7 +137,7 @@ namespace HOZProject
         /// <summary>
         /// <summary>
         /// Initializes a new instance of the <see cref="UCTimeLine"/> class.
         /// Initializes a new instance of the <see cref="UCTimeLine"/> class.
         /// </summary>
         /// </summary>
-        public UCTimeLine()
+        public UCTimeLine(TimeLineItem[] tlItem)
         {
         {
             this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
             this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
             this.SetStyle(ControlStyles.DoubleBuffer, true);
             this.SetStyle(ControlStyles.DoubleBuffer, true);
@@ -146,15 +146,15 @@ namespace HOZProject
             this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
             this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
             this.SetStyle(ControlStyles.UserPaint, true);
             this.SetStyle(ControlStyles.UserPaint, true);
             InitializeComponent();
             InitializeComponent();
-            items = new TimeLineItem[4];
-            for (int i = 0; i < 4; i++)
-            {
-                items[i] = new TimeLineItem()
-                {
-                    Title = DateTime.Now.AddMonths(-1 * (3 - i)).ToString("yyyy年MM月"),
-                    Details = DateTime.Now.AddMonths(-1 * (3 - i)).ToString("yyyy年MM月")
-                };
-            }
+            items = tlItem;
+            //for (int i = 0; i < 4; i++)
+            //{
+            //    items[i] = new TimeLineItem()
+            //    {
+            //        Title = DateTime.Now.AddMonths(-1 * (3 - i)).ToString("yyyy年MM月"),
+            //        Details = DateTime.Now.AddMonths(-1 * (3 - i)).ToString("yyyy年MM月")
+            //    };
+            //}
             ReloadItems();
             ReloadItems();
 
 
         }
         }
@@ -162,7 +162,7 @@ namespace HOZProject
         /// <summary>
         /// <summary>
         /// Reloads the items.
         /// Reloads the items.
         /// </summary>
         /// </summary>
-        private void ReloadItems()
+        public void ReloadItems()
         {
         {
             try
             try
             {
             {
@@ -265,5 +265,20 @@ namespace HOZProject
         /// </summary>
         /// </summary>
         /// <value>The details.</value>
         /// <value>The details.</value>
         public string Details { get; set; }
         public string Details { get; set; }
+        /// <summary>
+        /// Gets or sets the Code.
+        /// </summary>
+        /// <value>The Code.</value>
+        public string Code { get; set; }
+        /// <summary>
+        /// Gets or sets the State.
+        /// </summary>
+        /// <value>The State.</value>
+        public int State { get; set; }
+        /// <summary>
+        /// Gets or sets the IsData.
+        /// </summary>
+        /// <value>The IsData.</value>
+        public bool IsData { get; set; }
     }
     }
 }
 }

+ 1 - 9
HOZProject/UserControls/UControl_CutHole.cs

@@ -61,17 +61,9 @@ namespace HOZProject
             ClearProcessControls();
             ClearProcessControls();
             //显示切孔参数信息
             //显示切孔参数信息
             UControl_ParaInfo uControl_ParaInfo = new UControl_ParaInfo(FormHOZMainObject);
             UControl_ParaInfo uControl_ParaInfo = new UControl_ParaInfo(FormHOZMainObject);
-            //UCTimeLine uControl_ParaInfo = new UCTimeLine();
+            
             FormHOZMainObject.plProcess.Width = uControl_ParaInfo.Width;
             FormHOZMainObject.plProcess.Width = uControl_ParaInfo.Width;
             FormHOZMainObject.plProcess.Height = uControl_ParaInfo.Height;
             FormHOZMainObject.plProcess.Height = uControl_ParaInfo.Height;
-            //if ((this.Location.Y + uControl_ParaInfo.Height) > FormHOZMainObject.Height)
-            //{
-            //    uControl_ParaInfo.Location = new Point(this.Left, this.Bottom - this.Top);
-            //}
-            //else
-            //{
-            //    uControl_ParaInfo.Location = new Point(this.Location.X, this.Location.Y);
-            //}
             List<CutHole> cutHoleList = FormHOZMainObject.m_MeasureFile.ListCutHole;
             List<CutHole> cutHoleList = FormHOZMainObject.m_MeasureFile.ListCutHole;
             foreach (CutHole cutHoleItem in cutHoleList)
             foreach (CutHole cutHoleItem in cutHoleList)
             {
             {

+ 35 - 19
HOZProject/UserControls/UControl_Init.Designer.cs

@@ -31,6 +31,7 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UControl_Init));
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UControl_Init));
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.pbClose = new System.Windows.Forms.PictureBox();
             this.tbCutHoleFilePath = new System.Windows.Forms.TextBox();
             this.tbCutHoleFilePath = new System.Windows.Forms.TextBox();
             this.txtWPTF = new System.Windows.Forms.TextBox();
             this.txtWPTF = new System.Windows.Forms.TextBox();
             this.lblCutHoleCount = new System.Windows.Forms.Label();
             this.lblCutHoleCount = new System.Windows.Forms.Label();
@@ -69,8 +70,9 @@
             this.pbFIBTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbFIBTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbPTTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbPTTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbCutHoleFile = new System.Windows.Forms.PictureBox();
             this.pbCutHoleFile = new System.Windows.Forms.PictureBox();
-            this.pbClose = new System.Windows.Forms.PictureBox();
+            this.btnSaveDefalutPara = new System.Windows.Forms.Button();
             this.panel1.SuspendLayout();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).BeginInit();
@@ -82,7 +84,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // label1
             // label1
@@ -107,6 +108,20 @@
             this.panel1.Size = new System.Drawing.Size(576, 33);
             this.panel1.Size = new System.Drawing.Size(576, 33);
             this.panel1.TabIndex = 3;
             this.panel1.TabIndex = 3;
             // 
             // 
+            // pbClose
+            // 
+            this.pbClose.BackColor = System.Drawing.Color.Black;
+            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
+            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbClose.Location = new System.Drawing.Point(544, 0);
+            this.pbClose.Name = "pbClose";
+            this.pbClose.Size = new System.Drawing.Size(32, 33);
+            this.pbClose.TabIndex = 106;
+            this.pbClose.TabStop = false;
+            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
             // tbCutHoleFilePath
             // tbCutHoleFilePath
             // 
             // 
             this.tbCutHoleFilePath.Font = new System.Drawing.Font("宋体", 10F);
             this.tbCutHoleFilePath.Font = new System.Drawing.Font("宋体", 10F);
@@ -315,7 +330,7 @@
             this.label54.Name = "label54";
             this.label54.Name = "label54";
             this.label54.Size = new System.Drawing.Size(91, 14);
             this.label54.Size = new System.Drawing.Size(91, 14);
             this.label54.TabIndex = 89;
             this.label54.TabIndex = 89;
-            this.label54.Text = "拍照放大数";
+            this.label54.Text = "拍照放大数";
             // 
             // 
             // label46
             // label46
             // 
             // 
@@ -339,7 +354,7 @@
             this.label42.Name = "label42";
             this.label42.Name = "label42";
             this.label42.Size = new System.Drawing.Size(119, 14);
             this.label42.Size = new System.Drawing.Size(119, 14);
             this.label42.TabIndex = 87;
             this.label42.TabIndex = 87;
-            this.label42.Text = "定位切割放大数";
+            this.label42.Text = "定位切割放大数";
             // 
             // 
             // label38
             // label38
             // 
             // 
@@ -351,7 +366,7 @@
             this.label38.Name = "label38";
             this.label38.Name = "label38";
             this.label38.Size = new System.Drawing.Size(119, 14);
             this.label38.Size = new System.Drawing.Size(119, 14);
             this.label38.TabIndex = 86;
             this.label38.TabIndex = 86;
-            this.label38.Text = "拉直操作放大数";
+            this.label38.Text = "拉直操作放大数";
             // 
             // 
             // chkWIsP
             // chkWIsP
             // 
             // 
@@ -432,7 +447,7 @@
             // 
             // 
             this.btnCreateConfig.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnCreateConfig.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnCreateConfig.ForeColor = System.Drawing.Color.Black;
             this.btnCreateConfig.ForeColor = System.Drawing.Color.Black;
-            this.btnCreateConfig.Location = new System.Drawing.Point(433, 381);
+            this.btnCreateConfig.Location = new System.Drawing.Point(14, 384);
             this.btnCreateConfig.Margin = new System.Windows.Forms.Padding(2);
             this.btnCreateConfig.Margin = new System.Windows.Forms.Padding(2);
             this.btnCreateConfig.Name = "btnCreateConfig";
             this.btnCreateConfig.Name = "btnCreateConfig";
             this.btnCreateConfig.Size = new System.Drawing.Size(135, 41);
             this.btnCreateConfig.Size = new System.Drawing.Size(135, 41);
@@ -593,19 +608,18 @@
             this.pbCutHoleFile.TabStop = false;
             this.pbCutHoleFile.TabStop = false;
             this.pbCutHoleFile.Click += new System.EventHandler(this.pbCutHoleFile_Click);
             this.pbCutHoleFile.Click += new System.EventHandler(this.pbCutHoleFile_Click);
             // 
             // 
-            // pbClose
+            // btnSaveDefalutPara
             // 
             // 
-            this.pbClose.BackColor = System.Drawing.Color.Black;
-            this.pbClose.BackgroundImage = global::HOZProject.Properties.Resources.exit_Gray;
-            this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
-            this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.pbClose.Location = new System.Drawing.Point(544, 0);
-            this.pbClose.Name = "pbClose";
-            this.pbClose.Size = new System.Drawing.Size(32, 33);
-            this.pbClose.TabIndex = 106;
-            this.pbClose.TabStop = false;
-            this.pbClose.Click += new System.EventHandler(this.btnClose_Click);
+            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.Margin = new System.Windows.Forms.Padding(2);
+            this.btnSaveDefalutPara.Name = "btnSaveDefalutPara";
+            this.btnSaveDefalutPara.Size = new System.Drawing.Size(135, 41);
+            this.btnSaveDefalutPara.TabIndex = 112;
+            this.btnSaveDefalutPara.Text = "保存默认值";
+            this.btnSaveDefalutPara.UseVisualStyleBackColor = true;
+            this.btnSaveDefalutPara.Click += new System.EventHandler(this.btnSaveDefalutPara_Click);
             // 
             // 
             // UControl_Init
             // UControl_Init
             // 
             // 
@@ -613,6 +627,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BackColor = System.Drawing.Color.Black;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.btnSaveDefalutPara);
             this.Controls.Add(this.label50);
             this.Controls.Add(this.label50);
             this.Controls.Add(this.pbDelWLZ);
             this.Controls.Add(this.pbDelWLZ);
             this.Controls.Add(this.pbDelWQGD);
             this.Controls.Add(this.pbDelWQGD);
@@ -659,6 +674,7 @@
             this.Load += new System.EventHandler(this.UControl_Init_Load);
             this.Load += new System.EventHandler(this.UControl_Init_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWQGD)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbWQGFDel)).EndInit();
@@ -670,7 +686,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbFIBTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPTTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbCutHoleFile)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
@@ -720,5 +735,6 @@
         private System.Windows.Forms.PictureBox pbDelWQGD;
         private System.Windows.Forms.PictureBox pbDelWQGD;
         private System.Windows.Forms.PictureBox pbWQGFDel;
         private System.Windows.Forms.PictureBox pbWQGFDel;
         private System.Windows.Forms.PictureBox pbDelWLZ;
         private System.Windows.Forms.PictureBox pbDelWLZ;
+        private System.Windows.Forms.Button btnSaveDefalutPara;
     }
     }
 }
 }

+ 91 - 42
HOZProject/UserControls/UControl_Init.cs

@@ -92,7 +92,7 @@ namespace HOZProject
         }
         }
         #endregion
         #endregion
 
 
-        #region 加载PT模板文件,生成切孔列表
+        #region 加载PT模板文件
         private void pbTemplateFile_Click(object sender, EventArgs e)
         private void pbTemplateFile_Click(object sender, EventArgs e)
         {
         {
             string FilePathName;
             string FilePathName;
@@ -110,12 +110,12 @@ namespace HOZProject
             {
             {
                 FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);  //绝对路径
                 FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);  //绝对路径
                 fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
                 fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
-                this.txtWPTF.Text = fileNameWithoutExtension;
+                this.txtWPTF.Text = FilePathName;
             }
             }
         }
         }
         #endregion
         #endregion
 
 
-        #region 加载FIB模板文件,生成切孔列表
+        #region 加载FIB模板文件
         private void pbFIBTemplateFile_Click(object sender, EventArgs e)
         private void pbFIBTemplateFile_Click(object sender, EventArgs e)
         {
         {
             string FilePathName;
             string FilePathName;
@@ -133,7 +133,7 @@ namespace HOZProject
             {
             {
                 FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);  //绝对路径
                 FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);  //绝对路径
                 fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
                 fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(FilePathName);
-                this.txtWFIBF.Text = fileNameWithoutExtension;
+                this.txtWFIBF.Text = FilePathName;
             }
             }
         }
         }
         #endregion
         #endregion
@@ -141,11 +141,15 @@ namespace HOZProject
         #region 创建与读取样品参数文件
         #region 创建与读取样品参数文件
         private void btnCreateConfig_Click(object sender, EventArgs e)
         private void btnCreateConfig_Click(object sender, EventArgs e)
         {
         {
-            ConfigFile cfm = new ConfigFile();
+            SaveTemplateFile();
+        }
+        private void SaveTemplateFile()
+        {
+            MeasureParam cfm = new MeasureParam();
             cfm.Is_Photograph = chkWIsP.Checked;
             cfm.Is_Photograph = chkWIsP.Checked;
-            cfm.PT_Depostion = chkWPT.Checked;
-            cfm.PT_ELYFile = txtWPTF.Text;
-            cfm.FIB_ELYFile = txtWFIBF.Text;
+            cfm.PT = chkWPT.Checked;
+            cfm.PTTemp = txtWPTF.Text;
+            cfm.FIBTemp = txtWFIBF.Text;
             cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
             cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
             cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
             cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
             cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
             cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
@@ -160,14 +164,14 @@ namespace HOZProject
                 cfm.Correction_Angle = 54.0;
                 cfm.Correction_Angle = 54.0;
             }
             }
 
 
-            cfm.Sample_Type = cbbWYP.Text;
+            cfm.SampleName = cbbWYP.Text;
             cfm.Firm = cbbWCS.Text;
             cfm.Firm = cbbWCS.Text;
-
+            ConfigFile cf = new ConfigFile(cfm);
             SaveFileDialog saveFileDialog = new SaveFileDialog();
             SaveFileDialog saveFileDialog = new SaveFileDialog();
             saveFileDialog.Filter = "样品参数文件|*.cfg";
             saveFileDialog.Filter = "样品参数文件|*.cfg";
             if (saveFileDialog.ShowDialog() == DialogResult.OK)
             if (saveFileDialog.ShowDialog() == DialogResult.OK)
             {
             {
-                cfm.Save(saveFileDialog.FileName);
+                cf.Save(saveFileDialog.FileName);
             }
             }
             else
             else
             {
             {
@@ -176,12 +180,12 @@ namespace HOZProject
             //编辑Config文件
             //编辑Config文件
             EditConfig();
             EditConfig();
         }
         }
-
         /// <summary>
         /// <summary>
         /// 编辑confing 文件信息
         /// 编辑confing 文件信息
         /// </summary>
         /// </summary>
         public void EditConfig()
         public void EditConfig()
         {
         {
+            //设置数据源信息
             //样品类型
             //样品类型
             List<String> _sT = sT.ToList();
             List<String> _sT = sT.ToList();
             if (_sT.IndexOf(cbbWYP.Text) < 0)
             if (_sT.IndexOf(cbbWYP.Text) < 0)
@@ -238,9 +242,44 @@ namespace HOZProject
                 string wWLZ = string.Join(",", _WLZ.ToArray());
                 string wWLZ = string.Join(",", _WLZ.ToArray());
                 config.AppSettings.Settings["WLZ"].Value = wWLZ;
                 config.AppSettings.Settings["WLZ"].Value = wWLZ;
             }
             }
+
+            MeasureParam cfm = new MeasureParam();
+            cfm.Is_Photograph = chkWIsP.Checked;
+            cfm.PT = chkWPT.Checked;
+            cfm.PTTemp = txtWPTF.Text;
+            cfm.FIBTemp = txtWFIBF.Text;
+            cfm.Stretch_Magnification = Convert.ToDouble(cbbWLZ.Text);
+            cfm.Location_Magnification = Convert.ToDouble(cbbWQGF.Text);
+            cfm.Location_Voltage = Convert.ToDouble(cbbWQGD.Text);
+            cfm.Photograph_Magnification = Convert.ToDouble(cbbWPZF.Text);
+            cfm.Photograph_Voltage = Convert.ToDouble(cbbWPZD.Text);
+            if (cbbWXZ.SelectedIndex == 0)
+            {
+                cfm.Correction_Angle = 36.0;
+            }
+            else
+            {
+                cfm.Correction_Angle = 54.0;
+            }
+
+            cfm.SampleName = cbbWYP.Text;
+            cfm.Firm = cbbWCS.Text;
+            //设置配置文件默认值
+            config.AppSettings.Settings["Is_Photograph"].Value = cfm.Is_Photograph.ToString();
+            config.AppSettings.Settings["PT_Depostion"].Value = cfm.PT.ToString();
+            config.AppSettings.Settings["PT_ELYFile"].Value = cfm.PTTemp;
+            config.AppSettings.Settings["FIB_ELYFile"].Value = cfm.FIBTemp;
+            config.AppSettings.Settings["Stretch_Magnification"].Value = cfm.Stretch_Magnification.ToString();
+            config.AppSettings.Settings["Location_Magnification"].Value = cfm.Location_Magnification.ToString();
+            config.AppSettings.Settings["Location_Voltage"].Value = cfm.Location_Voltage.ToString();
+            config.AppSettings.Settings["Photograph_Magnification"].Value = cfm.Photograph_Magnification.ToString();
+            config.AppSettings.Settings["Photograph_Voltage"].Value = cfm.Photograph_Voltage.ToString();
+            config.AppSettings.Settings["Correction_Angle"].Value = cfm.Correction_Angle.ToString();
+            config.AppSettings.Settings["SampleName"].Value = cfm.SampleName;
+            config.AppSettings.Settings["Firms"].Value = cfm.Firm;
+
             config.Save(ConfigurationSaveMode.Modified);
             config.Save(ConfigurationSaveMode.Modified);
             ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
             ConfigurationManager.RefreshSection("appSettings");//重新加载新的配置文件
-            ReloadConfig();
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -340,13 +379,13 @@ namespace HOZProject
             cbbWQGF.Items.Clear();
             cbbWQGF.Items.Clear();
             cbbWLZ.Items.Clear();
             cbbWLZ.Items.Clear();
 
 
-            string sample_Type = ConfigurationManager.AppSettings["Sample_Type"];
-            string firm = ConfigurationManager.AppSettings["Firm"];
-            string WPZDTemp = ConfigurationManager.AppSettings["WPZD"];
-            string WPZFTemp = ConfigurationManager.AppSettings["WPZF"];
-            string WQGDTemp = ConfigurationManager.AppSettings["WQGD"];
-            string WQGFTemp = ConfigurationManager.AppSettings["WQGF"];
-            string WLZTemp = ConfigurationManager.AppSettings["WLZ"];
+            string sample_Type = config.AppSettings.Settings["Sample_Type"].Value.ToString();
+            string firm = config.AppSettings.Settings["Firm"].Value.ToString();
+            string WPZDTemp = config.AppSettings.Settings["WPZD"].Value.ToString();
+            string WPZFTemp = config.AppSettings.Settings["WPZF"].Value.ToString();
+            string WQGDTemp = config.AppSettings.Settings["WQGD"].Value.ToString();
+            string WQGFTemp = config.AppSettings.Settings["WQGF"].Value.ToString();
+            string WLZTemp = config.AppSettings.Settings["WLZ"].Value.ToString();
             //样品类型
             //样品类型
             sT = sample_Type.Split(',');
             sT = sample_Type.Split(',');
             BindComboxData(cbbWYP, sT);
             BindComboxData(cbbWYP, sT);
@@ -368,15 +407,20 @@ namespace HOZProject
             //拉直操作放大位数
             //拉直操作放大位数
             WLZ = WLZTemp.Split(',');
             WLZ = WLZTemp.Split(',');
             BindComboxData(cbbWLZ, WLZ);
             BindComboxData(cbbWLZ, WLZ);
-
-            cbbWYP.SelectedIndex = 0;
-            cbbWCS.SelectedIndex = 0;
-            cbbWXZ.SelectedIndex = 0;
-            cbbWPZD.SelectedIndex = 0;
-            cbbWPZF.SelectedIndex = 0;
-            cbbWLZ.SelectedIndex = 0;
-            cbbWQGD.SelectedIndex = 0;
-            cbbWQGF.SelectedIndex = 0;
+            
+            //设置配置文件默认值
+            chkWIsP.Checked=Convert.ToBoolean(config.AppSettings.Settings["Is_Photograph"].Value);
+            chkWPT.Checked = Convert.ToBoolean(config.AppSettings.Settings["PT_Depostion"].Value);
+            txtWPTF.Text = config.AppSettings.Settings["PT_ELYFile"].Value;
+            txtWFIBF.Text = config.AppSettings.Settings["FIB_ELYFile"].Value;
+            cbbWLZ.Text = config.AppSettings.Settings["Stretch_Magnification"].Value;
+            cbbWQGF.Text = config.AppSettings.Settings["Location_Magnification"].Value;
+            cbbWQGD.Text = config.AppSettings.Settings["Location_Voltage"].Value;
+            cbbWPZF.Text = config.AppSettings.Settings["Photograph_Magnification"].Value;
+            cbbWPZD.Text = config.AppSettings.Settings["Photograph_Voltage"].Value;
+            cbbWXZ.Text = config.AppSettings.Settings["Correction_Angle"].Value;
+            cbbWYP.Text = config.AppSettings.Settings["SampleName"].Value;
+            cbbWCS.Text = config.AppSettings.Settings["Firms"].Value;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -387,20 +431,20 @@ namespace HOZProject
             if (!ReadConfigPath.Equals(""))
             if (!ReadConfigPath.Equals(""))
             {
             {
                 ReloadConfig();
                 ReloadConfig();
-                ConfigFile cfm = new ConfigFile();
+                ConfigFile cfm = new ConfigFile(new MeasureParam());
                 cfm.Read(ReadConfigPath);
                 cfm.Read(ReadConfigPath);
-                chkWIsP.Checked = cfm.Is_Photograph;
-                chkWPT.Checked = cfm.PT_Depostion;
-                txtWPTF.Text = cfm.PT_ELYFile;
-                txtWFIBF.Text = cfm.FIB_ELYFile;
-                cbbWLZ.Text = cfm.Stretch_Magnification.ToString();
-                cbbWQGF.Text = cfm.Location_Magnification.ToString();
-                cbbWQGD.Text = cfm.Location_Voltage.ToString();
-                cbbWPZF.Text = cfm.Photograph_Magnification.ToString();
-                cbbWPZD.Text = cfm.Photograph_Voltage.ToString();
-                cbbWXZ.Text = cfm.Correction_Angle.ToString();
-                cbbWYP.Text = cfm.Sample_Type;
-                cbbWCS.Text = cfm.Firm;
+                chkWIsP.Checked = cfm.m_Config.Is_Photograph;
+                chkWPT.Checked = cfm.m_Config.PT;
+                txtWPTF.Text = cfm.m_Config.PTTemp;
+                txtWFIBF.Text = cfm.m_Config.FIBTemp;
+                cbbWLZ.Text = cfm.m_Config.Stretch_Magnification.ToString();
+                cbbWQGF.Text = cfm.m_Config.Location_Magnification.ToString();
+                cbbWQGD.Text = cfm.m_Config.Location_Voltage.ToString();
+                cbbWPZF.Text = cfm.m_Config.Photograph_Magnification.ToString();
+                cbbWPZD.Text = cfm.m_Config.Photograph_Voltage.ToString();
+                cbbWXZ.Text = cfm.m_Config.Correction_Angle.ToString();
+                cbbWYP.Text = cfm.m_Config.SampleName;
+                cbbWCS.Text = cfm.m_Config.Firm;
             }
             }
         }
         }
         #endregion
         #endregion
@@ -456,5 +500,10 @@ namespace HOZProject
             }
             }
         }
         }
         #endregion
         #endregion
+
+        private void btnSaveDefalutPara_Click(object sender, EventArgs e)
+        {
+            EditConfig();
+        }
     }
     }
 }
 }

+ 14 - 0
HOZProject/UserControls/UControl_ParaInfo.Designer.cs

@@ -61,6 +61,7 @@
             this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.panel4 = new System.Windows.Forms.Panel();
             this.panel4 = new System.Windows.Forms.Panel();
             this.label8 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
+            this.plTimeLine = new System.Windows.Forms.Panel();
             this.panel1.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             this.plMeasureFlow.SuspendLayout();
             this.plMeasureFlow.SuspendLayout();
@@ -115,6 +116,8 @@
             // CkIsSwitch
             // CkIsSwitch
             // 
             // 
             this.CkIsSwitch.AutoSize = true;
             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(9, 9);
             this.CkIsSwitch.Name = "CkIsSwitch";
             this.CkIsSwitch.Name = "CkIsSwitch";
             this.CkIsSwitch.Size = new System.Drawing.Size(15, 14);
             this.CkIsSwitch.Size = new System.Drawing.Size(15, 14);
@@ -318,6 +321,7 @@
             // 
             // 
             // plMeasureFlow
             // plMeasureFlow
             // 
             // 
+            this.plMeasureFlow.Controls.Add(this.plTimeLine);
             this.plMeasureFlow.Controls.Add(this.lvMeasureFlow);
             this.plMeasureFlow.Controls.Add(this.lvMeasureFlow);
             this.plMeasureFlow.Controls.Add(this.panel3);
             this.plMeasureFlow.Controls.Add(this.panel3);
             this.plMeasureFlow.Controls.Add(this.panel4);
             this.plMeasureFlow.Controls.Add(this.panel4);
@@ -349,6 +353,7 @@
             this.lvMeasureFlow.TabStop = false;
             this.lvMeasureFlow.TabStop = false;
             this.lvMeasureFlow.UseCompatibleStateImageBehavior = false;
             this.lvMeasureFlow.UseCompatibleStateImageBehavior = false;
             this.lvMeasureFlow.View = System.Windows.Forms.View.List;
             this.lvMeasureFlow.View = System.Windows.Forms.View.List;
+            this.lvMeasureFlow.Visible = false;
             // 
             // 
             // imageList1
             // imageList1
             // 
             // 
@@ -412,6 +417,14 @@
             this.label8.TabIndex = 3;
             this.label8.TabIndex = 3;
             this.label8.Text = "XXXX";
             this.label8.Text = "XXXX";
             // 
             // 
+            // plTimeLine
+            // 
+            this.plTimeLine.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.plTimeLine.Location = new System.Drawing.Point(0, 30);
+            this.plTimeLine.Name = "plTimeLine";
+            this.plTimeLine.Size = new System.Drawing.Size(345, 383);
+            this.plTimeLine.TabIndex = 8;
+            // 
             // UControl_ParaInfo
             // UControl_ParaInfo
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -486,5 +499,6 @@
         private System.Windows.Forms.Panel panel4;
         private System.Windows.Forms.Panel panel4;
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.PictureBox pbClose;
         private System.Windows.Forms.PictureBox pbClose;
+        private System.Windows.Forms.Panel plTimeLine;
     }
     }
 }
 }

+ 40 - 4
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -8,6 +8,8 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.Windows.Forms;
 using MeasureData;
 using MeasureData;
+using FileManager;
+using System.Xml;
 
 
 namespace HOZProject
 namespace HOZProject
 {
 {
@@ -44,6 +46,7 @@ namespace HOZProject
         {
         {
             InitializeComponent();
             InitializeComponent();
             FormHOZMainObject = formHOZ;
             FormHOZMainObject = formHOZ;
+            ShowMeasureFlow("1");
         }
         }
 
 
         private void btnClose_Click(object sender, EventArgs e)
         private void btnClose_Click(object sender, EventArgs e)
@@ -66,11 +69,14 @@ namespace HOZProject
             }
             }
         }
         }
 
 
-        public void ShowUCTimeLine()
+        public void ShowUCTimeLine(TimeLineItem[] tlItem)
         {
         {
-            UCTimeLine uControl_ParaInfo = new UCTimeLine();
-            uControl_ParaInfo.Dock = DockStyle.Fill;
-            plMeasureFlow.Controls.Add(uControl_ParaInfo);
+            if (plTimeLine.Controls.Count == 0)
+            {
+                UCTimeLine uCTimeLine = new UCTimeLine(tlItem);
+                uCTimeLine.Dock = DockStyle.Fill;
+                plTimeLine.Controls.Add(uCTimeLine);
+            }
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -99,7 +105,37 @@ namespace HOZProject
         /// <param name="flowCode"></param>
         /// <param name="flowCode"></param>
         private void ShowMeasureFlow(string flowCode)
         private void ShowMeasureFlow(string flowCode)
         {
         {
+            TimeLineItem[]  tlItem = GetMeasureFlowStructInfo(flowCode);
+            if (tlItem != null)
+            {
+                ShowUCTimeLine(tlItem);
+            }
+        }
+        private TimeLineItem[] GetMeasureFlowStructInfo(string MeasureCode)
+        {
+            string xmlfullname = Application.StartupPath+ @"\MeasureXML\MeasureStructXml.xml";
+            XmlNodeList nodeList = XmlManager.GetXmlMeasureFlowNodeInfo(xmlfullname, MeasureCode);
+            if (nodeList != null)
+            {
+                return XmlConvertTimeListItem(nodeList);
+            }
+            return null;
+        }
 
 
+        private TimeLineItem[] XmlConvertTimeListItem(XmlNodeList nodeList)
+        {
+            TimeLineItem[] timeLineItem = new TimeLineItem[nodeList.Count];
+            for (int i = 0; i < nodeList.Count; i++)
+            {
+                TimeLineItem tlItem = new TimeLineItem();
+                tlItem.Details = nodeList[i].Attributes["Details"].Value;
+                tlItem.Code = nodeList[i].Attributes["Code"].Value;
+                tlItem.State = 0;
+                tlItem.Title = nodeList[i].Attributes["Title"].Value;
+                tlItem.IsData = Convert.ToBoolean(nodeList[i].Attributes["IsData"].Value);
+                timeLineItem[i] = tlItem;
+            }
+            return timeLineItem;
         }
         }
     }
     }
 }
 }

+ 1 - 1
HOZProject/UserControls/UControl_ParaInfo.resx

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

+ 27 - 126
MeasureData/ConfigFile.cs

@@ -13,111 +13,12 @@ namespace MeasureData
     public class ConfigFile : ISlo
     public class ConfigFile : ISlo
     {
     {
         #region 内容
         #region 内容
-        //是否仅拍照
-        private Boolean is_Photograph;
-        public Boolean Is_Photograph
-        {
-            get { return this.is_Photograph; }
-            set { this.is_Photograph = value; }
-        }
-
-        //是否PT沉积
-        private Boolean pt_Depostion;
-        public Boolean PT_Depostion
-        {
-            get { return this.pt_Depostion; }
-            set { this.pt_Depostion = value; }
-        }
-
-        //PT使用的ELY文件
-        private String pt_ELYFile;
-        public String PT_ELYFile
-        {
-            get { return this.pt_ELYFile; }
-            set { this.pt_ELYFile = value; }
-        }
-
-        //FIB使用的ELY文件
-        private String fib_ELYFile;
-        public String FIB_ELYFile
-        {
-            get { return this.fib_ELYFile; }
-            set { this.fib_ELYFile = value; }
-        }
-
-        //拉直操作需要的放大位数
-        private double stretch_Magnification;
-        public double Stretch_Magnification
-        {
-            get { return this.stretch_Magnification; }
-            set { this.stretch_Magnification = value; }
-        }
-
-        //定位切割位置的放大倍数
-        private double location_Magnification;
-        public double Location_Magnification
-        {
-            get { return this.location_Magnification; }
-            set { this.location_Magnification = value; }
-        }
-
-        //定位切割位置的工作电压
-        private double location_Voltage;
-        public double Location_Voltage
-        {
-            get { return this.location_Voltage; }
-            set { this.location_Voltage = value; }
-        }
-
-        //拍照的放大倍数
-        private double photograph_Magnification;
-        public double Photograph_Magnification
-        {
-            get { return this.photograph_Magnification; }
-            set { this.photograph_Magnification = value; }
-        }
-
-        //拍照的工作电压
-        private double photograph_Voltage;
-        public double Photograph_Voltage
-        {
-            get { return this.photograph_Voltage; }
-            set { this.photograph_Voltage = value; }
-        }
-
-        //校正角度选择
-        private double correction_Angle;
-        public double Correction_Angle
-        {
-            get { return this.correction_Angle; }
-            set { this.correction_Angle = value; }
-        }
-
-        //样品类型
-        private String sample_Type;
-        public String Sample_Type
-        {
-            get { return this.sample_Type; }
-            set { this.sample_Type = value; }
-        }
-
-        //厂商
-        private String firm;
-        public String Firm
-        {
-            get { return this.firm; }
-            set { this.firm = value; }
-        }
-
-        //对焦参数
-
-        //能谱参数
-        //MeasureParam m_
+        public MeasureParam m_Config;
         #endregion
         #endregion
 
 
-        public ConfigFile()
+        public ConfigFile(MeasureParam mp)
         {
         {
-            
+            this.m_Config = mp;
         }
         }
 
 
 
 
@@ -194,15 +95,15 @@ namespace MeasureData
 
 
             xBool isPhotograph = new xBool();
             xBool isPhotograph = new xBool();
             xBool ptDepostion = new xBool();
             xBool ptDepostion = new xBool();
-            isPhotograph.AssignValue(this.is_Photograph);
-            ptDepostion.AssignValue(this.pt_Depostion);
+            isPhotograph.AssignValue(m_Config.Is_Photograph);
+            ptDepostion.AssignValue(m_Config.PT);
             sFile.Register("Is_Photograph", isPhotograph);
             sFile.Register("Is_Photograph", isPhotograph);
             sFile.Register("PT_Depostion", ptDepostion);
             sFile.Register("PT_Depostion", ptDepostion);
 
 
             xString ptELYFile = new xString();
             xString ptELYFile = new xString();
             xString fibELYFile = new xString();
             xString fibELYFile = new xString();
-            ptELYFile.AssignValue(this.pt_ELYFile);
-            fibELYFile.AssignValue(this.fib_ELYFile);
+            ptELYFile.AssignValue(m_Config.PTTemp);
+            fibELYFile.AssignValue(m_Config.FIBTemp);
             sFile.Register("PT_ELYFile", ptELYFile);
             sFile.Register("PT_ELYFile", ptELYFile);
             sFile.Register("FIB_ELYFile", fibELYFile);
             sFile.Register("FIB_ELYFile", fibELYFile);
 
 
@@ -211,11 +112,11 @@ namespace MeasureData
             xDouble locationVoltage = new xDouble();
             xDouble locationVoltage = new xDouble();
             xDouble photographMagnification = new xDouble();
             xDouble photographMagnification = new xDouble();
             xDouble photographVoltage = new xDouble();
             xDouble photographVoltage = 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);
+            stretchMagnification.AssignValue(m_Config.Stretch_Magnification);
+            locationMagnification.AssignValue(m_Config.Location_Magnification);
+            locationVoltage.AssignValue(m_Config.Location_Voltage);
+            photographMagnification.AssignValue(m_Config.Photograph_Magnification);
+            photographVoltage.AssignValue(m_Config.Photograph_Voltage);
             sFile.Register("Strectch_Magnification", stretchMagnification);
             sFile.Register("Strectch_Magnification", stretchMagnification);
             sFile.Register("Locatio_Magnification", locationMagnification);
             sFile.Register("Locatio_Magnification", locationMagnification);
             sFile.Register("Location_Voltage", locationVoltage);
             sFile.Register("Location_Voltage", locationVoltage);
@@ -223,13 +124,13 @@ namespace MeasureData
             sFile.Register("Photograph_Voltage", photographVoltage);
             sFile.Register("Photograph_Voltage", photographVoltage);
 
 
             xDouble correctionAngle = new xDouble();
             xDouble correctionAngle = new xDouble();
-            correctionAngle.AssignValue(this.correction_Angle);
+            correctionAngle.AssignValue(m_Config.Correction_Angle);
             sFile.Register("Correction_Angle", correctionAngle);
             sFile.Register("Correction_Angle", correctionAngle);
 
 
             xString sampleType = new xString();
             xString sampleType = new xString();
             xString _firm = new xString();
             xString _firm = new xString();
-            sampleType.AssignValue(this.sample_Type);
-            _firm.AssignValue(this.firm);
+            sampleType.AssignValue(m_Config.SampleName);
+            _firm.AssignValue(m_Config.Firm);
             sFile.Register("Sample_Type", sampleType);
             sFile.Register("Sample_Type", sampleType);
             sFile.Register("Firm", _firm);
             sFile.Register("Firm", _firm);
 
 
@@ -241,22 +142,22 @@ namespace MeasureData
             {
             {
                 sFile.Serialize(false, xml, rootNode);
                 sFile.Serialize(false, xml, rootNode);
 
 
-                this.is_Photograph = isPhotograph.value();
-                this.pt_Depostion = ptDepostion.value();
+                m_Config.Is_Photograph = isPhotograph.value();
+                m_Config.PT = ptDepostion.value();
 
 
-                this.pt_ELYFile = ptELYFile.value();
-                this.fib_ELYFile = fibELYFile.value();
+                m_Config.PTTemp = ptELYFile.value();
+                m_Config.FIBTemp = fibELYFile.value();
 
 
-                this.stretch_Magnification = stretchMagnification.value();
-                this.location_Magnification = locationMagnification.value();
-                this.location_Voltage = locationVoltage.value();
-                this.photograph_Magnification = photographMagnification.value();
-                this.photograph_Voltage = photographVoltage.value();
+                m_Config.Stretch_Magnification = stretchMagnification.value();
+                m_Config.Location_Magnification = locationMagnification.value();
+                m_Config.Location_Voltage = locationVoltage.value();
+                m_Config.Photograph_Magnification = photographMagnification.value();
+                m_Config.Photograph_Voltage = photographVoltage.value();
 
 
-                this.correction_Angle = correctionAngle.value();
+                m_Config.Correction_Angle = correctionAngle.value();
 
 
-                this.sample_Type = sampleType.value();
-                this.firm = _firm.value();
+                m_Config.SampleName = sampleType.value();
+                m_Config.Firm = _firm.value();
             }
             }
         }
         }
     }
     }

+ 10 - 41
MeasureData/MeasureParam.cs

@@ -19,7 +19,7 @@ namespace MeasureData
         #region 内容
         #region 内容
         //工作条件,一次测量的全部切孔都是一类的
         //工作条件,一次测量的全部切孔都是一类的
 
 
-        // 样品
+        // 样品类型
         private string m_SampleName;
         private string m_SampleName;
         public string SampleName
         public string SampleName
         {
         {
@@ -27,6 +27,14 @@ namespace MeasureData
             set { this.m_SampleName = value; }
             set { this.m_SampleName = value; }
         }
         }
 
 
+        //是否仅拍照
+        private Boolean is_Photograph;
+        public Boolean Is_Photograph
+        {
+            get { return this.is_Photograph; }
+            set { this.is_Photograph = value; }
+        }
+
         //是否有pt工序
         //是否有pt工序
         private Boolean m_pt;
         private Boolean m_pt;
         public Boolean PT
         public Boolean PT
@@ -59,38 +67,6 @@ namespace MeasureData
             set { m_fMode = value; }
             set { m_fMode = value; }
         }
         }
 
 
-        //是否仅拍照
-        private Boolean is_Photograph;
-        public Boolean Is_Photograph
-        {
-            get { return this.is_Photograph; }
-            set { this.is_Photograph = value; }
-        }
-
-        //是否PT沉积
-        private Boolean pt_Depostion;
-        public Boolean PT_Depostion
-        {
-            get { return this.pt_Depostion; }
-            set { this.pt_Depostion = value; }
-        }
-
-        //PT使用的ELY文件
-        private String pt_ELYFile;
-        public String PT_ELYFile
-        {
-            get { return this.pt_ELYFile; }
-            set { this.pt_ELYFile = value; }
-        }
-
-        //FIB使用的ELY文件
-        private String fib_ELYFile;
-        public String FIB_ELYFile
-        {
-            get { return this.fib_ELYFile; }
-            set { this.fib_ELYFile = value; }
-        }
-
         //拉直操作需要的放大位数
         //拉直操作需要的放大位数
         private double stretch_Magnification;
         private double stretch_Magnification;
         public double Stretch_Magnification
         public double Stretch_Magnification
@@ -139,14 +115,6 @@ namespace MeasureData
             set { this.correction_Angle = value; }
             set { this.correction_Angle = value; }
         }
         }
 
 
-        //样品类型
-        private String sample_Type;
-        public String Sample_Type
-        {
-            get { return this.sample_Type; }
-            set { this.sample_Type = value; }
-        }
-
         //厂商
         //厂商
         private String firm;
         private String firm;
         public String Firm
         public String Firm
@@ -158,6 +126,7 @@ namespace MeasureData
         //对焦参数
         //对焦参数
 
 
         //能谱参数
         //能谱参数
+
         #endregion
         #endregion
 
 
         //构造函数
         //构造函数

+ 60 - 58
MeasureThread/Measure.cs

@@ -27,19 +27,15 @@ namespace MeasureThread
     public delegate void ThreadStatusHandler(object sender, ThreadStatusEventArgs e);  //声明委托
     public delegate void ThreadStatusHandler(object sender, ThreadStatusEventArgs e);  //声明委托
     public delegate void CutHolesStatusHandler(object sender, CutHolesStatusEventArgs e);
     public delegate void CutHolesStatusHandler(object sender, CutHolesStatusEventArgs e);
 
 
-
-    //线程与界面通信协议
     public class ThreadStatusEventArgs
     public class ThreadStatusEventArgs
     {
     {
-        //状态,
         public string State
         public string State
         {
         {
             get { return m_state; }
             get { return m_state; }
             set { m_state = value; }
             set { m_state = value; }
         }
         }
         private string m_state;
         private string m_state;
-        
-        //时间
+
         public DateTime Time
         public DateTime Time
         {
         {
             get { return m_time; }
             get { return m_time; }
@@ -47,25 +43,16 @@ namespace MeasureThread
         }
         }
         private DateTime m_time;
         private DateTime m_time;
 
 
-        //步骤编码与MeasureStructXml.xml文件中的step中的code码一致
-        public string Step_Code
+        public String Step_Code
         {
         {
             get { return step_Code; }
             get { return step_Code; }
             set { step_Code = value; }
             set { step_Code = value; }
         }
         }
-        private string step_Code;
+        private String step_Code;
 
 
         //图片信息
         //图片信息
         public class PictureInformation
         public class PictureInformation
         {
         {
-            //使用XML中的IsData,不用改字段
-            public Boolean Is_Picture
-            {
-                get { return is_Picture; }
-                set { is_Picture = value; }
-            }
-            private Boolean is_Picture;
-
             public String Picture_FullPath
             public String Picture_FullPath
             {
             {
                 get { return picture_FullPath; }
                 get { return picture_FullPath; }
@@ -94,7 +81,6 @@ namespace MeasureThread
             }
             }
             private double work_Distance;
             private double work_Distance;
 
 
-            //SEM/FIB
             public String Work_Status
             public String Work_Status
             {
             {
                 get { return work_Status; }
                 get { return work_Status; }
@@ -113,7 +99,6 @@ namespace MeasureThread
         //图像信息
         //图像信息
         public class ImageInformation
         public class ImageInformation
         {
         {
-            //8个名
             public int Method_Name
             public int Method_Name
             {
             {
                 get { return method_Name; }
                 get { return method_Name; }
@@ -317,14 +302,22 @@ namespace MeasureThread
                 private int state;
                 private int state;
             }
             }
         }
         }
+        //图像信息实例类
+        public ImageInformation Image_Information
+        {
+            get { return image_Information; }
+            set { image_Information = value; }
+        }
+        private ImageInformation image_Information;
 
 
         public ThreadStatusEventArgs(string a_State)
         public ThreadStatusEventArgs(string a_State)
         {
         {
             this.m_state = a_State;
             this.m_state = a_State;
             picture_Information = new PictureInformation();
             picture_Information = new PictureInformation();
+            image_Information = new ImageInformation();
         }
         }
     }
     }
-    //切孔状态
+
     public class CutHolesStatusEventArgs
     public class CutHolesStatusEventArgs
     {
     {
         public string State
         public string State
@@ -386,7 +379,7 @@ namespace MeasureThread
             set { this.m_measureFile = value; }
             set { this.m_measureFile = value; }
         }
         }
 
 
-        //测量的切割孔,取测量文件里的孔
+        //测量的切割孔
         private List<MeasureData.CutHole> m_cutHoles;
         private List<MeasureData.CutHole> m_cutHoles;
         public List<MeasureData.CutHole> cutHoles
         public List<MeasureData.CutHole> cutHoles
         {
         {
@@ -413,7 +406,7 @@ namespace MeasureThread
             set { this.m_ThreadStatus = value; }
             set { this.m_ThreadStatus = value; }
         }
         }
 
 
-        //测量参数,不使用,使用文件中的参数
+        //测量参数
         private MeasureParam m_MsParam;
         private MeasureParam m_MsParam;
         public MeasureParam MeasParam
         public MeasureParam MeasParam
         {
         {
@@ -429,7 +422,7 @@ namespace MeasureThread
 
 
         private void Init()
         private void Init()
         {
         {
-            //MeasParam = new MeasureParam();
+            MeasParam = new MeasureParam();
             TStatus = new ThreadStatus();
             TStatus = new ThreadStatus();
             cutHoles = new List<MeasureData.CutHole>();
             cutHoles = new List<MeasureData.CutHole>();
         }
         }
@@ -456,10 +449,24 @@ namespace MeasureThread
             return true;
             return true;
         }
         }
 
 
-        public void SendMsg(string a_StrMsg)
+        public void SendMsg(string step_code)
         {
         {
-            ThreadStatusEventArgs arg = new ThreadStatusEventArgs(a_StrMsg);
+            ThreadStatusEventArgs arg = new ThreadStatusEventArgs(step_code);
             arg.Time = DateTime.Now;
             arg.Time = DateTime.Now;
+            switch(step_code)
+            {
+                //拍照
+                case "1-3":
+                    //电压、放大倍数、工作距离、位置信息、图片路径
+                    arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
+                    arg.Picture_Information.Work_Status = "SEM";
+                    arg.Picture_Information.Work_Distance = iSEM.GetWorkingDistance();
+                    arg.Picture_Information.Magnification = iSEM.GetMagnification();
+                    break;
+                case "1-1":
+
+                    break;
+            }
             SendThreadStatus(this, arg);
             SendThreadStatus(this, arg);
         }
         }
         public void SendCutHoleMsg(string a_state, string a_holeName)
         public void SendCutHoleMsg(string a_state, string a_holeName)
@@ -800,40 +807,40 @@ namespace MeasureThread
 
 
 
 
                 return true;
                 return true;
-                ////模拟为客户返回的坐标值
-                //float x0 = 0, y0 = 0;
-                //SendMsg("移动到新(" + x0.ToString() + "," + y0.ToString() + ")位置失败");
+                //模拟为客户返回的坐标值
+                float x0 = 0, y0 = 0;
+                SendMsg("移动到新(" + x0.ToString() + "," + y0.ToString() + ")位置失败");
 
 
-                ////12.根据梯形坐标控制FIB调整到中心位置
-                //if (!iSEM.MoveStageXY(x0, y0))
-                //{
-                //    SendMsg("移动到新(" + x0.ToString() + "," + y0.ToString() + ")位置失败");
-                //    return false;
-                //}
+                //12.根据梯形坐标控制FIB调整到中心位置
+                if (!iSEM.MoveStageXY(x0, y0))
+                {
+                    SendMsg("移动到新(" + x0.ToString() + "," + y0.ToString() + ")位置失败");
+                    return false;
+                }
 
 
-                ////电镜移动是有一个延时的操作的?
+                //电镜移动是有一个延时的操作的?
 
 
-                ////13.验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确
-                //float x1 = iSEM.GetStageAtX();
-                //float y1 = iSEM.GetStageAtY();
-                //if (Math.Abs(x0 - x1) > fMin && Math.Abs(y0 - y1) > fMin)
-                //{
-                //    SendMsg("目标位置(" + x0.ToString() + "," + y0.ToString() + ")移动失败");
-                //    return false;
-                //}
+                //13.验证移动准确性:获取当前FIB中心位置坐标,与客户返回坐标对比,验证是否移动正确
+                float x1 = iSEM.GetStageAtX();
+                float y1 = iSEM.GetStageAtY();
+                if (Math.Abs(x0 - x1) > fMin && Math.Abs(y0 - y1) > fMin)
+                {
+                    SendMsg("目标位置(" + x0.ToString() + "," + y0.ToString() + ")移动失败");
+                    return false;
+                }
 
 
-                ////14.保存样品1第1号孔中心位置6轴坐标1 XYZMRT到数据库,保存客户返回值信息到数据库
-                //float[] firstPosition = iSEM.GetStagePosition();
-                ////这里要调用文件保存功能
-                //SendMsg("坐标1(" + firstPosition[0].ToString() + ","
-                //    + firstPosition[1].ToString() + ","
-                //    + firstPosition[2].ToString() + ","
-                //    + firstPosition[3].ToString() + ","
-                //    + firstPosition[4].ToString() + ","
-                //    + firstPosition[5].ToString() + ")");
+                //14.保存样品1第1号孔中心位置6轴坐标1 XYZMRT到数据库,保存客户返回值信息到数据库
+                float[] firstPosition = iSEM.GetStagePosition();
+                //这里要调用文件保存功能
+                SendMsg("坐标1(" + firstPosition[0].ToString() + ","
+                    + firstPosition[1].ToString() + ","
+                    + firstPosition[2].ToString() + ","
+                    + firstPosition[3].ToString() + ","
+                    + firstPosition[4].ToString() + ","
+                    + firstPosition[5].ToString() + ")");
             }
             }
 
 
-            //return false;
+            return false;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1585,13 +1592,8 @@ namespace MeasureThread
 
 
             return true;
             return true;
         }
         }
+        
 
 
-        //自动对焦
-        public bool AutoFocus(string a_strPath, out int a_wd)
-        {
-            a_wd = 10;
-
-            //1. 拍照
             //2. 计算评价函数
             //2. 计算评价函数
             //3. 获取焦距
             //3. 获取焦距
             return true;
             return true;

+ 4 - 0
SmartSEMControl/HardwareInterface.cs

@@ -79,6 +79,10 @@ namespace SmartSEMControl
         Boolean SetAutoVideoContrast();
         Boolean SetAutoVideoContrast();
         Boolean SetAutoVideoBrightnessAndContrast();
         Boolean SetAutoVideoBrightnessAndContrast();
 
 
+        //SEM电压
+        float GetSEMVoltage();
+        Boolean SetSEMVoltage(float set);
+
         //消像散
         //消像散
         float GetAstigmatismX();
         float GetAstigmatismX();
         float GetAstigmatismY();
         float GetAstigmatismY();

+ 36 - 0
SmartSEMControl/SmartSEM.cs

@@ -178,6 +178,9 @@ namespace SmartSEMControl
         private readonly String AP_FIB_BEAM_SHIFT_X = "AP_FIB_BEAM_SHIFT_X";
         private readonly String AP_FIB_BEAM_SHIFT_X = "AP_FIB_BEAM_SHIFT_X";
         //FIB光束移动Y
         //FIB光束移动Y
         private readonly String AP_FIB_BEAM_SHIFT_Y = "AP_FIB_BEAM_SHIFT_Y";
         private readonly String AP_FIB_BEAM_SHIFT_Y = "AP_FIB_BEAM_SHIFT_Y";
+
+        //SEM电压
+        private readonly String AP_MANUALKV = "AP_MANUALKV";
         #endregion
         #endregion
 
 
         #region 数字参数
         #region 数字参数
@@ -923,6 +926,39 @@ namespace SmartSEMControl
         }
         }
         #endregion
         #endregion
 
 
+        #region SEM电压
+        /// <summary>
+        /// 读取电压
+        /// </summary>
+        /// <returns>true:float or false:NaN</returns>
+        public float GetSEMVoltage()
+        {
+            float ret = 0;
+            if (ReadParams(AP_MANUALKV, ref ret))
+            {
+                LogManager.AddHardwareLog("SEM_Voltage " + ret.ToString() + " Success!", true);
+                return ret;
+            }
+            else
+            {
+                LogManager.AddHardwareLog("SEM_Voltage Faild!", false);
+                return float.NaN;
+            }
+        }
+
+        /// <summary>
+        /// 设置电压
+        /// </summary>
+        /// <param name="set">电压</param>
+        /// <returns>true or false</returns>
+        public Boolean SetSEMVoltage(float set)
+        {
+            Boolean ret = WriteParams(AP_MANUALKV, set);
+            LogManager.AddHardwareLog("SetSEMVoltage = " + set.ToString(), ret);
+            return ret;
+        }
+        #endregion
+
         #region 抓取图像
         #region 抓取图像
         /// <summary>
         /// <summary>
         /// 抓取图像
         /// 抓取图像