Esempio n. 1
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

            textEditor.IsReadOnly = true;

            textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");

            properties = (Properties)PropertyService.Get(OutputWindowOptionsPanel.OutputWindowsProperty, new Properties());

            var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", Core.WinForms.WinFormsResourceService.DefaultMonospacedFont.ToString()).ToString());

            textEditor.FontFamily       = new FontFamily(font.FontFamily.Name);
            textEditor.FontSize         = Math.Round(font.Size * 96.0 / 72.0);
            properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);

            MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
            textEditor.TextArea.TextView.ElementGenerators.OfType <LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);

            toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
            toolStrip.SetValue(DockPanel.DockProperty, Dock.Top);

            panel.Children.Add(toolStrip);
            panel.Children.Add(textEditor);

            SetWordWrap();
            DisplayActiveCategory();
            ProjectService.SolutionLoaded += SolutionLoaded;

            textEditor.TextArea.DefaultInputHandler.NestedInputHandlers.Add(new SearchInputHandler(textEditor.TextArea));
        }
Esempio n. 2
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

            textEditor.IsReadOnly  = true;
            textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");

            properties = ICSharpCode.Core.PropertyService.NestedProperties(OutputWindowOptionsPanel.OutputWindowsProperty);

            SetTextEditorFont();

            properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);

            MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
            textEditor.TextArea.TextView.ElementGenerators.OfType <LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);

            toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
            toolStrip.Items.OfType <ComboBox>().ForEach(b => b.MinWidth = 75);

            panel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            panel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });

            panel.Children.Add(toolStrip);
            panel.Children.Add(textEditor);
            Grid.SetRow(textEditor, 1);

            SetWordWrap();
            DisplayActiveCategory();
            SD.ProjectService.CurrentSolutionChanged += OnSolutionLoaded;

            SearchPanel.Install(textEditor);
        }