private UserSettings CreateSettings()
 {
     UserSettings settings = new UserSettings();
     settings.FontName = FontFamily.GenericSansSerif.Name;
     settings.FontSize = 10;
     return settings;
 }
Example #2
0
        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();
            }
        }
Example #3
0
        private UserSettings CreateUserSettings(OptionsDialog dialog)
        {
            UserSettings settings = new UserSettings();
            settings.FontName = dialog.SelectedFont();
            settings.FontSize = dialog.SelectedSize();

            return settings;
        }
Example #4
0
        private void ApplyUserSettings(UserSettings settings)
        {
            if (settings == null)
                return;

            outputWindow.GetOutput().Font = settings.UIFont;
            fileManager1.FontToUse = settings.UIFont;
        }