public void ActivatePage(OptionsPage page, Action closeCallback)
 {
     _closeCallback = closeCallback;
     if (page == OptionsPage.General)
     {
         ShowOptionsPage(_generalGUID);
     }
     else if (page == OptionsPage.PackageSources)
     {
         ShowOptionsPage(_packageSourcesGUID);
     }
     else
     {
         throw new ArgumentOutOfRangeException("page");
     }
 }
Exemple #2
0
        private static Settings GetSettings
            (IWpfTextView textView, Func <int[], int> getColumn)
        {
            var textBuffer = textView.TextBuffer;
            var file       = new File(GetLanguage(textBuffer), GetFilePath(textBuffer));
            var options    = OptionsPage.GetOptions(file);

            int[] rulers =
                options.WrappingColumn.HasValue
                    ? new[] { options.WrappingColumn.Value }
                    : GetRulers();

            return(new Settings
                       (getColumn(rulers)
                       , textView.Options.GetTabSize()
                       , options.DoubleSentenceSpacing
                       , options.Reformat
                       , options.WholeComment
                       ));
        }
Exemple #3
0
 public OptionsController()
 {
     panel          = optionsPage = OptionsPage.Instance;
     mainController = MainPageUIController.Instance;
 }