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()); } } }
public static void SaveToDisk() { SerializeStatic.Save(typeof(ConfigManager), xmlExportFileName); }