Exemplo n.º 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();
    }
Exemplo n.º 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();
 }