public WatchListAutoCompleteCell()
        {
            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#");
            }
        }
Exemplo n.º 2
0
        public WatchInputBox(string text, string caption) : base()
        {
            InitializeComponent();

            // UI
            text       = StringParser.Parse(text);
            this.Title = StringParser.Parse(caption);
            this.ConsolePanel.Content = console;

            if (ProjectService.CurrentProject == null)
            {
                language = GetLanguageFromActiveViewContent();
            }
            else
            {
                language = GetLanguage(ProjectService.CurrentProject.Language);
            }

            resolver = new NRefactoryResolver(LanguageProperties.GetLanguage(language.ToString()));

            switch (language)
            {
            case SupportedLanguage.CSharp:
                console.SetHighlighting("C#");
                break;

            case SupportedLanguage.VBNet:
                console.SetHighlighting("VBNET");
                break;
            }

            // get process
            this.Process = ((WindowsDebugger)DebuggerService.CurrentDebugger).DebuggedProcess;
        }
Exemplo n.º 3
0
        public WatchListAutoCompleteCell()
        {
            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#");
            }

            // get process
            WindowsDebugger debugger = (WindowsDebugger)DebuggerService.CurrentDebugger;

            debugger.ProcessSelected += delegate(object sender, ProcessEventArgs e) {
                this.Process = e.Process;
            };
            this.Process = debugger.DebuggedProcess;
        }
Exemplo n.º 4
0
        public WatchInputBox(string text, string caption) : base()
        {
            InitializeComponent();

            // UI
            text       = StringParser.Parse(text);
            this.Title = StringParser.Parse(caption);
            this.ConsolePanel.Content = console;

            if (ProjectService.CurrentProject == null)
            {
                return;
            }

            // get language
            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#");
            }

            // get process
            WindowsDebugger debugger = (WindowsDebugger)DebuggerService.CurrentDebugger;

            debugger.ProcessSelected += delegate(object sender, ProcessEventArgs e) {
                this.Process = e.Process;
            };
            this.Process = debugger.DebuggedProcess;
        }