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.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); contentPanel.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); contentPanel.Children.Add(toolBar); contentPanel.Children.Add(errorView); Grid.SetRow(errorView, 1); errorView.ItemsSource = errors; errorView.MouseDoubleClick += ErrorViewMouseDoubleClick; errorView.Style = (Style)new TaskViewResources()["TaskListView"]; errorView.ContextMenu = MenuService.CreateContextMenu(errorView, DefaultContextMenuAddInTreeEntry); errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy)); errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll)); InternalShowResults(); }
public ErrorListPad() { instance = this; properties = PropertyService.Get("ErrorListPad", new Properties()); RedrawContent(); ResourceService.LanguageChanged += delegate { RedrawContent(); }; TaskService.Cleared += new EventHandler(TaskServiceCleared); TaskService.Added += new TaskEventHandler(TaskServiceAdded); TaskService.Removed += new TaskEventHandler(TaskServiceRemoved); TaskService.InUpdateChanged += delegate { if (!TaskService.InUpdate) InternalShowResults(); }; ProjectService.BuildFinished += ProjectServiceEndBuild; ProjectService.SolutionLoaded += OnSolutionOpen; ProjectService.SolutionClosed += OnSolutionClosed; taskView.CreateControl(); contentPanel.Controls.Add(taskView); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ErrorList/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); InternalShowResults(); }
public ErrorListPad() { instance = this; properties = PropertyService.Get("ErrorListPad", new Properties()); RedrawContent(); TaskService.Cleared += new EventHandler(TaskServiceCleared); TaskService.Added += new TaskEventHandler(TaskServiceAdded); TaskService.Removed += new TaskEventHandler(TaskServiceRemoved); TaskService.InUpdateChanged += delegate { if (!TaskService.InUpdate) { InternalShowResults(); } }; ProjectService.EndBuild += ProjectServiceEndBuild; ProjectService.SolutionLoaded += OnSolutionOpen; ProjectService.SolutionClosed += OnSolutionClosed; taskView.CreateControl(); contentPanel.Controls.Add(taskView); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ErrorList/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); InternalShowResults(); }
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.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); contentPanel.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); contentPanel.Children.Add(toolBar); contentPanel.Children.Add(errorView); Grid.SetRow(errorView, 1); 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(); }