From fa6bcb2e9907772480f99205f36ec2a1ce735a22 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 一月 2020 14:11:07 +0800
Subject: [PATCH] 合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
index 4257b39..368d3c0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
@@ -26,10 +26,19 @@
         /// </summary>
         public bool DoorUnLockByRemote = false;
         /// <summary>
+        /// 鏄惁浣跨敤瀹夐槻蹇嵎鏂瑰紡
+        /// </summary>
+        public bool SafetyShortcut = false;
+        /// <summary>
         /// 瀵嗙爜鍓╀綑鍙緭鍏ユ鏁�
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
         public int PasswordInputCount = 3;
+        /// <summary>
+        /// 鎵嬪娍瀵嗙爜鍓╀綑鍙緭鍏ユ鏁�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public int PasswordGestureInputCount = 5;
         /// <summary>
         /// 妫�娴婣PP鏄惁鑳藉閫�鍑�
         /// </summary>
@@ -107,15 +116,23 @@
             {
                 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);
+            try
+            {
+                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;
+                return info;
+            }
+            catch (Exception ex)
+            {
+                HdlLogLogic.Current.WriteLog(ex);
+                return new AccountOption();
+            }
         }
 
         /// <summary>
@@ -124,6 +141,7 @@
         public void ResetPasswordCount()
         {
             this.PasswordInputCount = 3;
+            this.PasswordGestureInputCount = 5;
         }
 
         #endregion

--
Gitblit v1.8.0