领胜LDS 键盘AOI检测项目
xcd
2020-07-14 d511823e84953e616da9a24484d730c49c457c08
src/Bro.UI.Config/Ctrls/CtrlMethodInvoke.cs
@@ -38,7 +38,7 @@
        }
        #region ILogoutput
        public Action<LogMsg> OnLogMsgOutput { get; set; }
        public event Action<LogMsg> OnLogMsgOutput;
        public void LogDisplay(LogMsg msg)
        {
@@ -157,11 +157,18 @@
            {
                OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用开始", ""));
                ProcessResponse response = _method.Invoke(Process, new object[] { opConfig, _invokeDevice, _sourceDevice }) as ProcessResponse;
                if (response != null)
                try
                {
                    OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用完成", $"反馈:{JsonConvert.SerializeObject(response)}"));
                    ProcessResponse response = _method.Invoke(Process, new object[] { opConfig, _invokeDevice, _sourceDevice }) as ProcessResponse;
                    if (response != null)
                    {
                        OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用完成", $"反馈:{JsonConvert.SerializeObject(response)}"));
                    }
                }
                catch (Exception ex)
                {
                    OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用异常", ex.GetExceptionMessage()));
                }
            });
        }