protected AbstractConsolePad() { this.panel = new Grid(); this.console = new ConsoleControl(); // creating the toolbar accesses the WordWrap property, so we must do this after creating the console this.toolbar = BuildToolBar(); this.toolbar.SetValue(DockPanel.DockProperty, Dock.Top); panel.Children.Add(toolbar); panel.Children.Add(console); panel.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); panel.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); Grid.SetRow(console, 1); this.history = new List<string>(); this.console.editor.TextArea.PreviewKeyDown += (sender, e) => { e.Handled = HandleInput(e.Key); }; this.console.editor.TextArea.TextEntered += AbstractConsolePadTextEntered; this.InitializeConsole(); }
public ConditionCell() { InitializeComponent(); console = new ConsoleControl(); console.TextAreaTextEntered += new TextCompositionEventHandler(consoleControl_TextAreaTextEntered); console.TextAreaPreviewKeyDown += new KeyEventHandler(console_TextAreaPreviewKeyDown); console.LostFocus += new RoutedEventHandler(console_LostFocus); console.HideScrollBar(); ConsolePanel.Content = console; // get language if (ProjectService.CurrentProject == null) language = "C#"; else language = ProjectService.CurrentProject.Language; resolver = new NRefactoryResolver(LanguageProperties.GetLanguage(language)); // FIXME set language if (language == "VB" || language == "VBNet") { console.SetHighlighting("VBNET"); } else { console.SetHighlighting("C#"); } }
protected AbstractConsolePad() { this.panel = new DockPanel(); this.console = new ConsoleControl(); // creating the toolbar accesses the WordWrap property, so we must do this after creating the console this.toolbar = BuildToolBar(); this.toolbar.SetValue(DockPanel.DockProperty, Dock.Top); this.panel.Children.Add(toolbar); this.panel.Children.Add(console); this.history = new List<string>(); this.console.editor.TextArea.PreviewKeyDown += (sender, e) => { e.Handled = HandleInput(e.Key); }; this.console.editor.TextArea.TextEntered += new TextCompositionEventHandler(AbstractConsolePadTextEntered); this.InitializeConsole(); }
protected AbstractConsolePad() { this.panel = new DockPanel(); this.console = new ConsoleControl(); // creating the toolbar accesses the WordWrap property, so we must do this after creating the console this.toolbar = BuildToolBar(); this.toolbar.SetValue(DockPanel.DockProperty, Dock.Top); this.panel.Children.Add(toolbar); this.panel.Children.Add(console); this.history = new List <string>(); this.console.editor.TextArea.PreviewKeyDown += (sender, e) => { e.Handled = HandleInput(e.Key); }; this.console.editor.TextArea.TextEntered += new TextCompositionEventHandler(AbstractConsolePadTextEntered); this.InitializeConsole(); }