public static void LoadTraitDefinitions()
 {
     if (JsonFiles.JsonFilePaths[typeof(TraitDefinitions).Name] == "")
     {
         definitions = JsonFiles.LoadFromCommonDirectory <TraitDefinitions>(TRAIT_FILE);
     }
     else
     {
         definitions = JsonFiles.LoadFrom <TraitDefinitions>(JsonFiles.JsonFilePaths[typeof(TraitDefinitions).Name]);
     }
     loaded = true;
 }
Beispiel #2
0
        private T ShowLoadJsonObjectDialog <T>()
        {
            LoadDialog.InitialDirectory = JsonFiles.JsonFilePaths[typeof(T).Name];

            LoadDialog.ShowDialog();

            if (LoadDialog.FileName != "")
            {
                return(JsonFiles.LoadFrom <T>(LoadDialog.FileName));
            }
            else
            {
                return(default(T));
            }
        }