黄学彪
2019-12-12 7e863a33397f317ffc3ffd9288496d0e4f16aa66
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;
        }