예제 #1
0
 public static void LoadFromDisk()
 {
     InitToDefaults();
     if (File.Exists(xmlExportFileName))
     {
         try
         {
             if (!SerializeStatic.Load(typeof(ConfigManager), xmlExportFileName))
             {
                 RestoreDefaults();
                 Logger.WriteMsg("Lack of entries found in saved ConfigManagerExport, returned false;");
             }
         }
         catch (Exception e)
         {
             //using the defaults which were already set
             Logger.WriteError("Unable to restore ConfigManager due to: " + e.ToString());
         }
     }
 }
예제 #2
0
 public static void SaveToDisk()
 {
     SerializeStatic.Save(typeof(ConfigManager), xmlExportFileName);
 }