예제 #1
0
    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();
    }
예제 #2
0
 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();
 }