| | |
| | | });
|
| | | return;
|
| | | }
|
| | | else if (topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
|
| | | || topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
|
| | | {
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 3)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //分享数据已经变更,请重新登陆
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uShardDataIsChangedPleaseLoginAgain);
|
| | | var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
|
| | | contr.Show();
|
| | |
|
| | | UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
|
| | | });
|
| | | }
|
| | | return;
|
| | | }
|
| | | try
|
| | | {
|
| | | if (HdlGatewayLogic.Current.IsGatewayExist(gatewayId) == false)
|
| | |
| | | return;
|
| | | }
|
| | | var tempDevice = new CommonDevice() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
|
| | | tempDevice.IsOnline = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(receiveData["Data"]["IsOnline"].ToString());
|
| | | tempDevice.IsOnline = Convert.ToInt32(receiveData["Data"]["IsOnline"].ToString());
|
| | |
|
| | | this.DeviceReportPush(tempDevice, ReceiveComandDiv.A设备在线上报);
|
| | | }
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | |
|
| | | #region ■ 添加设备事件_______________________
|
| | |
|
| | | /// <summary>
|
| | |
| | | //有可能在回调函数中移除了事件,导致报错,所以先收集,再调用
|
| | | foreach (var action in list)
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | try
|
| | | {
|
| | | try
|
| | | {
|
| | | action?.Invoke(common);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | //Log出力
|
| | | string msg = "推送错误! 当前激活的界面[" + UserCenterResourse.NowActionFormID + "]";
|
| | | HdlLogLogic.Current.WriteLog(ex, msg);
|
| | | }
|
| | | });
|
| | | action?.Invoke(common);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | //Log出力
|
| | | string msg = "推送错误! 当前激活的界面[" + UserCenterResourse.NowActionFormID + "]";
|
| | | HdlLogLogic.Current.WriteLog(ex, msg);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|