C3204
2025-12-25 ed0b1e3c75489ea76e01b1c6bebd3bb2d90e7535
LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs
@@ -1,7 +1,8 @@
using 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,7 +72,9 @@
                }));
            }
            else
            {
                UserHSmartWindowControl.ClearObj();
            }
        }
        /// <summary>
@@ -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}正在运行", LogInfoType.ERROR);
            }
            ProcessRunBll.Run();
@@ -119,7 +126,9 @@
                try
                {
                    if (ProcessRunBll == null)
                    {
                        return;
                    }
                    ProcessRunBll.LogInfo(string.Format("流程[{0}]开始运行", this.ProcessRunBll.Name), LogInfoType.INFO);
@@ -127,7 +136,9 @@
                    result = Run(out msg);
                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
                    {
                        ShowHoImage(RecordImage);
                    }
                }
                catch { msg = "运行出现了异常"; }
@@ -155,7 +166,7 @@
                else
                {
                    isCircleRuning = false;
                    threadCircleRun.Abort();
                    //threadCircleRun.Abort();
                }
            }
            catch { }
@@ -188,12 +199,14 @@
                        , result ? LogInfoType.PASS : LogInfoType.ERROR);
                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
                    {
                        ShowHoImage(RecordImage);
                    }
                }
                catch { }
                //}));
                Thread.Sleep(100);
                Thread.Sleep(33);
            }
        }