コード例 #1
0
 public static void LoadConfig()
 {
     if (!firstRun)
     {
         settings = JsonConvert.DeserializeObject <LocationConfig>(
             File.ReadAllText("settings.conf"));
     }
 }
コード例 #2
0
        public static void LoadConfig()
        {
            if (!firstRun)
            {
                settings = JsonConvert.DeserializeObject <LocationConfig>(
                    File.ReadAllText("settings.conf"));
            }

            string imagesConf;

            if (File.Exists("images.conf"))
            {
                imagesConf = File.ReadAllText("images.conf");
            }
            else
            {
                imagesConf = Encoding.UTF8.GetString(Properties.Resources.imagesConf);
            }
            imageSettings = JsonConvert.DeserializeObject <ImagesConfig>(imagesConf);
        }