From fec341de45f4b3fd1825807f0b3261143fa13caa Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期一, 29 十二月 2025 17:03:45 +0800
Subject: [PATCH] 修复部分显示工具为面向对象。

---
 LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs b/LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs
index 43158ae..ee4545a 100644
--- a/LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs
+++ b/LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs
@@ -1,7 +1,8 @@
 锘縰sing HalconDotNet;
+using LB_SmartVision.Forms.Pages.SettingPage;
 using LB_SmartVision.ProcessRun;
 using LB_VisionControl;
-using Layout = LB_SmartVision.Forms.Pages.SettingPage.Layout;
+
 
 namespace LB_SmartVision.Forms.Pages.ProcessPage
 {
@@ -71,17 +72,19 @@
                 }));
             }
             else
+            {
                 UserHSmartWindowControl.ClearObj();
+            }
         }
 
         /// <summary>
         /// 寮傛鏄剧ず鍥剧墖
         /// </summary>
         /// <param name="ho_image"></param>
-        public void ShowHoImage(HObject ho_image)
+        public void ShowHoImage(HImage ho_image)
         {
+            string str = this.lblTitle.Text;
             UserHSmartWindowControl.hImage = ho_image;
-
             if (this.InvokeRequired)
             {
                 this.BeginInvoke(new Action(() =>
@@ -90,7 +93,9 @@
                 }));
             }
             else
+            {
                 this.label1.Text = $"鎬绘暟锛歿ProcessRunBll.total}";
+            }
         }
 
         public bool Run(out string msg)
@@ -101,8 +106,10 @@
                 return false;
             }
 
-            if (isCircleRuning || ProcessRunBll.bPruning)
+            if (isCircleRuning || ProcessRunBll.bRuning)
+            {
                 ProcessRunBll.LogInfo($"{ProcessRunBll.Name}姝e湪杩愯", LogInfoType.ERROR);
+            }
 
             ProcessRunBll.Run();
 
@@ -119,15 +126,19 @@
                 try
                 {
                     if (ProcessRunBll == null)
+                    {
                         return;
+                    }
 
                     ProcessRunBll.LogInfo(string.Format("娴佺▼[{0}]寮�濮嬭繍琛�", this.ProcessRunBll.Name), LogInfoType.INFO);
 
                     ClearObj();
                     result = Run(out msg);
 
-                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
+                    if (ProcessRunBll.GetImage(_Layout, out _, out HImage RecordImage))
+                    {
                         ShowHoImage(RecordImage);
+                    }
                 }
                 catch { msg = "杩愯鍑虹幇浜嗗紓甯�"; }
 
@@ -155,7 +166,7 @@
                 else
                 {
                     isCircleRuning = false;
-                    threadCircleRun.Abort();
+                    //threadCircleRun.Abort();
                 }
             }
             catch { }
@@ -187,13 +198,15 @@
                     ProcessRunBll.LogInfo($"{ProcessRunBll.Name}杩愯缁撴潫,缁撴灉涓�:{msg}"
                         , result ? LogInfoType.PASS : LogInfoType.ERROR);
 
-                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
+                    if (ProcessRunBll.GetImage(_Layout, out _, out HImage RecordImage))
+                    {
                         ShowHoImage(RecordImage);
+                    }
                 }
                 catch { }
                 //}));
 
-                Thread.Sleep(100);
+                Thread.Sleep(33);
             }
         }
 

--
Gitblit v1.9.3