From 78584911d0457ad9fc26d9dfc6f374b7ef531c0f Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期日, 22 十一月 2020 13:45:09 +0800 Subject: [PATCH] 1. 添加操作员输入和界面显示 2. 添加通过输入窗体 3. 添加webservice调用帮助类 4. M071添加MES数据检查和数据上传功能,添加相关界面显示和流程控制 --- 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