private bool DeleteRelated(string target) { string[] files = ExpressUtility.GetRelatedFiles(target); List <string> delete = new List <string>(); foreach (string f in files) { if (File.Exists(f)) { delete.Add(f); } } if (delete.Count > 0) { if (this.Confirm("Express Bulk Copy", string.Format("The following files will be deleted along with the shape file: {0}\n\n{1}\n\nAre you sure you want to continue?", target, string.Join("\n", delete.ToArray())))) { return(true); } } return(false); }
private void DeleteRelatedFiles(string shp) { string[] files = ExpressUtility.GetRelatedFiles(shp); foreach (string f in files) { if (File.Exists(f)) { File.Delete(f); LoggingService.Info("File deleted: " + f); } } if (File.Exists(shp)) { File.Delete(shp); } }