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

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

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