public static void CreateIfNotExists()
 {
     Directory.CreateDirectory(LocalDirectoryHelper.GetProgramAssetFolderPath());
     Directory.CreateDirectory(LocalDirectoryHelper.GetAssetFolderPath());
     Directory.CreateDirectory(LocalDirectoryHelper.GetCookieFolderPath());
     Directory.CreateDirectory(LocalDirectoryHelper.GetLogFolderPath());
     Directory.CreateDirectory(LocalDirectoryHelper.GetSettingsFolderPath());
 }
Пример #2
0
 private void ReadSettings()
 {
     try
     {
         string path = LocalDirectoryHelper.GetSettingsFolderPath() + "/settings.txt";
         if (File.Exists(path))
         {
             string json = File.ReadAllText(path);
             Dictionary <string, object> dictionary = Json.Deserialize(json) as Dictionary <string, object>;
             if (dictionary.ContainsKey("log"))
             {
                 this._localLogSetting = (dictionary["log"] as string == "1");
             }
         }
     }
     catch
     {
     }
 }
Пример #3
0
 public static void ReadEnvironmentSetting()
 {
     try
     {
         string path = LocalDirectoryHelper.GetSettingsFolderPath() + "/settings.txt";
         if (File.Exists(path))
         {
             string json = File.ReadAllText(path);
             Dictionary <string, object> dictionary = Json.Deserialize(json) as Dictionary <string, object>;
             if (dictionary.ContainsKey("isProductEnvironment"))
             {
                 PandoraSettings.IsProductEnvironment = (dictionary["isProductEnvironment"] as string == "1");
             }
         }
     }
     catch
     {
     }
 }