Example #1
0
 public static void Reset()
 {
     instance = new LauncherSettings();
     if (File.Exists(CfgFile))
     {
         File.Delete(CfgFile);
     }
     Update();
 }
Example #2
0
 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;
         }
     }
 }
Example #3
0
 static LauncherSettings()
 {
     instance = new LauncherSettings();
     Load();
 }