Kaynağa Gözat

更新测量线程,增加停止判断,退出保存测量文件。但程序需要测试。

@wang_qi0307 5 yıl önce
ebeveyn
işleme
fa8b8bd96b
4 değiştirilmiş dosya ile 470 ekleme ve 252 silme
  1. 6 6
      HOZProject/App.config
  2. 1 1
      ManulDo/MainForm.cs
  3. 459 241
      MeasureThread/Measure.cs
  4. 4 4
      WebManager/WebResult.cs

+ 6 - 6
HOZProject/App.config

@@ -54,11 +54,11 @@
       <!--远程算法地址-->
       <add key="WebServerUrl" value="FIB_degree_recognize,test2,FIB_verify,test4,test5,test6,test7,test8"/>
 
-      <add key="" value=""/>
-      <add key="" value=""/>
-      <add key="" value=""/>
-      <add key="" value=""/>
-      <add key="" value=""/>
-      <add key="" value=""/>
+      <!--调节上限-->
+      <add key="Focus_UP" value="3000"/>
+      <add key="Focus_Down" value="15000"/>
+      <add key="Focus_Step" value="1000"/>
+      <add key="Focus_Range" value="2000"/>
+      <add key="Focus_FStep" value="50"/>
     </appSettings>
 </configuration>

+ 1 - 1
ManulDo/MainForm.cs

@@ -59,7 +59,7 @@ namespace WindowsFormsApp1
         #region 测量线程
         void DoWork(object sender, DoWorkEventArgs e)
         {
-            m_Ms = new Measure();
+            m_Ms = new Measure("","","");
             m_Ms.InitMeas(m_MeasureFile);
             m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage); //注册事件
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 459 - 241
MeasureThread/Measure.cs


+ 4 - 4
WebManager/WebResult.cs

@@ -215,7 +215,7 @@ namespace WebManager
         /// </summary>
         /// <param name="imagePath">图片路径</param>
         /// <returns>json字符串</returns>
-        public void Img_Trapezoid_Top_Center_Position(String imagePath, out double offsetx, out double offsety, out int state)
+        public void Img_Trapezoid_Top_Center_Position(String imagePath, out float offsetx, out float offsety, out int state)
         {
             try
             {
@@ -234,8 +234,8 @@ namespace WebManager
             {
                 JObject jname = JObject.Parse(jret["img_name"].ToString());
                 JArray jlocation = JArray.Parse(jname["top_center"].ToString());
-                offsetx = Convert.ToDouble(jlocation[0].ToString());
-                offsety = Convert.ToDouble(jlocation[1].ToString());
+                offsetx = Convert.ToSingle(jlocation[0].ToString());
+                offsety = Convert.ToSingle(jlocation[1].ToString());
                 state = Convert.ToInt32(jname["state"].ToString());
             }
             else
@@ -362,7 +362,7 @@ namespace WebManager
         /// <param name="ratio">放大倍数</param>
         /// <param name="size">一像素代表**mm/um</param>
         /// <returns>json字符串</returns>
-        public void Img_Measure_Size(String imagePath, String ratio, String size, out int state)
+        public void Img_Measure_Size(String imagePath, float ratio, float size, out int state)
         {
             try
             {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor