old mode 100755
new mode 100644
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs |
| | |
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter
|
| | | namespace Shared.Phone |
| | | {
|
| | | /// <summary>
|
| | | /// 账号设置信息
|
| | |
| | | /// </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
|
| | |
|
| | |
| | | //加密密码
|
| | | 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;
|
| | |
| | | /// <returns></returns>
|
| | | public AccountOptionClass Load()
|
| | | {
|
| | | string fileName = DirNameResourse.AccountOptionFile;
|
| | | string fileName = HdlFileNameResourse.AccountOptionFile; |
| | | if (System.IO.File.Exists(fileName) == false)
|
| | | {
|
| | | return new AccountOptionClass();
|
| | |
| | | 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;
|
| | | }
|