public ScriptingConsolePad() { textEditor = TextEditorFactory.CreateTextEditor(); textEditor.SyntaxHighlighting = GetSyntaxHighlighting(); CreateConsoleHost(); host.Run(); }
public ConsoleControl() { this.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); this.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); object tmp; this.editorAdapter = EditorControlService.CreateEditor(out tmp); this.editor = (AvalonEdit.TextEditor)tmp; this.editor.SetValue(Grid.ColumnProperty, 0); this.editor.SetValue(Grid.RowProperty, 0); this.editor.ShowLineNumbers = false; if (consoleOptions == null) { consoleOptions = new TextEditorOptions(editor.Options); consoleOptions.AllowScrollBelowDocument = false; } this.editor.Options = consoleOptions; this.Children.Add(editor); editor.TextArea.ReadOnlySectionProvider = readOnlyRegion = new BeginReadOnlySectionProvider(); editor.TextArea.TextEntered += new TextCompositionEventHandler(editor_TextArea_TextEntered); editor.TextArea.PreviewKeyDown += new KeyEventHandler(editor_TextArea_PreviewKeyDown); }
/// <summary> /// Creates a new DefinitionViewPad object /// </summary> public DefinitionViewPad() { ctl = Editor.AvalonEdit.AvalonEditTextEditorAdapter.CreateAvalonEditInstance(); ctl.IsReadOnly = true; ctl.MouseDoubleClick += OnDoubleClick; ParserService.ParserUpdateStepFinished += OnParserUpdateStep; ctl.IsVisibleChanged += delegate { UpdateTick(null); }; }
/// <summary> /// Creates a new DefinitionViewPad object /// </summary> public DefinitionViewPad() { ctl = Editor.AvalonEditTextEditorAdapter.CreateAvalonEditInstance(); ctl.IsReadOnly = true; ctl.MouseDoubleClick += OnDoubleClick; SD.ParserService.ParseInformationUpdated += OnParserUpdateStep; SD.ParserService.LoadSolutionProjectsThread.Finished += LoadThreadFinished; timer = new DispatcherTimer(DispatcherPriority.Background) { Interval = TimeSpan.FromSeconds(2) }; timer.Tick += delegate { UpdateTick(null); }; timer.IsEnabled = !SD.ParserService.LoadSolutionProjectsThread.IsRunning; ctl.IsVisibleChanged += delegate { UpdateTick(null); }; }
public ConsoleControl() { this.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); this.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); object tmp; this.editorAdapter = EditorControlService.CreateEditor(out tmp); this.editor = (AvalonEdit.TextEditor)tmp; this.editor.SetValue(Grid.ColumnProperty, 0); this.editor.SetValue(Grid.RowProperty, 0); this.editor.ShowLineNumbers = false; this.Children.Add(editor); editor.TextArea.ReadOnlySectionProvider = readOnlyRegion = new BeginReadOnlySectionProvider(); editor.TextArea.TextEntered += new TextCompositionEventHandler(editor_TextArea_TextEntered); editor.TextArea.PreviewKeyDown += new KeyEventHandler(editor_TextArea_PreviewKeyDown); }