예제 #1
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();
            }
        }
예제 #2
0
        private UserSettings CreateUserSettings(OptionsDialog dialog)
        {
            UserSettings settings = new UserSettings();
            settings.FontName = dialog.SelectedName();
            settings.FontSize = dialog.SelectedSize();

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

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