C3204
2025-12-30 4b3a410a5083970bb2e56d2ab459d860c4fa22d0
LB_SmartVision/Forms/Pages/ProcessPage/ProcessControl.cs
@@ -72,19 +72,17 @@
                }));
            }
            else
            {
                UserHSmartWindowControl.ClearObj();
            }
        }
        /// <summary>
        /// 异步显示图片
        /// </summary>
        /// <param name="ho_image"></param>
        public void ShowHoImage(HImage ho_image)
        public void ShowHoImage(HObject ho_image)
        {
            string str = this.lblTitle.Text;
            UserHSmartWindowControl.hImage = ho_image;
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new Action(() =>
@@ -93,9 +91,7 @@
                }));
            }
            else
            {
                this.label1.Text = $"总数:{ProcessRunBll.total}";
            }
        }
        public bool Run(out string msg)
@@ -107,9 +103,7 @@
            }
            if (isCircleRuning || ProcessRunBll.bRuning)
            {
                ProcessRunBll.LogInfo($"{ProcessRunBll.Name}正在运行", LogInfoType.ERROR);
            }
            ProcessRunBll.Run();
@@ -126,19 +120,15 @@
                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 HImage RecordImage))
                    {
                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
                        ShowHoImage(RecordImage);
                    }
                }
                catch { msg = "运行出现了异常"; }
@@ -166,7 +156,7 @@
                else
                {
                    isCircleRuning = false;
                    //threadCircleRun.Abort();
                    threadCircleRun.Abort();
                }
            }
            catch { }
@@ -198,15 +188,13 @@
                    ProcessRunBll.LogInfo($"{ProcessRunBll.Name}运行结束,结果为:{msg}"
                        , result ? LogInfoType.PASS : LogInfoType.ERROR);
                    if (ProcessRunBll.GetImage(_Layout, out _, out HImage RecordImage))
                    {
                    if (ProcessRunBll.GetImage(_Layout, out _, out HObject RecordImage))
                        ShowHoImage(RecordImage);
                    }
                }
                catch { }
                //}));
                Thread.Sleep(33);
                Thread.Sleep(100);
            }
        }