/// <summary> /// 窗口4显示的内容 /// [可以自定义显示的内容] /// </summary> /// <param name="appProData"></param> private void Camera3UpdateIconic(ProVisionEbd.Data.AppProcessData appProData) { try { if (_hwndCtrller3 != null) { if (appProData != null) { this.Invoke(new System.Windows.Forms.MethodInvoker(() => { _hwndCtrller3.ClearEntities(); _hwndCtrller3.ClearMessageLineList(); if (_hoImage3 != null && _hoImage3.IsInitialized()) { _hoImage3.Dispose(); } _hoImage3 = appProData.RawImage.Clone(); _hwndCtrller3.AddHobjEntity(_hoImage3); _hwndCtrller3.ChangeGraphicSettings(ProVision.InteractiveROI.GraphicContext.GC_COLOR, "yellow"); _hwndCtrller3.AddHobjEntity(appProData.InspetcRegion); ProVision.Communal.MessageLine msl = new ProVision.Communal.MessageLine(); if (appProData.ImgProcessOK) { if (appProData.ImgResultOK) { msl.Context = "处理结果满足要求"; msl.CtxColor = "green"; _hwndCtrller3.ChangeGraphicSettings(ProVision.InteractiveROI.GraphicContext.GC_COLOR, "green"); } else { msl.Context = "处理结果不满足要求"; msl.CtxColor = "red"; _hwndCtrller3.ChangeGraphicSettings(ProVision.InteractiveROI.GraphicContext.GC_COLOR, "red"); } } else { msl.Context = "图像处理异常"; msl.CtxColor = "red"; _hwndCtrller3.ChangeGraphicSettings(ProVision.InteractiveROI.GraphicContext.GC_COLOR, "red"); } _hwndCtrller3.AddMessageLine(msl); _hwndCtrller3.AddHobjEntity(appProData.ResultRegion); _hwndCtrller3.Repaint(); appProData.Dispose(); })); } } } catch (HalconDotNet.HalconException hex) { } catch (System.Exception ex) { } }
/// <summary> /// 添加信息条记录 /// </summary> /// <param name="msgLine"></param> public void AddMessageLine(ProVision.Communal.MessageLine msgLine) { if (msgLine == null) { return; } if (_msgLineList != null) { _msgLineList.Add(msgLine); } }