HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-11-28 3a26f6025130dcaae4aa82ea19b16ad902450eb8
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -520,7 +520,7 @@
            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();
@@ -622,7 +622,8 @@
                HdlGatewayLogic.Current.ClearAllRealGateway();
                try
                {
                    ZigBee.Device.ZbGateway.DisRemoteMqttClientConnect();
                    //断开远程Mqtt连接
                    ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient();
                }
                catch { }
@@ -790,6 +791,13 @@
            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;
                //加载账号配置信息
@@ -844,11 +852,11 @@
                HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
                //0:已经同步过,不需要同步,这个时候需要提示备份
                //if (result == 0)
                //{
                //    //开启自动备份提示
                //    HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
                //}
                if (result == 0)
                {
                    //开启自动备份提示
                    HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
                }
            }
            //APP缓存加载完成
            UserCenterResourse.Option.AppCanSignout = true;
@@ -929,7 +937,7 @@
                    newHouse.IsOthreShare = house.IsOthreShare;
                    newHouse.AccountType = house.AccountType;
                    newHouse.MainUserDistributedMark = house.MainUserDistributedMark;
                    newHouse.Save();
                    newHouse.Save(false);
                }
            }
            if (string.IsNullOrEmpty(userInfo.UserName) == true)