From 17db44bdab7772f465969bf778d417e08bf8a5f0 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期六, 04 七月 2020 17:58:34 +0800 Subject: [PATCH] 1. 大/小复位,机台状态 2. 板卡操作配置复数化 3. 界面日志输出机制修改 4. M071主界面CT,测量结果,测量状态,机台状态输出 --- src/Bro.UI.Config/Ctrls/CtrlMethodInvoke.cs | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Bro.UI.Config/Ctrls/CtrlMethodInvoke.cs b/src/Bro.UI.Config/Ctrls/CtrlMethodInvoke.cs index 84b159e..382ce1b 100644 --- a/src/Bro.UI.Config/Ctrls/CtrlMethodInvoke.cs +++ b/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())); } }); } -- Gitblit v1.8.0