示例#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));
		}
示例#2
0
		void InitializePadContent()
		{
			IReadOnlyList<string> tokens = SD.ParserService.TaskListTokens;
			
			foreach (string token in tokens) {
				if (!this.displayedTokens.ContainsKey(token)) {
					this.displayedTokens.Add(token, true);
				}
			}
			
			toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/TaskList/Toolbar");
			var items = (IList)toolBar.ItemsSource;
			
			foreach (string token in tokens) {
				items.Add(new Separator());
				items.Add(new TaskListTokensToolbarCheckBox(token));
			}
			
			contentPanel.Children.Add(toolBar);
			toolBar.SetValue(DockPanel.DockProperty, Dock.Top);
			contentPanel.Children.Add(taskView);
			taskView.ItemsSource = tasks;
			taskView.MouseDoubleClick += TaskViewMouseDoubleClick;
			taskView.Style = (Style)new TaskViewResources()["TaskListView"];
			taskView.ContextMenu = MenuService.CreateContextMenu(taskView, DefaultContextMenuAddInTreeEntry);
			
			taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
			taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));
		}
 public static void SetIsEnabled(ToolBar popup, bool value) {
     popup.SetValue(IsEnabledProperty, value);
 }
示例#4
0
		public ErrorListPad()
		{
			instance = this;
			properties = PropertyService.NestedProperties("ErrorListPad");
			
			TaskService.Cleared += TaskServiceCleared;
			TaskService.Added   += TaskServiceAdded;
			TaskService.Removed += TaskServiceRemoved;
			TaskService.InUpdateChanged += delegate {
				if (!TaskService.InUpdate)
					InternalShowResults();
			};
			
			SD.BuildService.BuildFinished += ProjectServiceEndBuild;
			SD.ProjectService.SolutionOpened += OnSolutionOpen;
			SD.ProjectService.SolutionClosed += OnSolutionClosed;
			errors = new ObservableCollection<SDTask>(TaskService.Tasks.Where(t => t.TaskType != TaskType.Comment));
			
			toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/ErrorList/Toolbar");
			
			contentPanel.Children.Add(toolBar);
			toolBar.SetValue(DockPanel.DockProperty, Dock.Top);
			contentPanel.Children.Add(errorView);
			errorView.ItemsSource = errors;
			errorView.MouseDoubleClick += ErrorViewMouseDoubleClick;
			errorView.Style = (Style)new TaskViewResources()["TaskListView"];
			errorView.ContextMenu = MenuService.CreateContextMenu(this, DefaultContextMenuAddInTreeEntry);
			
			errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
			errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));
			
			InternalShowResults();
		}
		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);
		}