Pārlūkot izejas kodu

增加对焦时长,修改拍摄图片名称,

gsp 4 gadi atpakaļ
vecāks
revīzija
9646b0ce92

+ 88 - 2
HOZProject/App.config

@@ -5,7 +5,7 @@
     </startup>
     <appSettings>
       <!--厂商_数据源-->
-      <add key="Firm" value="N-BOE,LG,SDC,O-BOE"/>
+      <add key="Firm" value="Noah-BOE,LG,SDC,Ocean-BOE"/>
       <!--样品类型_数据源-->
       <add key="Sample_Type" value="0,1,2,3"/>
       <!--拍照的工作电压_数据源-->
@@ -41,7 +41,7 @@
       <!--样品类型-->
       <add key="SampleName" value="1"/>
       <!--厂商-->
-      <add key="Firms" value="O-BOE"/>
+      <add key="Firms" value="Ocean-BOE"/>
       <!--是否倾斜样品台-->
       <add key="Is_Title" value="True"/>
       <!--是否仅拍照-->
@@ -186,5 +186,91 @@
       <add key="IsonlyEDSForDebug" value="false"/>
       <!--add by zjx 2020-12-18 为了测试只做能谱部分-->
       
+      
+      <!--add by zjx 2020-12-20 初始化窗体中里样品类型的初始值-->
+      <!--add by zjx 2020-12-20 样品类型的厂商参数-->
+      <add key="VendorType0" value="N-BOE"/>
+      <add key="VendorType1" value="O-BOE"/>
+      <add key="VendorType2" value="N-BOE"/>
+      <add key="VendorType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的厂商参数 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的校正角度-->
+      <add key="CorrectionType0" value="截面观测"/>
+      <add key="CorrectionType1" value="截面观测"/>
+      <add key="CorrectionType2" value="截面观测"/>
+      <add key="CorrectionType3" value="截面观测"/>
+      <!--add by zjx 2020-12-20 样品类型的校正角度 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的拉直操作放大倍数-->
+      <add key="StraightenTimesType0" value="N-BOE"/>
+      <add key="StraightenTimesType1" value="300"/>
+      <add key="StraightenTimesType2" value="N-BOE"/>
+      <add key="StraightenTimesType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的拉直操作放大倍数 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的定位电压-->
+      <add key="PositioningVoltageeType0" value="N-BOE"/>
+      <add key="PositioningVoltageeType1" value="2000"/>
+      <add key="PositioningVoltageeType2" value="N-BOE"/>
+      <add key="PositioningVoltageeType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的定位电压 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的定位放大倍数-->
+      <add key="PositioningTimesType0" value="N-BOE"/>
+      <add key="PositioningTimesType1" value="300"/>
+      <add key="PositioningTimesType2" value="N-BOE"/>
+      <add key="PositioningTimesType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的定位放大倍数 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的拍照电压-->
+      <add key="PhotoVoltageeType0" value="N-BOE"/>
+      <add key="PhotoVoltageeType1" value="2000"/>
+      <add key="PhotoVoltageeType2" value="N-BOE"/>
+      <add key="PhotoVoltageeType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的拍照电压 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的拍照放大倍数-->
+      <add key="PhotoTimesType0" value="N-BOE"/>
+      <add key="PhotoTimesType1" value="2000"/>
+      <add key="PhotoTimesType2" value="N-BOE"/>
+      <add key="PhotoTimesType3" value="N-BOE"/>
+      <!--add by zjx 2020-12-20 样品类型的拍照放大倍数 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的ScanRotate修正参数-->
+      <add key="ScanRotateType0" value="1"/>
+      <add key="ScanRotateType1" value="1"/>
+      <add key="ScanRotateType2" value="1"/>
+      <add key="ScanRotateType3" value="1"/>
+      <!--add by zjx 2020-12-20 样品类型的ScanRotate修正参数 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值-->
+      <add key="PixelSizeType0" value="1.236"/>
+      <add key="PixelSizeType1" value="1.236"/>
+      <add key="PixelSizeType2" value="1.236"/>
+      <add key="PixelSizeType3" value="1.236"/>
+      <!--add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的能谱Z轴移动位置-->
+      <add key="SEMAxis_ZType0" value="37.241"/>
+      <add key="SEMAxis_ZType1" value="37.241"/>
+      <add key="SEMAxis_ZType2" value="37.241"/>
+      <add key="SEMAxis_ZType3" value="37.241"/>
+      <!--add by zjx 2020-12-20 样品类型的能谱Z轴移动位置 end-->
+
+      <!--add by zjx 2020-12-20 样品类型的能谱电压值-->
+      <add key="SEMVoltageeType0" value="7000"/>
+      <add key="SEMVoltageeType1" value="7000"/>
+      <add key="SEMVoltageeType2" value="7000"/>
+      <add key="SEMVoltageeType3" value="7000"/>
+      <!--add by zjx 2020-12-20 样品类型的能谱电压值-->
+
+      <!--add by zjx 2020-12-20 样品类型的能谱电流值-->
+      <add key="SEMCurrentType0" value="1"/>
+      <add key="SEMCurrentType1" value="1"/>
+      <add key="SEMCurrentType2" value="1"/>
+      <add key="SEMCurrentType3" value="1"/>
+      <!--add by zjx 2020-12-20 样品类型的能谱电流值 end-->
+      <!--add by zjx 2020-12-20 初始化窗体中里样品类型的初始值 end-->
     </appSettings>
 </configuration>

+ 74 - 0
HOZProject/FormHOZMain.cs

@@ -223,6 +223,80 @@ namespace HOZProject
                 m_MeasureFile.MParam.IsonlyEDSForDebug = Convert.ToBoolean(ConfigurationManager.AppSettings["IsonlyEDSForDebug"]);
                 // add by zjx 2020-12-18 为了测试只做能谱部分 end
 
+                #region 初始化参数的默认值
+                // add by zjx 2020-12-20 厂商参数
+                m_MeasureFile.MParam.VendorType0 = Convert.ToString(ConfigurationManager.AppSettings["VendorType0"]);
+                m_MeasureFile.MParam.VendorType1 = Convert.ToString(ConfigurationManager.AppSettings["VendorType1"]);
+                m_MeasureFile.MParam.VendorType2 = Convert.ToString(ConfigurationManager.AppSettings["VendorType2"]);
+                m_MeasureFile.MParam.VendorType3 = Convert.ToString(ConfigurationManager.AppSettings["VendorType3"]);
+                // add by zjx 2020-12-20 厂商参数 end 
+                // add by zjx 2020-12-21 校正角度
+                m_MeasureFile.MParam.CorrectionType0 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType0"]);
+                m_MeasureFile.MParam.CorrectionType1 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType1"]);
+                m_MeasureFile.MParam.CorrectionType2 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType2"]);
+                m_MeasureFile.MParam.CorrectionType3 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType3"]);
+                // add by zjx 2020-12-21 校正角度 end 
+                // add by zjx 2020-12-21 拉直操作放大倍数
+                m_MeasureFile.MParam.StraightenTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType0"]);
+                m_MeasureFile.MParam.StraightenTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType1"]);
+                m_MeasureFile.MParam.StraightenTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType2"]);
+                m_MeasureFile.MParam.StraightenTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType3"]);
+                // add by zjx 2020-12-21 拉直操作放大倍数 end
+                // add by zjx 2020-12-21 定位电压
+                m_MeasureFile.MParam.PositioningVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType0"]);
+                m_MeasureFile.MParam.PositioningVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType1"]);
+                m_MeasureFile.MParam.PositioningVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType2"]);
+                m_MeasureFile.MParam.PositioningVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType3"]);
+                // add by zjx 2020-12-21 定位电压 end
+                // add by zjx 2020-12-21 定位放大倍数
+                m_MeasureFile.MParam.PositioningTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType0"]);
+                m_MeasureFile.MParam.PositioningTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType1"]);
+                m_MeasureFile.MParam.PositioningTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType2"]);
+                m_MeasureFile.MParam.PositioningTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType3"]);
+                // add by zjx 2020-12-21 定位放大倍数 end
+                // add by zjx 2020-12-21 拍照电压
+                m_MeasureFile.MParam.PhotoVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType0"]);
+                m_MeasureFile.MParam.PhotoVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType1"]);
+                m_MeasureFile.MParam.PhotoVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType2"]);
+                m_MeasureFile.MParam.PhotoVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType3"]);
+                // add by zjx 2020-12-21 拍照电压 end
+                // add by zjx 2020-12-21 拍照放大倍数
+                m_MeasureFile.MParam.PhotoTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType0"]);
+                m_MeasureFile.MParam.PhotoTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType1"]);
+                m_MeasureFile.MParam.PhotoTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType2"]);
+                m_MeasureFile.MParam.PhotoTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType3"]);
+                // add by zjx 2020-12-21 拍照放大倍数 end
+                // add by zjx 2020-12-21 ScanRotate修正参数
+                m_MeasureFile.MParam.ScanRotateType0 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType0"]);
+                m_MeasureFile.MParam.ScanRotateType1 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType1"]);
+                m_MeasureFile.MParam.ScanRotateType2 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType2"]);
+                m_MeasureFile.MParam.ScanRotateType3 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType3"]);
+                // add by zjx 2020-12-21 ScanRotate修正参数 end
+                // add by zjx 2020-12-21 Y轴方向PixelSize修正值
+                m_MeasureFile.MParam.PixelSizeType0 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType0"]);
+                m_MeasureFile.MParam.PixelSizeType1 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType1"]);
+                m_MeasureFile.MParam.PixelSizeType2 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType2"]);
+                m_MeasureFile.MParam.PixelSizeType3 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType3"]);
+                // add by zjx 2020-12-21 Y轴方向PixelSize修正值 end
+                // add by zjx 2020-12-21 能谱Z轴移动位置
+                m_MeasureFile.MParam.SEMAxis_ZType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType0"]);
+                m_MeasureFile.MParam.SEMAxis_ZType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType1"]);
+                m_MeasureFile.MParam.SEMAxis_ZType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType2"]);
+                m_MeasureFile.MParam.SEMAxis_ZType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType3"]);
+                // add by zjx 2020-12-21 能谱Z轴移动位置 end
+                // add by zjx 2020-12-21 能谱电压值
+                m_MeasureFile.MParam.SEMVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType0"]);
+                m_MeasureFile.MParam.SEMVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType1"]);
+                m_MeasureFile.MParam.SEMVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType2"]);
+                m_MeasureFile.MParam.SEMVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType3"]);
+                // add by zjx 2020-12-21 能谱电压值 end
+                // add by zjx 2020-12-21 能谱电流值
+                m_MeasureFile.MParam.SEMCurrentType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType0"]);
+                m_MeasureFile.MParam.SEMCurrentType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType1"]);
+                m_MeasureFile.MParam.SEMCurrentType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType2"]);
+                m_MeasureFile.MParam.SEMCurrentType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType3"]);
+                // add by zjx 2020-12-21 能谱电流值 end
+                #endregion
                 m_Ms.InitMeas(m_MeasureFile);
                 //注册事件
                 m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage);

+ 350 - 0
MeasureData/MeasureParam.cs

@@ -425,6 +425,356 @@ namespace MeasureData
         //add by zjx 2020-12-18 为了测试只做能谱部分 end
 
         #endregion
+        #region  初始化样品的默认参数
+        // add by zjx 2020-12-20 厂商名字
+        #region 厂商
+        private String m_VendorType0;
+        public String VendorType0
+        {
+            get { return this.m_VendorType0; }
+            set { this.m_VendorType0 = value; }
+        }
+        private String m_VendorType1;
+        public String VendorType1
+        {
+            get { return this.m_VendorType1; }
+            set { this.m_VendorType1 = value; }
+        }
+        private String m_VendorType2;
+        public String VendorType2
+        {
+            get { return this.m_VendorType2; }
+            set { this.m_VendorType2 = value; }
+        }
+        private String m_VendorType3;
+        public String VendorType3
+        {
+            get { return this.m_VendorType3; }
+            set { this.m_VendorType3 = value; }
+        }
+        #endregion
+        // add by zjx 2020-12-20 厂商名字 end
+
+        // add by zjx 2020-12-20 校正角度
+        #region 校正角度
+        private String m_CorrectionType0;
+        public String CorrectionType0
+        {
+            get { return this.m_CorrectionType0; }
+            set { this.m_CorrectionType0 = value; }
+        }
+        private String m_CorrectionType1;
+        public String CorrectionType1
+        {
+            get { return this.m_CorrectionType1; }
+            set { this.m_CorrectionType1 = value; }
+        }
+        private String m_CorrectionType2;
+        public String CorrectionType2
+        {
+            get { return this.m_CorrectionType2; }
+            set { this.m_CorrectionType2 = value; }
+        }
+        private String m_CorrectionType3;
+        public String CorrectionType3
+        {
+            get { return this.m_CorrectionType3; }
+            set { this.m_CorrectionType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 校正角度 end
+
+        //add by zjx 2020-12-20 拉直操作放大倍数
+        #region 拉直操作放大倍数
+        private String m_StraightenTimesType0;
+        public String StraightenTimesType0
+        {
+            get { return this.m_StraightenTimesType0; }
+            set { this.m_StraightenTimesType0 = value; }
+        }
+        private String m_StraightenTimesType1;
+        public String StraightenTimesType1
+        {
+            get { return this.m_StraightenTimesType1; }
+            set { this.m_StraightenTimesType1 = value; }
+        }
+        private String m_StraightenTimesType2;
+        public String StraightenTimesType2
+        {
+            get { return this.m_StraightenTimesType2; }
+            set { this.m_StraightenTimesType2 = value; }
+        }
+        private String m_StraightenTimesType3;
+        public String StraightenTimesType3
+        {
+            get { return this.m_StraightenTimesType3; }
+            set { this.m_StraightenTimesType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 拉直操作放大倍数 end 
+
+        //add by zjx 2020-12-20 样品类型的定位电压
+        #region 样品类型的定位电压
+        private String m_PositioningVoltageeType0;
+        public String PositioningVoltageeType0
+        {
+            get { return this.m_PositioningVoltageeType0; }
+            set { this.m_PositioningVoltageeType0 = value; }
+        }
+        private String m_PositioningVoltageeType1;
+        public String PositioningVoltageeType1
+        {
+            get { return this.m_PositioningVoltageeType1; }
+            set { this.m_PositioningVoltageeType1 = value; }
+        }
+        private String m_PositioningVoltageeType2;
+        public String PositioningVoltageeType2
+        {
+            get { return this.m_PositioningVoltageeType2; }
+            set { this.m_PositioningVoltageeType2 = value; }
+        }
+        private String m_PositioningVoltageeType3;
+        public String PositioningVoltageeType3
+        {
+            get { return this.m_PositioningVoltageeType3; }
+            set { this.m_PositioningVoltageeType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的定位电压 end 
+
+        //add by zjx 2020-12-20 样品类型的定位放大倍数
+        #region 定位放大倍数
+        private String m_PositioningTimesType0;
+        public String PositioningTimesType0
+        {
+            get { return this.m_PositioningTimesType0; }
+            set { this.m_PositioningTimesType0 = value; }
+        }
+        private String m_PositioningTimesType1;
+        public String PositioningTimesType1
+        {
+            get { return this.m_PositioningTimesType1; }
+            set { this.m_PositioningTimesType1 = value; }
+        }
+        private String m_PositioningTimesType2;
+        public String PositioningTimesType2
+        {
+            get { return this.m_PositioningTimesType2; }
+            set { this.m_PositioningTimesType2 = value; }
+        }
+        private String m_PositioningTimesType3;
+        public String PositioningTimesType3
+        {
+            get { return this.m_PositioningTimesType3; }
+            set { this.m_PositioningTimesType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的定位放大倍数 end 
+
+        //add by zjx 2020-12-20 样品类型的拍照电压
+        #region 拍照电压
+        private String m_PhotoVoltageeType0;
+        public String PhotoVoltageeType0
+        {
+            get { return this.m_PhotoVoltageeType0; }
+            set { this.m_PhotoVoltageeType0 = value; }
+        }
+        private String m_PhotoVoltageeType1;
+        public String PhotoVoltageeType1
+        {
+            get { return this.m_PhotoVoltageeType1; }
+            set { this.m_PhotoVoltageeType1 = value; }
+        }
+        private String m_PhotoVoltageeType2;
+        public String PhotoVoltageeType2
+        {
+            get { return this.m_PhotoVoltageeType2; }
+            set { this.m_PhotoVoltageeType2 = value; }
+        }
+        private String m_PhotoVoltageeType3;
+        public String PhotoVoltageeType3
+        {
+            get { return this.m_PhotoVoltageeType3; }
+            set { this.m_PhotoVoltageeType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的拍照电压 end 
+
+        //add by zjx 2020-12-20 样品类型的拍照放大倍数
+        #region 拍照放大倍数
+        private String m_PhotoTimesType0;
+        public String PhotoTimesType0
+        {
+            get { return this.m_PhotoTimesType0; }
+            set { this.m_PhotoTimesType0 = value; }
+        }
+        private String m_PhotoTimesType1;
+        public String PhotoTimesType1
+        {
+            get { return this.m_PhotoTimesType1; }
+            set { this.m_PhotoTimesType1 = value; }
+        }
+        private String m_PhotoTimesType2;
+        public String PhotoTimesType2
+        {
+            get { return this.m_PhotoTimesType2; }
+            set { this.m_PhotoTimesType2 = value; }
+        }
+        private String m_PhotoTimesType3;
+        public String PhotoTimesType3
+        {
+            get { return this.m_PhotoTimesType3; }
+            set { this.m_PhotoTimesType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的拍照放大倍数 end 
+
+        //add by zjx 2020-12-20 样品类型的ScanRotate修正参数
+        #region ScanRotate修正参数
+        private String m_ScanRotateType0;
+        public String ScanRotateType0
+        {
+            get { return this.m_ScanRotateType0; }
+            set { this.m_ScanRotateType0 = value; }
+        }
+        private String m_ScanRotateType1;
+        public String ScanRotateType1
+        {
+            get { return this.m_ScanRotateType1; }
+            set { this.m_ScanRotateType1 = value; }
+        }
+        private String m_ScanRotateType2;
+        public String ScanRotateType2
+        {
+            get { return this.m_ScanRotateType2; }
+            set { this.m_ScanRotateType2 = value; }
+        }
+        private String m_ScanRotateType3;
+        public String ScanRotateType3
+        {
+            get { return this.m_ScanRotateType3; }
+            set { this.m_ScanRotateType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的ScanRotate修正参数 end 
+
+        //add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值
+        #region Y轴方向PixelSize修正值
+        private String m_PixelSizeType0;
+        public String PixelSizeType0
+        {
+            get { return this.m_PixelSizeType0; }
+            set { this.m_PixelSizeType0 = value; }
+        }
+        private String m_PixelSizeType1;
+        public String PixelSizeType1
+        {
+            get { return this.m_PixelSizeType1; }
+            set { this.m_PixelSizeType1 = value; }
+        }
+        private String m_PixelSizeType2;
+        public String PixelSizeType2
+        {
+            get { return this.m_PixelSizeType2; }
+            set { this.m_PixelSizeType2 = value; }
+        }
+        private String m_PixelSizeType3;
+        public String PixelSizeType3
+        {
+            get { return this.m_PixelSizeType3; }
+            set { this.m_PixelSizeType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值 end 
+
+        //add by zjx 2020-12-20 样品类型的能谱Z轴移动位置
+        #region 能谱Z轴移动位置
+        private String m_SEMAxis_ZType0;
+        public String SEMAxis_ZType0
+        {
+            get { return this.m_SEMAxis_ZType0; }
+            set { this.m_SEMAxis_ZType0 = value; }
+        }
+        private String m_SEMAxis_ZType1;
+        public String SEMAxis_ZType1
+        {
+            get { return this.m_SEMAxis_ZType1; }
+            set { this.m_SEMAxis_ZType1 = value; }
+        }
+        private String m_SEMAxis_ZType2;
+        public String SEMAxis_ZType2
+        {
+            get { return this.m_SEMAxis_ZType2; }
+            set { this.m_SEMAxis_ZType2 = value; }
+        }
+        private String m_SEMAxis_ZType3;
+        public String SEMAxis_ZType3
+        {
+            get { return this.m_SEMAxis_ZType3; }
+            set { this.m_SEMAxis_ZType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的能谱Z轴移动位置 end 
+
+        //add by zjx 2020-12-20 样品类型的能谱电压值
+        #region 能谱电压值
+        private String m_SEMVoltageeType0;
+        public String SEMVoltageeType0
+        {
+            get { return this.m_SEMVoltageeType0; }
+            set { this.m_SEMVoltageeType0 = value; }
+        }
+        private String m_SEMVoltageeType1;
+        public String SEMVoltageeType1
+        {
+            get { return this.m_SEMVoltageeType1; }
+            set { this.m_SEMVoltageeType1 = value; }
+        }
+        private String m_SEMVoltageeType2;
+        public String SEMVoltageeType2
+        {
+            get { return this.m_SEMVoltageeType2; }
+            set { this.m_SEMVoltageeType2 = value; }
+        }
+        private String m_SEMVoltageeType3;
+        public String SEMVoltageeType3
+        {
+            get { return this.m_SEMVoltageeType3; }
+            set { this.m_SEMVoltageeType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的能谱电压值 end
+
+        //add by zjx 2020-12-20 样品类型的能谱电流值
+        #region 能谱电流值
+        private String m_SEMCurrentType0;
+        public String SEMCurrentType0
+        {
+            get { return this.m_SEMCurrentType0; }
+            set { this.m_SEMCurrentType0 = value; }
+        }
+        private String m_SEMCurrentType1;
+        public String SEMCurrentType1
+        {
+            get { return this.m_SEMCurrentType1; }
+            set { this.m_SEMCurrentType1 = value; }
+        }
+        private String m_SEMCurrentType2;
+        public String SEMCurrentType2
+        {
+            get { return this.m_SEMCurrentType2; }
+            set { this.m_SEMCurrentType2 = value; }
+        }
+        private String m_SEMCurrentType3;
+        public String SEMCurrentType3
+        {
+            get { return this.m_SEMCurrentType3; }
+            set { this.m_SEMCurrentType3 = value; }
+        }
+        #endregion
+        //add by zjx 2020-12-20 样品类型的能谱电流值 end
+        #endregion
+
 
 
         //构造函数

+ 77 - 14
MeasureThread/Measure.cs

@@ -1711,7 +1711,11 @@ namespace MeasureThread
             }
 
             //3.控制SEM拍照
-            String fileName4 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageName4;
+            //String fileName4 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageName4;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+            String fileName4 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + mag.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageName4;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end
+            LogManager.AddHardwareLog("fileName4====================" + fileName4, true);
             arg.Picture_Information.Picture_FullPath = fileName4;
             arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
             Thread.Sleep(200);
@@ -1792,7 +1796,11 @@ namespace MeasureThread
                 cycle_time = iSEM.GetCycleTime();
                 Thread.Sleep(Convert.ToInt32(cycle_time) +100);
 
-                String fileName10 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageName10;
+                //String fileName10 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageName10;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+                String fileName10 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + mag.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageName10;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
+                LogManager.AddHardwareLog("fileName10====================" + fileName10, true);
 
                 if (!GetImage(fileName10))
                 {
@@ -2000,7 +2008,11 @@ namespace MeasureThread
             }
 
             //4、拍照,5、保存照片
-            String fileName5 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageName5;
+            //String fileName5 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageName5;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+            String fileName5 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageName5;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
+            LogManager.AddHardwareLog("fileName5====================" + fileName5, true);
             arg.Picture_Information.Picture_FullPath = fileName5;
             arg.Picture_Information.Work_Status = "SEM";
             arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
@@ -2098,7 +2110,11 @@ namespace MeasureThread
                 Thread.Sleep(200);
 
                 //12拍照
-                String fileName6 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageName6;
+                //String fileName6 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageName6;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+                String fileName6 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageName6;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
+                LogManager.AddHardwareLog("fileName6====================" + fileName6, true);
                 arg.Picture_Information.Picture_FullPath = fileName6;
                 arg.Picture_Information.Work_Status = "SEM";
                 arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
@@ -2478,11 +2494,11 @@ namespace MeasureThread
                         #endregion
 
                         //add by sun 2020-12-17 根据客户要求,3大类样品需要在5000倍下在拍摄一张图片,不需要分析
-                        if((m_measureFile.MParam.SampleName=="3")&&(n==0))
-                        { 
-                            if (!GetImageFromSEM(mag[n]/2))
-                                LogManager.AddHardwareLog("测量线程报错:第一个区域放大一半倍数" + (mag[n]/2).ToString() + "控制失败", true);
-                        }
+                        //if((m_measureFile.MParam.SampleName=="3")&&(n==0))
+                        //{ 
+                        //    if (!GetImageFromSEM(mag[n]/2))
+                        //        LogManager.AddHardwareLog("测量线程报错:第一个区域放大一半倍数" + (mag[n]/2).ToString() + "控制失败", true);
+                        //}
                         //add by sun 2020-12-17 根据客户要求,3大类样品需要在5000倍下在拍摄一张图片,不需要分析 end
                         #region 拍照
                         if (!iSEM.SetMagnification(mag[n]))
@@ -2510,7 +2526,11 @@ namespace MeasureThread
                         lsize.Add(iSEM.GetPixelSize());
                         Thread.Sleep(200);
 
-                        String fileName7 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag[n].ToString() + "_" + n.ToString() + "_" + ImageNameTwo_1;
+                        //String fileName7 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag[n].ToString() + "_" + n.ToString() + "_" + ImageNameTwo_1;
+                        //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+                        String fileName7 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + mag[n].ToString() + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + n.ToString() + "-" + ImageNameTwo_1;
+                        //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
+                        LogManager.AddHardwareLog("fileName7====================" + fileName7, true);
                         arg.Picture_Information.Picture_FullPath = fileName7;
                         arg.Picture_Information.Work_Status = "SEM";
                         arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
@@ -2544,7 +2564,10 @@ namespace MeasureThread
                         Thread.Sleep(200);
                         cycle_time = iSEM.GetCycleTime();
                         Thread.Sleep(Convert.ToInt32(cycle_time) + 100);
-
+                        // add by zjx 在测量图上显示放大倍数和像素大小等信息
+                        float size = iSEM.GetPixelSize();
+                        SaveMeasDataPic(fileName7,mag[n], size);
+                        // add by zjx 在测量图上显示放大倍数和像素大小等信息 end 
                         #endregion
                     }
 
@@ -5957,7 +5980,11 @@ namespace MeasureThread
             }
 
             //3.控制SEM拍照
-            String fileName4 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageNameEDS4;
+            //String fileName4 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + mag.ToString("0") + "_" + ImageNameEDS4;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+            String fileName4 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + mag.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageNameEDS4;
+            LogManager.AddHardwareLog("fileName4=============" + fileName4, true);
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
             arg.Picture_Information.Picture_FullPath = fileName4;
             arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
             Thread.Sleep(200);
@@ -6188,7 +6215,11 @@ namespace MeasureThread
             }
 
             //4、拍照,5、保存照片
-            String fileName5 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageNameEDS5;
+            //String fileName5 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageNameEDS5;
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+            String fileName5 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageNameEDS5;
+            LogManager.AddHardwareLog("fileName5==============="+ fileName5, false);
+            //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
             arg.Picture_Information.Picture_FullPath = fileName5;
             arg.Picture_Information.Work_Status = "SEM";
             arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
@@ -6285,7 +6316,11 @@ namespace MeasureThread
                 Thread.Sleep(200);
 
                 //12拍照
-                String fileName6 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageNameEDS6;
+                //String fileName6 = data_path + "\\" + m_cutHoles[m_nWorkHoleNo].HoleName + "_" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "_" + ImageNameEDS6;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称
+                String fileName6 = data_path + "\\" + m_measureFile.MParam.Firm + "-" + m_measureFile.MParam.Photograph_Magnification.ToString("0") + "-" + m_cutHoles[m_nWorkHoleNo].HoleName + "-" + ImageNameEDS6;
+                //add by zjx 2020-12-21 根据客户的需求修改图片的名称 end 
+                LogManager.AddHardwareLog("fileName6===================" + fileName6, true);
                 arg.Picture_Information.Picture_FullPath = fileName6;
                 arg.Picture_Information.Work_Status = "SEM";
                 arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
@@ -6823,6 +6858,34 @@ namespace MeasureThread
         }
         #endregion
         //add by sun 2020-12-17 根据客户要求,3大类样品需要在5000倍下在拍摄一张图片,不需要分析 end
+        //add by zjx 2020-12-21 在测量图上显示放大倍数和像素大小等信息
+        public void SaveMeasDataPic(String picFullPath,float Mag,float pixelsize)
+        {
+            try
+            {
+                using (System.Drawing.Image img = Image.FromFile(picFullPath))
+                {
+                    Bitmap bmp = new Bitmap(img.Width, img.Height);
+                    using (Graphics g = Graphics.FromImage(bmp))
+                    {
+                        g.DrawImage(img, 0, 0, img.Width, img.Height);
+                        String str = "Mag:" + Mag.ToString("0") + "X\tPixelSize:" + (pixelsize * 1000000).ToString("0.00") + "um";
+                        Font font =new Font("宋体", 16, FontStyle.Bold);
+                        SolidBrush sbrush = new SolidBrush(Color.LimeGreen);
+                        g.DrawString(str, font, sbrush, new PointF(40, img.Height - 30));
+                    }
+                    String path1 = Path.GetDirectoryName(picFullPath) + Path.GetFileNameWithoutExtension(picFullPath) + "_Data." + Path.GetExtension(picFullPath);
+                    LogManager.AddHardwareLog("Path.GetDirectoryName(picFullPath)==" + Path.GetDirectoryName(picFullPath) + "Path.GetFileNameWithoutExtension(picFullPath)==" + Path.GetFileNameWithoutExtension(picFullPath) + "Path.GetExtension(picFullPath)==" + Path.GetExtension(picFullPath), true);
+                    LogManager.AddHardwareLog("在测量图上显示放大倍数和像素大小信息==============="+ path1, true);
+                    bmp.Save(path1);
+                }
+            }
+            catch
+            {
+                LogManager.AddHardwareLog("在测量图上显示放大倍数和像素大小信息失败", true);
+            }
+        }
+        //add by zjx 2020-12-21 在测量图上显示放大倍数和像素大小等信息 end
         #endregion
     }
 }

+ 1 - 0
MeasureThread/XmlRpcClient.cs

@@ -18,6 +18,7 @@ namespace MeasureThread
         {
             // 用XmlRpcProxyGen创建接口: 只有此接口实现IXmlRpcProxy接口才能添加url值;
             IMethod service = XmlRpcProxyGen.Create<IMethod>();
+            service.Timeout = 5 * 60 * 1000;
             service.XmlEncoding = new System.Text.UTF8Encoding();
             service.Url = urlstr;