void InitializeToolStrip() { taskView.CreateControl(); contentPanel.Controls.Add(taskView); string[] tokens = PropertyService.Get <string[]>("SharpDevelop.TaskListTokens", ParserService.DefaultTaskListTokens); foreach (string token in tokens) { if (!this.displayedTokens.ContainsKey(token)) { this.displayedTokens.Add(token, true); } } toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/TaskList/Toolbar"); ShowTaskListTokenButton[] buttons = TaskListTokensBuilder.BuildItems(tokens); foreach (ShowTaskListTokenButton button in buttons) { toolStrip.Items.Add(new ToolBarSeparator()); toolStrip.Items.Add((ToolStripItem)button.Owner); } toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); }
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(); }