| | |
| | | //如果用户已经退出了登陆,则不处理
|
| | | return;
|
| | | }
|
| | | string msg = IMessageCommon.Current.GetMsgByRequestName(RequestName, revertObj.StateCode, pra);
|
| | | string msg = IMessageCommon.Current.GetMsgByRequestName(RequestName, revertObj, pra);
|
| | | if (msg != null)
|
| | | {
|
| | | var control = new ShowMsgControl(ShowMsgType.Tip, msg);
|
| | |
| | | Config.Instance.Home.IsOthreShare = isOthreShare;
|
| | | Config.Instance.Home.AccountType = accountType;
|
| | | Config.Instance.Home.MainUserDistributedMark = mainMark;
|
| | | Config.Instance.Home.Save();
|
| | | Config.Instance.Home.Save(false);
|
| | |
|
| | | //刷新本地网关文件
|
| | | HdlGatewayLogic.Current.ReFreshByLocal();
|
| | |
| | | {
|
| | | UserCenterResourse.Option.OldAccountId = string.Empty;
|
| | | //关闭所有接收
|
| | | HdlDeviceAttributeLogic.Current.RemoveAllEvent();
|
| | | HdlGatewayReceiveLogic.Current.RemoveAllEvent();
|
| | | //清除升级列表
|
| | | FirmwareUpdateResourse.dicDeviceUpdateList.Clear();
|
| | | FirmwareUpdateResourse.dicGatewayUpdateList.Clear();
|
| | |
| | | HdlGatewayLogic.Current.ClearAllRealGateway();
|
| | | try
|
| | | {
|
| | | ZigBee.Device.ZbGateway.RemoteMqttClient?.DisconnectAsync();
|
| | | //断开远程Mqtt连接
|
| | | ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient();
|
| | | }
|
| | | catch { }
|
| | |
|
| | |
| | | if (Common.Config.Instance.HomeId != UserCenterResourse.Option.OldHomeStringId
|
| | | || Common.Config.Instance.Account != UserCenterResourse.Option.OldAccountId)
|
| | | {
|
| | | try
|
| | | {
|
| | | //断开远程Mqtt连接
|
| | | ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient();
|
| | | }
|
| | | catch { }
|
| | |
|
| | | //消息记录重新读取及检测
|
| | | ControlCommonResourse.ReadMessageAgain = true;
|
| | | //加载账号配置信息
|
| | | var optionInfo = UserCenterResourse.Option.Load();
|
| | | UserCenterResourse.Option = optionInfo;
|
| | |
| | | CreatAllUserCenterDirectory();
|
| | |
|
| | | //关闭所有接收
|
| | | HdlDeviceAttributeLogic.Current.RemoveAllEvent();
|
| | | HdlGatewayReceiveLogic.Current.RemoveAllEvent();
|
| | | //刷新安防上报信息
|
| | | HdlAlarmsLogic.Current.RefreshAlarmInfo();
|
| | | //添加保存安防设备报警的事件(不需要再执行任何操作,并且永久存在)
|
| | | HdlAlarmsLogic.Current.AddAlarmInfoEvent();
|
| | |
|
| | | //保存用户的登陆信息到本地
|
| | | SaveUserInformationToLocation();
|
| | |
| | | HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
|
| | |
|
| | | //0:已经同步过,不需要同步,这个时候需要提示备份
|
| | | //if (result == 0)
|
| | | //{
|
| | | // //开启自动备份提示
|
| | | // HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
|
| | | //}
|
| | | if (result == 0)
|
| | | {
|
| | | //开启自动备份提示
|
| | | HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
|
| | | }
|
| | | }
|
| | | //APP缓存加载完成
|
| | | UserCenterResourse.Option.AppCanSignout = true;
|
| | |
| | | newHouse.IsOthreShare = house.IsOthreShare;
|
| | | newHouse.AccountType = house.AccountType;
|
| | | newHouse.MainUserDistributedMark = house.MainUserDistributedMark;
|
| | | newHouse.Save();
|
| | | newHouse.Save(false);
|
| | | }
|
| | | }
|
| | | if (string.IsNullOrEmpty(userInfo.UserName) == true)
|