Ejemplo 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));
        }
Ejemplo n.º 2
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

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

            properties = 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);
        }
Ejemplo n.º 3
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

            myPanel.SuspendLayout();
            textEditorControl.Dock         = DockStyle.Fill;
            textEditorControl.BorderStyle  = BorderStyle.FixedSingle;
            textEditorControl.BackColor    = SystemColors.Window;
            textEditorControl.LinkClicked += delegate(object sender, LinkClickedEventArgs e) {
                FileService.OpenFile("browser://" + e.LinkText);
            };

            // auto-scrolling on RichTextBox only works when HideSelection=false.
            // See comments to http://weblogs.asp.net/jdanforth/archive/2004/01/23/62026.aspx
            textEditorControl.HideSelection = false;

            textEditorControl.ReadOnly = true;

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

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

            textEditorControl.Font      = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", WinFormsResourceService.DefaultMonospacedFont.ToString()).ToString());
            properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);

            //textEditorControl.ActiveTextAreaControl.TextArea.DoubleClick += TextEditorControlDoubleClick;
            textEditorControl.DoubleClick += TextEditorControlDoubleClick;

            toolStrip           = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
            toolStrip.Stretch   = true;
            toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;

            myPanel.Controls.AddRange(new Control[] { textEditorControl, toolStrip });

            SetWordWrap();
            myPanel.ResumeLayout(false);
            DisplayActiveCategory();
            ProjectService.SolutionLoaded += SolutionLoaded;
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
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));
		}
Ejemplo n.º 6
0
		public CompilerMessageView()
		{
			instance = this;
			
			AddCategory(TaskService.BuildMessageViewCategory);
			
			myPanel.SuspendLayout();
			textEditorControl.Dock = DockStyle.Fill;
			textEditorControl.BorderStyle = BorderStyle.FixedSingle;
			textEditorControl.BackColor = SystemColors.Window;
			textEditorControl.LinkClicked += delegate(object sender, LinkClickedEventArgs e) {
				FileService.OpenFile("browser://" + e.LinkText);
			};
			
			// auto-scrolling on RichTextBox only works when HideSelection=false.
			// See comments to http://weblogs.asp.net/jdanforth/archive/2004/01/23/62026.aspx
			textEditorControl.HideSelection = false;
			
			textEditorControl.ReadOnly = true;
			
			textEditorControl.ContextMenuStrip = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");
			
			properties = (Properties)PropertyService.Get(OutputWindowOptionsPanel.OutputWindowsProperty, new Properties());
			
			textEditorControl.Font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString());
			properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
			
			//textEditorControl.ActiveTextAreaControl.TextArea.DoubleClick += TextEditorControlDoubleClick;
			textEditorControl.DoubleClick += TextEditorControlDoubleClick;
			
			toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
			toolStrip.Stretch   = true;
			toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
			
			myPanel.Controls.AddRange(new Control[] { textEditorControl, toolStrip} );
			
			SetWordWrap();
			myPanel.ResumeLayout(false);
			SetText(messageCategories[selectedCategory], messageCategories[selectedCategory].Text);
			ProjectService.SolutionLoaded += SolutionLoaded;
		}
Ejemplo n.º 7
0
		public CompilerMessageView()
		{
			instance = this;
			
			AddCategory(TaskService.BuildMessageViewCategory);
			
			textEditor.IsReadOnly = true;
			
			textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");
			
			properties = 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.SetValue(DockPanel.DockProperty, Dock.Top);
			
			panel.Children.Add(toolStrip);
			panel.Children.Add(textEditor);
			
			SetWordWrap();
			DisplayActiveCategory();
			SD.ProjectService.CurrentSolutionChanged += OnSolutionLoaded;
			
			SearchPanel.Install(textEditor);
		}