Example #1
0
 public void Save(LauncherSettings s)
 {
     s.InitialMemory = InitialMemory.Text;
     s.MaxMemory = MaxMemory.Text;
     s.JavaLocation = JavaPath.Text;
     s.UseXincgc = (bool)UseXincgc.IsChecked;
     s.UseServer = (bool)UseServer.IsChecked;
     s.VMArgs = VMArgs.Text;
 }
Example #2
0
 public void Load(LauncherSettings s)
 {
     if (s == null) s = new LauncherSettings();
     InitialMemory.Text = s.InitialMemory;
     MaxMemory.Text = s.MaxMemory;
     JavaPath.Text = s.JavaLocation;
     UseXincgc.IsChecked = s.UseXincgc;
     UseServer.IsChecked = s.UseServer;
     VMArgs.Text = s.VMArgs;
 }
Example #3
0
 public static void Load()
 {
     if (!File.Exists(Globals.LauncherDataPath + @"\Settings.xml")) Save();
     XmlSerializer s = new XmlSerializer(typeof(LauncherSettings));
     FileStream f = File.OpenRead(Globals.LauncherDataPath + @"\Settings.xml");
     Default = (LauncherSettings)s.Deserialize(f);
     f.Close();
     if (Default == null)
     {
         f.Close();
         Default = new LauncherSettings();
         Save();
         return;
     }
 }