static void SavePrefs() { // save off the last good FSAA value PreferencesManager.Set(PrefNames.FSAA, WindowManager.MainWindowAAFactor); // TODO, save window positions and resolutions PreferencesManager.Save(FileLocations.GetOptionsFile()); }
static void LoadPreferences(string[] args) { PreferencesManager.Load(FileLocations.GetOptionsFile()); foreach (var arg in args) { string[] parts = arg.Split(new string[] { "=" }, 2, StringSplitOptions.RemoveEmptyEntries); if (parts.Length == 2 && !string.IsNullOrEmpty(parts[0])) { PreferencesManager.Set(parts[0], parts[1]); } } }