DisplayAppSettingsTabProvider(TextEditorSettingsImpl textEditorSettingsImpl, IEditorOptionsFactoryService editorOptionsFactoryService, FileTreeViewSettingsImpl fileTreeViewSettings, FileTabManagerSettingsImpl fileTabManagerSettings)
 {
     this.textEditorSettingsImpl = textEditorSettingsImpl;
     this.editorOptions          = editorOptionsFactoryService.GlobalOptions;
     this.fileTreeViewSettings   = fileTreeViewSettings;
     this.fileTabManagerSettings = fileTabManagerSettings;
 }
 public void CopyTo(TextEditorSettingsImpl textEditorSettings, IEditorOptions editorOptions)
 {
     textEditorSettings.FontFamily = FontFamily;
     textEditorSettings.FontSize   = FontSize;
     editorOptions.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, ShowLineNumbers);
     editorOptions.SetOptionValue(DefaultDnSpyTextViewOptions.ReferenceHighlightingId, HighlightReferences);
 }
 public TextEditorSettingsVM(TextEditorSettingsImpl textEditorSettings, IEditorOptions editorOptions)
 {
     FontFamily          = textEditorSettings.FontFamily;
     FontSize            = textEditorSettings.FontSize;
     ShowLineNumbers     = editorOptions.IsLineNumberMarginEnabled();
     HighlightReferences = editorOptions.IsReferenceHighlightingEnabled();
 }
 public DisplayAppSettingsTab(TextEditorSettingsImpl textEditorSettingsImpl, IEditorOptions editorOptions, FileTreeViewSettings fileTreeViewSettings, FileTabManagerSettings fileTabManagerSettings)
 {
     this.textEditorSettingsImpl = textEditorSettingsImpl;
     this.editorOptions          = editorOptions;
     this.fileTreeViewSettings   = fileTreeViewSettings;
     this.fileTabManagerSettings = fileTabManagerSettings;
     this.displayAppSettingsVM   = new DisplayAppSettingsVM(new TextEditorSettingsVM(textEditorSettingsImpl, editorOptions), fileTreeViewSettings.Clone(), fileTabManagerSettings.Clone());
 }
        public FontAppSettingsPage(TextEditorSettingsImpl textEditorSettings)
        {
            if (textEditorSettings == null)
            {
                throw new ArgumentNullException(nameof(textEditorSettings));
            }
            this.textEditorSettings = textEditorSettings;

            FontFamily = textEditorSettings.FontFamily;
            FontSize   = textEditorSettings.FontSize;

            this.fontFamilies = null;
            this.fontFamilyVM = new FontFamilyVM(FontFamily);
            Task.Factory.StartNew(() =>
                                  Fonts.SystemFontFamilies.Where(a => !FontUtilities.IsSymbol(a)).OrderBy(a => a.Source.ToUpperInvariant()).Select(a => new FontFamilyVM(a)).ToArray()
                                  )
            .ContinueWith(t => {
                var ex = t.Exception;
                if (!t.IsCanceled && !t.IsFaulted)
                {
                    FontFamilies = t.Result;
                }
            }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
        }
 FontAppSettingsPageProvider(TextEditorSettingsImpl textEditorSettings)
 {
     this.textEditorSettings = textEditorSettings;
 }
Exemple #7
0
		HighlightCurrentLineCommand(TextEditorSettingsImpl textEditorSettings) {
			this.textEditorSettings = textEditorSettings;
		}
Exemple #8
0
		WordWrapCommand(TextEditorSettingsImpl textEditorSettings)
			: base(WordWrapInit.WordWrap) {
			this.textEditorSettings = textEditorSettings;
		}
Exemple #9
0
		WordWrapInit(IAppWindow appWindow, TextEditorSettingsImpl textEditorSettings, IAppSettings appSettings, IMessageBoxManager messageBoxManager) {
			this.textEditorSettings = textEditorSettings;
			this.appSettings = appSettings;
			this.messageBoxManager = messageBoxManager;
			appWindow.MainWindowCommands.Add(WordWrap, (s, e) => ToggleWordWrap(), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.W);
		}
Exemple #10
0
 DisplayAppSettingsTabCreator(TextEditorSettingsImpl textEditorSettings, FileTreeViewSettingsImpl fileTreeViewSettings, FileTabManagerSettingsImpl fileTabManagerSettings)
 {
     this.textEditorSettings     = textEditorSettings;
     this.fileTreeViewSettings   = fileTreeViewSettings;
     this.fileTabManagerSettings = fileTabManagerSettings;
 }