From ec34983e291d1c85284472a27109d55891f9a6b5 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 07 八月 2020 16:20:16 +0800
Subject: [PATCH] 不是新代码,别 合并

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
index 4ea33c1..76b0fa8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
@@ -77,11 +77,8 @@
                 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);
+                HdlFileLogic.Current.SaveFileContent(DirNameResourse.AccountOptionFile, this);
                 //杩樺師鏄庣爜
                 PswAuthentication = oldPswAuthentication;
                 GestureAuthentication = oldGestureAuthentication;
@@ -98,14 +95,14 @@
         /// <returns></returns>
         public AccountOptionClass Load()
         {
-            string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
+            string fileName = DirNameResourse.AccountOptionFile;
             if (System.IO.File.Exists(fileName) == false)
             {
                 return new AccountOptionClass();
             }
             try
             {
-                var varByte = Shared.IO.FileUtils.ReadFile(fileName);
+                var varByte = HdlFileLogic.Current.ReadFileByteContent(fileName);
                 string strValue = System.Text.Encoding.UTF8.GetString(varByte);
                 var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOptionClass>(strValue);
                 //瑙e瘑瀵嗙爜

--
Gitblit v1.8.0