ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -145,14 +145,24 @@ //命令区分一致时,则调用回调函数 list.Add(this.dicEvent[keys]); } HdlThreadLogic.Current.RunMain(() => //有可能在回调函数中移除了事件,导致报错,所以先收集,再调用 Application.RunOnMainThread(() => { //有可能在回调函数中移除了事件,导致报错,所以先收集,再调用 foreach (var action in list) { action?.Invoke(common); try { action?.Invoke(common); } catch (Exception ex) { //Log出力 string msg = "当前激活的界面[" + UserCenterResourse.NowActionFormID + "]"; HdlLogLogic.Current.WriteLog(-1, msg); HdlLogLogic.Current.WriteLog(ex); } } list.Clear(); }); } }