public void DeleteCategory() { if (SimulationsData != null) { foreach (var sim in SimulationsData) { SimulationService.Delete(sim); } RefreshSimulationsOptions(); } else { Service.DeleteCategory(CategoryType); if (Directory.Exists(Path.Combine(Config.PersistentDataPath, CategoryType.ToString() + "s"))) { DirectoryInfo di = new DirectoryInfo(Path.Combine(Config.PersistentDataPath, CategoryType.ToString() + "s")); foreach (FileInfo file in di.GetFiles()) { file.Delete(); } } RefreshOptions(); } ConnectionUI.instance.UpdateDropdown(); }
public void DeleteCategory() { Service.DeleteCategory(CategoryType); if (Directory.Exists(Path.Combine(Config.PersistentDataPath, CategoryType.ToString() + "s"))) { DirectoryInfo di = new DirectoryInfo(Path.Combine(Config.PersistentDataPath, CategoryType.ToString() + "s")); foreach (FileInfo file in di.GetFiles()) { file.Delete(); } } RefreshOptions(); }