| | |
| | | foreach (var fileName in ReadRegionFiles(path)) |
| | | { |
| | | File.Delete(Path.Combine(path, fileName)); |
| | | MainPage.Log("删除文件名为:" + fileName); |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | /// <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; |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /// <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> |
| | | ///// 下载电台、音乐、DLNA等等网络图片 |
| | | ///// </summary> |