From 7e863a33397f317ffc3ffd9288496d0e4f16aa66 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 12 十二月 2019 14:58:20 +0800
Subject: [PATCH] 合并了新代码

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

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
index 87e1f1d..368d3c0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
@@ -116,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>

--
Gitblit v1.8.0