Ejemplo n.º 1
0
		public ScriptingConsolePad()
		{
			textEditor = TextEditorFactory.CreateTextEditor();
			textEditor.SyntaxHighlighting = GetSyntaxHighlighting();
			CreateConsoleHost();
			host.Run();	
		}
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public ScriptingConsolePad()
 {
     textEditor = TextEditorFactory.CreateTextEditor();
     textEditor.SyntaxHighlighting = GetSyntaxHighlighting();
     CreateConsoleHost();
     host.Run();
 }
Ejemplo n.º 4
0
		/// <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); };
		}
Ejemplo n.º 5
0
 /// <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); };
 }
Ejemplo n.º 6
0
		/// <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); };
		}
Ejemplo n.º 7
0
 /// <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); };
 }
Ejemplo n.º 8
0
		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);
		}