コード例 #1
0
		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();
		}
コード例 #2
0
		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#");
			}
		}
コード例 #3
0
		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();
		}
コード例 #4
0
        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();
        }