黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Common/Common/AccountOption.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter
namespace Shared.Phone
{
    /// <summary>
    /// 账号设置信息
@@ -42,21 +42,6 @@
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public bool AppCanSignout = false;
        /// <summary>
        /// 前一次的住宅ID,这个东西是给UserCenterLogic.InitUserCenterMenmoryAndThread()用的
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string OldHomeStringId = string.Empty;
        /// <summary>
        /// 前一次的登录账号,这个东西是给UserCenterLogic.InitUserCenterMenmoryAndThread()用的
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string OldAccountId = string.Empty;
        /// <summary>
        /// 用户图片目录路径
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string UserPictruePath = string.Empty;
        #endregion
@@ -72,13 +57,13 @@
                //加密密码
                string hdlKey = "hD1(La3o";
                string oldPswAuthentication = PswAuthentication;
                PswAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldPswAuthentication);
                PswAuthentication = HdlCommonLogic.Current.EncryptPassword(hdlKey, oldPswAuthentication);
                string oldGestureAuthentication = GestureAuthentication;
                GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication);
                GestureAuthentication = HdlCommonLogic.Current.EncryptPassword(hdlKey, oldGestureAuthentication);
                //写入内容
                HdlFileLogic.Current.SaveFileContent(DirNameResourse.AccountOptionFile, this);
                HdlFileLogic.Current.SaveFileContent(HdlFileNameResourse.AccountOptionFile, this);
                //还原明码
                PswAuthentication = oldPswAuthentication;
                GestureAuthentication = oldGestureAuthentication;
@@ -95,7 +80,7 @@
        /// <returns></returns>
        public AccountOptionClass Load()
        {
            string fileName = DirNameResourse.AccountOptionFile;
            string fileName = HdlFileNameResourse.AccountOptionFile;
            if (System.IO.File.Exists(fileName) == false)
            {
                return new AccountOptionClass();
@@ -107,8 +92,8 @@
                var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOptionClass>(strValue);
                //解密密码
                string hdlKey = "hD1(La3o";
                info.PswAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.PswAuthentication);
                info.GestureAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.GestureAuthentication);
                info.PswAuthentication = HdlCommonLogic.Current.DecryptPassword(hdlKey, info.PswAuthentication);
                info.GestureAuthentication = HdlCommonLogic.Current.DecryptPassword(hdlKey, info.GestureAuthentication);
                return info;
            }