| | |
| | | })); |
| | | } |
| | | 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(() => |
| | |
| | | })); |
| | | } |
| | | else |
| | | { |
| | | this.label1.Text = $"总数:{ProcessRunBll.total}"; |
| | | } |
| | | } |
| | | |
| | | public bool Run(out string msg) |
| | |
| | | } |
| | | |
| | | if (isCircleRuning || ProcessRunBll.bRuning) |
| | | { |
| | | ProcessRunBll.LogInfo($"{ProcessRunBll.Name}正在运行", LogInfoType.ERROR); |
| | | } |
| | | |
| | | ProcessRunBll.Run(); |
| | | |
| | |
| | | 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 = "运行出现了异常"; } |
| | | |
| | |
| | | else |
| | | { |
| | | isCircleRuning = false; |
| | | //threadCircleRun.Abort(); |
| | | threadCircleRun.Abort(); |
| | | } |
| | | } |
| | | catch { } |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |