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/Logic/HdlBackupLogic.cs | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs index cafdac5..0788c92 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs @@ -577,13 +577,27 @@ { try { - //鍒犻櫎鏈湴鍏ㄩ儴Log - Global.CreateEmptyDirectory(Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory), true); + var listAllFile = HdlAutoBackupLogic.GetFileFromDirectory(upPath); + if (listAllFile.Count > 10) + { + listAllFile.Sort(); + while (listAllFile.Count >= 10) + { + System.IO.File.Delete(listAllFile[0]); + listAllFile.RemoveAt(0); + } + } } catch { } } ProgressFormBar.Current.Close(); + HdlThreadLogic.Current.RunMain(() => + { + var contr = new ShowMsgControl(ShowMsgType.Tip, "Log涓婁紶鎴愬姛"); + contr.Show(); + }); + return result; } -- Gitblit v1.8.0