From 4f0ab0ad21ce450b7856d50f98322a7899361386 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 22 九月 2020 10:30:01 +0800
Subject: [PATCH] 不要下载这个备份
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/ResidenceOption.cs | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/ResidenceOption.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/ResidenceOption.cs
index d623e7e..c4dfa2e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/ResidenceOption.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/ResidenceOption.cs
@@ -45,11 +45,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public int CategoryPageSwitchIndex = 0;
- /// <summary>
- /// 褰撳墠鐧诲綍鐨勮处鍙锋槸涓嶆槸涔嬪墠鐨勮处鍙�
- /// </summary>
- [Newtonsoft.Json.JsonIgnore]
- public bool TheSameLoginAccount = false;
#endregion
@@ -60,18 +55,8 @@
/// </summary>
public void Save()
{
- try
- {
- var data = Newtonsoft.Json.JsonConvert.SerializeObject(this);
- var byteData = System.Text.Encoding.UTF8.GetBytes(data);
- string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ResidenceOptionFile);
- //鍐欏叆鍐呭
- Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
- }
- catch (Exception ex)
- {
- HdlLogLogic.Current.WriteLog(ex);
- }
+ //鍐欏叆鍐呭
+ HdlFileLogic.Current.SaveFileContent(DirNameResourse.ResidenceOptionFile, this);
}
/// <summary>
@@ -80,14 +65,14 @@
/// <returns></returns>
public ResidenceOptionClass Load()
{
- string fileName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ResidenceOptionFile);
+ string fileName = DirNameResourse.ResidenceOptionFile;
if (System.IO.File.Exists(fileName) == false)
{
return new ResidenceOptionClass();
}
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<ResidenceOptionClass>(strValue);
--
Gitblit v1.8.0