Browse Source

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

wb_han 5 years ago
parent
commit
fcfe4a8569

+ 9 - 9
HOZProject/FormUnitControl.cs

@@ -1291,7 +1291,7 @@ namespace HOZProject
             double degree = 0;
             int direction = 0;
             int state = 0;
-            wr.Img_OffsetAngle_Direction("D:/aaaa.jpg", out degree, out direction, out state);
+            wr.Img_OffsetAngle_Direction("D:/aaaa.jpg",1,"LG", out degree, out direction, out state);
             lbldegree1.Text = degree.ToString("0.0");
             lbldirection1.Text = direction.ToString();
             lblstate1.Text = state.ToString();
@@ -1393,27 +1393,27 @@ namespace HOZProject
 
         private void btnCreateConfig_Click(object sender, EventArgs e)
         {
-            ConfigManager cfm = new ConfigManager();
+            ConfigFile cfm = new ConfigFile();
             cfm.PT_Depostion = chkpt0.Checked;
             cfm.Template_File = txtTemplateFile.Text;
             cfm.Sample_Name = txtSampleName.Text;
-            cfm.M_Config_Param.Voltage = Convert.ToDouble(txtvoltage.Text);
-            cfm.M_Config_Param.Magnification = Convert.ToDouble(txtMag.Text);
-            cfm.M_Config_Param.Pixel_Size = Convert.ToDouble(txtpixel.Text);
+            //cfm.M_Config_Param.Voltage = Convert.ToDouble(txtvoltage.Text);
+            //cfm.M_Config_Param.Magnification = Convert.ToDouble(txtMag.Text);
+            //cfm.M_Config_Param.Pixel_Size = Convert.ToDouble(txtpixel.Text);
             cfm.CreateXml(@"E:\test.cfg");
             cfm.Save(@"E:\test.cfg");
         }
 
         private void btnReadConfig_Click(object sender, EventArgs e)
         {
-            ConfigManager cfm = new ConfigManager();
+            ConfigFile cfm = new ConfigFile();
             cfm.Read(@"E:\test.cfg");
             this.ckbPT.Checked = cfm.PT_Depostion;
             this.lblTemplateFile.Text = cfm.Template_File;
             this.lblSampleName.Text = cfm.Sample_Name;
-            this.lblvoltage.Text = cfm.M_Config_Param.Voltage.ToString();
-            this.lblmag.Text = cfm.M_Config_Param.Magnification.ToString();
-            this.lblpixel.Text = cfm.M_Config_Param.Pixel_Size.ToString();
+            //this.lblvoltage.Text = cfm.M_Config_Param.Voltage.ToString();
+            //this.lblmag.Text = cfm.M_Config_Param.Magnification.ToString();
+            //this.lblpixel.Text = cfm.M_Config_Param.Pixel_Size.ToString();
         }
     }
 }

+ 5 - 11
MeasureData/ConfigManager.cs → MeasureData/ConfigFile.cs

@@ -10,7 +10,7 @@ using FileManager;
 
 namespace MeasureData
 {
-    public class ConfigManager : ISlo
+    public class ConfigFile : ISlo
     {
         #region 内容
         //是否PT沉积
@@ -37,18 +37,12 @@ namespace MeasureData
             set { this.sample_Name = value; }
         }
 
-        //样品配置参数
-        private MeasureConfigParam m_Config_Param;
-        public MeasureConfigParam M_Config_Param
-        {
-            get { return this.m_Config_Param; }
-            set { this.m_Config_Param = value; }
-        }
+       
         #endregion
 
-        public ConfigManager()
+        public ConfigFile()
         {
-            this.m_Config_Param = new MeasureConfigParam();
+            //this.m_Config_Param = new MeasureConfigParam();
         }
 
 
@@ -137,7 +131,7 @@ namespace MeasureData
             sFile.Register("PT_Depostion", pt_depostion);
             sFile.Register("Template_File", template_file);
             sFile.Register("Sample_Name", sample_name);
-            sFile.Register("MeasureConfigParam", m_Config_Param);
+            //sFile.Register("MeasureConfigParam", m_Config_Param);
 
 
             if (isStoring)

+ 0 - 71
MeasureData/MeasureConfigParam.cs

@@ -1,71 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using FileManager;
-using System.Xml;
-
-namespace MeasureData
-{
-    public class MeasureConfigParam :ISlo
-    {
-        #region 内容
-        //测量电压
-        private double voltage;
-        public double Voltage
-        {
-            get { return this.voltage; }
-            set { this.voltage = value; }
-        }
-
-        //放大位数
-        private double magnification;
-        public double Magnification
-        {
-            get { return this.magnification; }
-            set { this.magnification = value; }
-        }
-
-        //像素
-        private double pixel_Size;
-        public double Pixel_Size
-        {
-            get { return this.pixel_Size; }
-            set { this.pixel_Size = value; }
-        }
-        #endregion
-
-        public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
-        {
-            Slo sFile = new Slo();
-            Slo sParam = new Slo();
-
-
-            xDouble _voltage = new xDouble();
-            xDouble _magnification = new xDouble();
-            xDouble _pixelsize = new xDouble();
-
-            _voltage.AssignValue(this.voltage);
-            _magnification.AssignValue(this.magnification);
-            _pixelsize.AssignValue(this.pixel_Size);
-            sFile.Register("Voltage", _voltage);
-            sFile.Register("Magnification", _magnification);
-            sFile.Register("PixelSize", _pixelsize);
-
-
-            if (isStoring)
-            {
-                sFile.Serialize(true, xml, rootNode);
-            }
-            else
-            {
-                sFile.Serialize(false, xml, rootNode);
-
-                this.voltage = _voltage.value();
-                this.magnification = _magnification.value();
-                this.pixel_Size = _pixelsize.value();
-            }
-        }
-    }
-}

+ 1 - 2
MeasureData/MeasureData.csproj

@@ -47,9 +47,8 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="ConfigManager.cs" />
+    <Compile Include="ConfigFile.cs" />
     <Compile Include="CutHole.cs" />
-    <Compile Include="MeasureConfigParam.cs" />
     <Compile Include="MeasureFile.cs" />
     <Compile Include="MeasureParam.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />

+ 2 - 2
MeasureData/MeasureParam.cs

@@ -35,7 +35,7 @@ namespace MeasureData
             set { this.m_pt = value; }
         }
 
-        //FIB工作模板
+        //FIB使用的ELY文件
         private string m_fibTemp;
         public string FIBTemp
         {
@@ -43,7 +43,7 @@ namespace MeasureData
             set { this.m_fibTemp = value; }
         }
 
-        //PT工作模板,这个暂时不使用,FIB和PT是一个模板
+        //PT使用的ELY文件
         private string m_ptTemp;
         public string PTTemp
         {

+ 5 - 4
WebManager/WebResult.cs

@@ -92,12 +92,14 @@ namespace WebManager
         /// </summary>
         /// <param name="imagePath">图片路径</param>
         /// <returns>json字符串</returns>
-        public void Img_OffsetAngle_Direction(String imagePath, out double degree, out int direction, out int state)
+        public void Img_OffsetAngle_Direction(String imagePath, int imageType, String firm, out double degree, out int direction, out int state)
         {
-            this.webServer_Path = "test1";
+            this.webServer_Path = "FIB_degree_recognize";
             Update_Url();
             JObject json = new JObject();
             json.Add("img_path", imagePath);
+            json.Add("img_type", imageType);
+            json.Add("firm", firm);
             String res = RequestString(JsonConvert.SerializeObject(json));
             JObject jret= (JObject)JsonConvert.DeserializeObject(res);
 
@@ -114,7 +116,6 @@ namespace WebManager
                 direction = 0;
                 degree = 0;
             }
-
         }
 
         /// <summary>
@@ -154,7 +155,7 @@ namespace WebManager
         /// <returns>json字符串</returns>
         public void Img_Cut_Success(String imageBefore, String imageAfter, out int state)
         {
-            this.webServer_Path = "test3";
+            this.webServer_Path = "FIB_verify";
             Update_Url();
             JObject json = new JObject();
             json.Add("img_before_path", imageBefore);