From 2bf5ec775cb57d8015bee58c745a1e48081ff1b1 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 15 十月 2019 11:06:05 +0800 Subject: [PATCH] 首次合并了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs | 77 ++------------------------------------ 1 files changed, 5 insertions(+), 72 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs index 080da65..3167003 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs @@ -899,9 +899,13 @@ /// </summary> public Dictionary<string, string> dicAllShardKeys = new Dictionary<string, string>(); /// <summary> - /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�) + /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�,keys:鏂囦欢鍚�) /// </summary> public Dictionary<string, Common.Room> dicShardRoom = new Dictionary<string, Common.Room>(); + /// <summary> + /// 鍒嗕韩鐨勬ゼ灞� + /// </summary> + public Dictionary<string, string> dicShardFloor = new Dictionary<string, string>(); /// <summary> /// 鏄惁闇�瑕佸埛鏂� /// </summary> @@ -983,77 +987,6 @@ /// 搴旇鍙繙绋嬭繛鎺ョ殑鍚嶅瓧鍚� /// </summary> public string ConnectZigbeeMqttBrokerName = string.Empty; - } - - #endregion - - #region 鈻� 璐﹀彿璁剧疆绫籣_________________________ - - /// <summary> - /// 璐﹀彿璁剧疆淇℃伅 - /// </summary> - public class AccountOption - { - /// <summary> - /// 鏄惁浣跨敤鎸囩汗楠岃瘉 - /// </summary> - public bool FingerprintAuthentication = false; - /// <summary> - /// 瀵嗙爜楠岃瘉 - /// </summary> - public string PswAuthentication = string.Empty; - /// <summary> - /// 鎵嬪娍楠岃瘉 - /// </summary> - public string GestureAuthentication = string.Empty; - /// <summary> - /// 鏄惁浣跨敤杩滅▼寮�閿� - /// </summary> - public bool DoorUnLockByRemote = false; - /// <summary> - /// 淇濆瓨 - /// </summary> - public void Save() - { - //鍔犲瘑瀵嗙爜 - string hdlKey = "hD1(La3o"; - string oldPswAuthentication = PswAuthentication; - PswAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldPswAuthentication); - - string oldGestureAuthentication = GestureAuthentication; - GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication); - - var data = Newtonsoft.Json.JsonConvert.SerializeObject(this); - var byteData = System.Text.Encoding.UTF8.GetBytes(data); - string fullName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile); - //鍐欏叆鍐呭 - Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData); - //杩樺師鏄庣爜 - PswAuthentication = oldPswAuthentication; - GestureAuthentication = oldGestureAuthentication; - } - - /// <summary> - /// 鍔犺浇鏁版嵁 - /// </summary> - /// <returns></returns> - public AccountOption Load() - { - string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile); - if (System.IO.File.Exists(fileName) == false) - { - return new AccountOption(); - } - var varByte = Shared.IO.FileUtils.ReadFile(fileName); - string strValue = System.Text.Encoding.UTF8.GetString(varByte); - var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOption>(strValue); - //瑙e瘑瀵嗙爜 - string hdlKey = "hD1(La3o"; - info.PswAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.PswAuthentication); - info.GestureAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.GestureAuthentication); - - return info; - } } #endregion -- Gitblit v1.8.0