private UserSettings CreateSettings() { UserSettings settings = new UserSettings(); settings.FontName = FontFamily.GenericSansSerif.Name; settings.FontSize = 10; return settings; }
public static void SaveUserSettings(IsolatedStorageFile isoFile, UserSettings settings) { IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream( "UserSettings.xml", FileMode.OpenOrCreate, FileAccess.Write, isoFile); try { XmlSerializer serializer = new XmlSerializer(typeof (UserSettings)); serializer.Serialize(isoStream, settings); } finally { isoStream.Close(); } }
private UserSettings CreateUserSettings(OptionsDialog dialog) { UserSettings settings = new UserSettings(); settings.FontName = dialog.SelectedFont(); settings.FontSize = dialog.SelectedSize(); return settings; }
private void ApplyUserSettings(UserSettings settings) { if (settings == null) return; outputWindow.GetOutput().Font = settings.UIFont; fileManager1.FontToUse = settings.UIFont; }