黄学彪
2020-07-13 f3e65daca7978b21b5888f49b1bf35e1a6e5d4fd
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
@@ -77,7 +77,7 @@
                this.ShowTipMsg(msg);
                return false;
            }
            var mainWayId = HdlGatewayLogic.Current.GetGatewayId(mainGateway);
            var mainWayId = mainGateway.GwId;
            //主题数固定5+3+1
            int topicCount = 9;
@@ -104,7 +104,7 @@
                {
                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
                    var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.Safeguard.ErrorResponData>(jobject["Data"].ToString());
                    var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                    if (temp != null)
                    {
                        string msg = HdlCheckLogic.Current.CheckCommonErrorCode(temp.Error);
@@ -1154,10 +1154,10 @@
                    }
                    else if (data.Type == "1")
                    {
                        var scene = Common.SceneRoomUI.AllSceneRoomUIList.Find((obj) => obj.sceneUI.Id == data.ScenesId);
                        var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(data.ScenesId);
                        if (scene != null)
                        {
                            string msg = scene.sceneUI.Name + "\r\n";
                            string msg = scene.Name + "\r\n";
                            //目标场景不存在
                            msg += Language.StringByID(R.MyInternationalizationString.uTargetSceneIsNotExsit);
                            this.ShowTipMsg(msg);
@@ -1366,7 +1366,7 @@
            if (this.UserPassword == null)
            {
                var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword);
                var data = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.SafeguardUserPassword);
                if (data != null)
                {
                    this.UserPassword = System.Text.Encoding.UTF8.GetString(data);
@@ -1384,7 +1384,7 @@
                if (result != GarrisonMode.None && result != GarrisonMode.RemoveGarrison)
                {
                    //保存加密的密码到本地
                    Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
                    HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                }
                return result;
            }
@@ -1473,7 +1473,7 @@
                    if (result2 != GarrisonMode.None && result2 != GarrisonMode.RemoveGarrison)
                    {
                        //保存加密密码到本地
                        Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
                        HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                    }
                    return result2;
                }
@@ -1588,7 +1588,7 @@
                    if (result2 != -1)
                    {
                        //保存到加密密码本地
                        Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
                        HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                    }
                    return result2;
                }
@@ -2085,7 +2085,7 @@
                            dicSort[modelNo] = Language.StringByID(R.MyInternationalizationString.Mode_Dry);
                        }
                    }
                    else if (info.Data1 == 4 || info.Data1 == 5)
                    else if (info.Data1 == 4 || info.Data1 == 5|| info.Data1 == 7)
                    {
                        //温度
                        dicSort[temparetureNo] = $"{ info.Data2 / 100}℃";
@@ -2154,7 +2154,7 @@
            bool success = false;
            //超时时间
            int TimeOut = 0;
            string checkTopic = HdlGatewayLogic.Current.GetGatewayId(realWay) + "/Security/AdminSetNewPassword_Respon";
            string checkTopic = realWay.GwId + "/Security/AdminSetNewPassword_Respon";
            Action<string, string> getResultAction = (topic, message) =>
            {
                try