From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份

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

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index e396d32..fffeefb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -244,14 +244,6 @@
             string fullDir = string.Empty;
             if (upPath == string.Empty)
             {
-                //灏嗘ā鏉挎暟鎹繚瀛樺埌鍒版寚瀹氱殑鏂囦欢澶逛腑
-                var templateName = TemplateData.TemplateCommonLogic.Current.GetNewTemplateFileName();
-                var templateFile = TemplateData.TemplateCommonLogic.Current.SaveTemplateDataToFile(templateName, "HomeTemplate");
-
-                //灏嗘ā鏉縝in鏂囦欢绉诲姩鍒板浠芥枃浠跺す涓�
-                try { System.IO.File.Move(templateFile, System.IO.Path.Combine(Config.Instance.FullPath, templateName)); }
-                catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex, "绉诲姩妯℃澘澶辫触"); }
-
                 //鑾峰彇鏈湴鏂囦欢
                 listAllFile = HdlFileLogic.Current.GetRootPathListFile();
                 fullDir = Common.Config.Instance.FullPath;
@@ -273,11 +265,6 @@
 
             foreach (string fileName in listAllFile)
             {
-                //鍒ゆ柇鎸囧畾鏂囦欢鏄惁闇�瑕佷笂浼�(鏍圭洰褰曠殑鎵嶅垽鏂�)
-                if (upPath == string.Empty && this.IsNotUpLoadFile(fileName) == true)
-                {
-                    continue;
-                }
                 if (fileName.EndsWith(".png") == true
                     || fileName.EndsWith(".bin") == true)
                 {
@@ -315,6 +302,11 @@
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.AccountOption.AppCanSignout = true;
                     return false;
+                }
+                //鍒ゆ柇鏄惁鏄簲璇ヤ笂浼犵殑鏂囦欢
+                if (IsNotUpLoadFile(file) == true && upPath == string.Empty)
+                {
+                    continue;
                 }
                 //鏁寸悊鏁版嵁
                 var datainfo = new FileInfoData();
@@ -792,15 +784,8 @@
             //鍏抽棴杩涘害鏉�
             ProgressFormBar.Current.Close();
 
-            //娓呯┖鍏ㄩ儴鎴块棿
-            HdlRoomLogic.Current.DeleteAllRoom();
-            //娓呯┖鏈湴鍏ㄩ儴鐨勫満鏅暟鎹�
-            HdlSceneLogic.Current.DeleteAllLocalScene();
             //濡傛灉璇诲彇鍒扮殑鏂囦欢瀹屽叏娌℃湁闂锛屽垯娓呯悊鏈湴鐨勬枃浠�
             HdlFileLogic.Current.DeleteAllLocationFile(false);
-
-            //娓呯悊鏈湴鐨勬ā鏉挎枃浠�
-            TemplateData.TemplateCommonLogic.Current.DeleteAllLocalFile();
 
             //娌℃湁閿欒鐨勮瘽锛屽垯绉诲姩鍒板綋鍓嶄綇瀹呮枃浠跺す涓嬮潰
             HdlFileLogic.Current.MoveDirectoryFileToHomeDirectory(tempDirectory, true);
@@ -844,14 +829,11 @@
         /// </summary>
         /// <param name="file"></param>
         /// <returns></returns>
-        private bool IsNotUpLoadFile(string file)
+        public bool IsNotUpLoadFile(string file)
         {
-            if (file.StartsWith("Device_") == true
-               || file.StartsWith("Gateway_") == true
-               || file.StartsWith("Room_") == true
-               || file.StartsWith("Scene_") == true)
+            if (file == "Config.json")
             {
-                //璁惧,缃戝叧,鎴块棿,鍦烘櫙鏂囦欢涓嶉渶瑕佷笂浼�,瀹冨凡缁忎繚瀛樺湪bin妯℃澘鏂囦欢涓�
+                //涓嶈兘瑕嗙洊Config鏂囦欢
                 return true;
             }
             return false;

--
Gitblit v1.8.0