public static void Reset() { instance = new LauncherSettings(); if (File.Exists(CfgFile)) { File.Delete(CfgFile); } Update(); }
public static void Update(string xml = null) { if (xml != null) { try { instance.Modules.Clear(); instance = xml.FromXml<LauncherSettings>(); } catch (Exception e) { ExceptionHandler.Handle(e); if (instance == null) { instance = new LauncherSettings(); } if (File.Exists(CfgFile)) { File.Delete(CfgFile); } return; } } }
static LauncherSettings() { instance = new LauncherSettings(); Load(); }