public void UnClickAll() { for (int i = 0; i < SelectedFiles.GetNames().Length; i++) { int index = files.IndexOfKey(SelectedFiles.GetNames()[i].ToString()); if (index < 0) { return; } ((File)files.GetByIndex(index)).UnSelectFile(); } SelectedFiles.Clear(); }
public static void DeleteFiles(object[] files) { foreach (string path in files) { if (IsDirectory(path)) { DeleteFiles(Directory.GetFileSystemEntries(path)); } else if (!IsFileExists(path)) { return; } try { System.IO.File.Delete(path); } catch (Exception) { throw; } } SelectedFiles.Clear(); }