Ejemplo n.º 1
0
        public void Accept()
        {
            UpdateExtensionRegistryKeys();

            spellingService.SetLanguage(SelectedLanguage);

            var settings = settingsService.GetSettings <MarkPadSettings>();

            settings.SaveBlogs(Blogs.ToList());
            settings.FontSize               = SelectedFontSize;
            settings.FontFamily             = SelectedFontFamily.Source;
            settings.FloatingToolBarEnabled = EnableFloatingToolBar;
            settings.IndentType             = IndentType;

            settingsService.SaveSettings(settings);

            // TODO: Move to per-plugin setting screen
            var spellCheckPluginSettings = plugins.OfType <SpellCheckPlugin.SpellCheckPluginSettings>().FirstOrDefault();

            if (spellCheckPluginSettings != null)
            {
                spellCheckPluginSettings.Language = SelectedLanguage;
                settingsService.SaveSettings(spellCheckPluginSettings);
            }

            eventAggregator.Publish(new SettingsChangedEvent());
        }
Ejemplo n.º 2
0
        public void Accept()
        {
            markpadRegistryEditor.UpdateExtensionRegistryKeys(Extensions);

            spellingService.SetLanguage(SelectedLanguage);

            UpdateMarkpadSettings();

            eventAggregator.Publish(new SettingsChangedEvent());
        }
Ejemplo n.º 3
0
        public SpellCheckPlugin(
            IPluginSettingsProvider settingsProvider,
            ISpellingService spellingService,
            ISpellCheckProviderFactory spellCheckProviderFactory)
        {
            _settingsProvider = settingsProvider;
            _spellingService = spellingService;
            _spellCheckProviderFactory = spellCheckProviderFactory;

            _settings = _settingsProvider.GetSettings<SpellCheckPluginSettings>();
            _spellingService.SetLanguage(_settings.Language);
        }
Ejemplo n.º 4
0
        public SpellCheckPlugin(
            IPluginSettingsProvider settingsProvider,
            ISpellingService spellingService,
            ISpellCheckProviderFactory spellCheckProviderFactory)
        {
            _settingsProvider          = settingsProvider;
            _spellingService           = spellingService;
            _spellCheckProviderFactory = spellCheckProviderFactory;

            _settings = _settingsProvider.GetSettings <SpellCheckPluginSettings>();
            _spellingService.SetLanguage(_settings.Language);
        }
Ejemplo n.º 5
0
        public void Accept()
        {
            UpdateExtensionRegistryKeys();

            spellingService.SetLanguage(SelectedLanguage);

            var settings = settingsService.GetSettings <MarkPadSettings>();

            settings.FontSize               = SelectedFontSize;
            settings.FontFamily             = SelectedFontFamily.Source;
            settings.FloatingToolBarEnabled = EnableFloatingToolBar;
            settings.IndentType             = IndentType;
            settings.Language               = SelectedLanguage;

            settingsService.SaveSettings(settings);

            eventAggregator.Publish(new SettingsChangedEvent());
        }