Exemple #1
0
        private TurboUnitConfig LoadOrCreateConfig()
        {
            TurboUnitConfig config;
            string          directory      = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            string          configFilePath = Path.Combine(directory, "TurboUnitSettings.json");

            if (File.Exists(configFilePath))
            {
                config = TurboUnitObject.Load <TurboUnitConfig>(configFilePath);
            }
            else
            {
                config = new TurboUnitConfig()
                {
                    ConfigFilePath = configFilePath,
                    IsFirstRun     = true
                };
                config.Save(configFilePath);
            }
            return(config);
        }
 public static AssemblyFilterPreset Load(string filePath)
 {
     return(TurboUnitObject.Load <AssemblyFilterPreset>(filePath));
 }
 public static TurboUnitConfig Load(string filePath)
 {
     return(TurboUnitObject.Load <TurboUnitConfig>(filePath));
 }