From 62d77d3bb8e7215d9da9ecf6f5aeda0b69f805f8 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 08 十二月 2020 18:57:15 +0800 Subject: [PATCH] 20201208 --- HDL_ON/DAL/FileUtils.cs | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/HDL_ON/DAL/FileUtils.cs b/HDL_ON/DAL/FileUtils.cs index 9104bcc..09c30f6 100644 --- a/HDL_ON/DAL/FileUtils.cs +++ b/HDL_ON/DAL/FileUtils.cs @@ -1,13 +1,7 @@ 锘縰sing System; using System.IO; using System.Collections.Generic; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using Shared; -//using HDL_ON.UI; -using HDL_ON.DAL.Net; -using HDL_ON.DAL; -using HDL_ON.Entity; namespace HDL_ON { @@ -56,6 +50,7 @@ foreach (var fileName in ReadRegionFiles(path)) { File.Delete(Path.Combine(path, fileName)); + MainPage.Log("鍒犻櫎鏂囦欢鍚嶄负锛�" + fileName); } } @@ -85,11 +80,11 @@ foreach (FileInfo NextFile in thFolders) { index++; - if (NextFile.Name == "headImage.png") + if (NextFile.Name.Contains(ImageUtlis.HEADIMAGE)) { continue; } - if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB") + if (NextFile.Name == "null" || NextFile.Name == "UserConfig" || NextFile.Name == "UserInfo_File" || NextFile.Name == "AccountListDB" || NextFile.Name == OnAppConfig.ConfigFile) { continue; } @@ -200,7 +195,7 @@ /// <param name="fileName">File name.</param> public static void DeleteFile(string fileName) { - if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB") + if (fileName == null || fileName == "Language.ini" || fileName == "AccountListDB" || fileName == OnAppConfig.ConfigFile) { return; } @@ -217,7 +212,7 @@ for (int j = 0; j < filesList.Count; j++) { var f = filesList[j]; - if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File") + if (f == "linphonerc" || f == "AccountListDB" || f == "UserInfo_File" || f == OnAppConfig.ConfigFile) continue; DeleteFile(f); } @@ -412,6 +407,21 @@ } } + /// <summary> + /// + /// </summary> + /// <param name="fileName"></param> + /// <param name="imagePath"></param> + public static void FileCopyToRootPath(string oldPath, string fileName) + { + System.IO.FileInfo fileInfo = new System.IO.FileInfo(oldPath); + if (fileInfo.Exists) + { + fileInfo.CopyTo(Path.Combine(RootPath, fileName), true); + //Utlis.WriteLine("FileCopyToRootPath : " + Path.Combine(RootPath, fileName)); + } + } + ///// <summary> ///// 涓嬭浇鐢靛彴銆侀煶涔愩�丏LNA绛夌瓑缃戠粶鍥剧墖 ///// </summary> -- Gitblit v1.8.0