public ClassBrowserPad() { instance = this; classBrowserTreeView.Dock = DockStyle.Fill; classBrowserTreeView.ImageList = ClassBrowserIconService.ImageList; classBrowserTreeView.AfterSelect += new TreeViewEventHandler(ClassBrowserTreeViewAfterSelect); contentPanel.Controls.Add(classBrowserTreeView); searchStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Searchbar"); searchStrip.Stretch = true; searchStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(searchStrip); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); ProjectService.SolutionLoaded += ProjectServiceSolutionChanged; ProjectService.ProjectItemAdded += ProjectServiceSolutionChanged; ProjectService.ProjectItemRemoved += ProjectServiceSolutionChanged; ProjectService.ProjectAdded += ProjectServiceSolutionChanged; // rebuild view when project is added to solution ProjectService.SolutionFolderRemoved += ProjectServiceSolutionChanged; // rebuild view when project is removed from solution ProjectService.SolutionClosed += ProjectServiceSolutionClosed; ParserService.ParseInformationUpdated += new ParseInformationEventHandler(ParserServiceParseInformationUpdated); AmbienceService.AmbienceChanged += new EventHandler(AmbienceServiceAmbienceChanged); if (ProjectService.OpenSolution != null) { ProjectServiceSolutionChanged(null, null); } UpdateToolbars(); }
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(); }
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 HtmlViewPane(bool showNavigation) { Dock = DockStyle.Fill; Size = new Size(500, 500); webBrowser = new ExtendedWebBrowser(); webBrowser.Dock = DockStyle.Fill; webBrowser.Navigating += WebBrowserNavigating; webBrowser.NewWindowExtended += NewWindow; webBrowser.Navigated += WebBrowserNavigated; webBrowser.StatusTextChanged += WebBrowserStatusTextChanged; webBrowser.DocumentCompleted += WebBrowserDocumentCompleted; PictureBox pictureBox = new PictureBox(); //pictureBox.Dock = DockStyle.Right; pictureBox.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox.Size = new Size(400, 300); int x = SystemInformation.WorkingArea.Width - pictureBox.Size.Width - 200; int y = SystemInformation.WorkingArea.Height - pictureBox.Size.Height - 40; pictureBox.Location = new Point(x, y); Assembly assm = Assembly.GetExecutingAssembly(); System.IO.Stream istr = assm.GetManifestResourceStream("FanHai.Gui.Framework.Resources.home.jpg"); pictureBox.Image = Image.FromStream(istr); Controls.Add(pictureBox); if (showNavigation) { toolStrip = ToolbarService.CreateToolStrip(this, "/FanHaiFramework/ViewContent/Browser/Toolbar"); toolStrip.GripStyle = ToolStripGripStyle.Hidden; Controls.Add(toolStrip); } }
public StatisticControl() { InitializeComponent(); _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/PlotToolStrip"); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.Dock = DockStyle.Right; Controls.Add(_toolStrip); }
protected virtual ToolStrip CreateToolStrip() { ToolStrip toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/BookmarkPad/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; return(toolStrip); }
private Workbench() { InitializeComponent(); _toolstrips = new Dictionary <string, ToolStrip>(); _toolstripRegions = new Dictionary <string, ToolbarRegion>(); this.Icon = ResourceService.GetIcon("FdoToolbox"); contentPanel = new DockPanel(); contentPanel.DocumentStyle = DocumentStyle.DockingWindow; contentPanel.Dock = DockStyle.Fill; contentPanel.DockLeftPortion = 200; contentPanel.DockBottomPortion = 150; contentPanel.DockRightPortion = 200; menu = new MenuStrip(); MenuService.AddItemsToMenu(menu.Items, this, "/Workbench/MainMenu"); toolStripContainer = new ToolStripContainer(); toolStripContainer.ContentPanel.Controls.Add(contentPanel); toolStripContainer.Dock = DockStyle.Fill; this.Controls.Add(toolStripContainer); ctxToolbar = new ContextMenuStrip(); toolStripContainer.TopToolStripPanel.ContextMenuStrip = ctxToolbar; toolStripContainer.BottomToolStripPanel.ContextMenuStrip = ctxToolbar; toolStripContainer.LeftToolStripPanel.ContextMenuStrip = ctxToolbar; toolStripContainer.RightToolStripPanel.ContextMenuStrip = ctxToolbar; toolbar = ToolbarService.CreateToolStrip(this, "/Workbench/Toolbar"); AddToolbar("Base", toolbar, ToolbarRegion.Top, false); status = new StatusStrip(); statusLabel = new ToolStripStatusLabel(); status.Items.Add(statusLabel); this.Controls.Add(menu); this.Controls.Add(status); //this.IsMdiContainer = true; ObjectExplorer exp = new ObjectExplorer(); objExplorer = exp; ConsolePane console = new ConsolePane(); appConsole = console; ShowContent(console, ViewRegion.Bottom); ShowContent(exp, ViewRegion.Left); // Use the Idle event to update the status of menu and toolbar items. Application.Idle += OnApplicationIdle; }
/// <summary> /// Initializes a new instance of the <see cref="ObjectExplorer"/> class. /// </summary> public ObjectExplorer() { imgList = new ImageList(); InitTreeView(); objToolStrip = ToolbarService.CreateToolStrip(this, "/ObjectExplorer/Toolbar"); this.Controls.Add(objTreeView); this.Controls.Add(objToolStrip); }
/// <summary> /// Initializes a new instance of the <see cref="TextEditor"/> class. /// </summary> public TextEditor() { InitializeComponent(); toolstrip = ToolbarService.CreateToolStrip(this, "/FdoToolbox/TextEditor/Toolbar"); editor = new TextEditorControl(); editor.Dock = DockStyle.Fill; this.Controls.Add(editor); this.Controls.Add(toolstrip); }
public ClassDiagramViewContent(OpenedFile file) : base(file) { this.TabPageText = "Class Diagram"; canvas.LayoutChanged += HandleLayoutChange; ParserService.ParseInformationUpdated += OnParseInformationUpdated; toolstrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/ViewContent/ClassDiagram/Toolbar"); toolstrip.GripStyle = ToolStripGripStyle.Hidden; toolstrip.Stretch = true; canvas.Controls.Add(toolstrip); canvas.ContextMenuStrip = MenuService.CreateContextMenu(this, "/SharpDevelop/ViewContent/ClassDiagram/ContextMenu"); }
public SearchResultPanel() { instance = this; resultTreeView.Dock = DockStyle.Fill; resultTreeView.Font = ExtTreeNode.RegularBigFont; resultTreeView.IsSorted = false; toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/SearchResultPanel/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; myPanel.Controls.AddRange(new Control[] { resultTreeView, toolStrip }); }
public ConsolePane() { inputBox = new TextBox(); txtConsole = new RichTextBox(); txtConsole.Font = new Font(FontFamily.GenericMonospace, 8.0f); toolStrip1 = ToolbarService.CreateToolStrip(this, "/AppConsole/Toolbar"); txtConsole.Dock = DockStyle.Fill; inputBox.Dock = DockStyle.Bottom; this.Controls.Add(txtConsole); this.Controls.Add(inputBox); this.Controls.Add(toolStrip1); }
public MapStatistics() { InitializeComponent(); _XAxis.AxislineStyle = OxyPlot.LineStyle.Solid; _YAxis.AxislineStyle = OxyPlot.LineStyle.Solid; _CAxis.AxislineStyle = OxyPlot.LineStyle.Solid; //为界面右侧增加一个工具条控件 _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/ToolStrips/StatisticPlot"); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.Dock = DockStyle.Right; Controls.Add(_toolStrip); //plotView1.Model = _pm; }
public ProjectBrowserPanel() { projectBrowserControl = new ProjectBrowserControl(); projectBrowserControl.Dock = DockStyle.Fill; Controls.Add(projectBrowserControl); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ProjectBrowser/ToolBar/Standard"); toolStrip.ShowItemToolTips = true; toolStrip.Dock = DockStyle.Top; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; toolStrip.Stretch = true; standardItems = new ToolStripItem[toolStrip.Items.Count]; toolStrip.Items.CopyTo(standardItems, 0); Controls.Add(toolStrip); projectBrowserControl.TreeView.BeforeSelect += TreeViewBeforeSelect; }
public ErrorListPad() { instance = this; properties = PropertyService.Get("ErrorListPad", new Core.Properties()); RedrawContent(); toolStrip = ToolbarService.CreateToolStrip(this, "/FanHaiFramework/Pads/ErrorList/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); InternalShowResults(); }
public NAntPadContent() { LoggingService.Debug("NAntPadContent.ctor"); // Create main panel. contentPanel = new Panel(); // Initialise treeview. treeView = new NAntPadTreeView(); treeView.Dock = DockStyle.Fill; // Create ToolStrip. toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/NAntPad/Toolbar"); toolStrip.GripStyle = ToolStripGripStyle.Hidden; // Create text box. textBox = new TextBox(); textBox.WordWrap = false; textBox.Dock = DockStyle.Bottom; // Tooltip. ToolTip toolTip = new ToolTip(); toolTip.SetToolTip(textBox, StringParser.Parse("Enter NAnt properties.")); contentPanel.Controls.Add(treeView); contentPanel.Controls.Add(toolStrip); contentPanel.Controls.Add(textBox); ProjectService.SolutionLoaded += SolutionLoaded; ProjectService.SolutionClosed += SolutionClosed; ProjectService.ProjectItemRemoved += ProjectItemRemoved; ProjectService.ProjectItemAdded += ProjectItemAdded; SD.Workbench.ViewOpened += WorkbenchViewOpened; SD.Workbench.ViewClosed += WorkbenchViewClosed; FileService.FileRenamed += FileRenamed; FileService.FileRemoved += FileRemoved; FileUtility.FileSaved += FileSaved; NAntRunnerSingleton.Runner.NAntStarted += NAntStarted; NAntRunnerSingleton.Runner.NAntStopped += NAntStopped; NAntRunnerSingleton.Runner.NAntExited += NAntExited; // Due to lazy loading we have missed the solution loaded event // so add it now. Refresh(); }
/// <summary> /// Initializes a new instance of the <see cref="UnusedResourceKeysViewContent"/> class. /// </summary> /// <param name="unusedKeys">A collection of <see cref="ResourceItem"/> classes that represent the unused resource keys to display.</param> public UnusedResourceKeysViewContent(ICollection <ResourceItem> unusedKeys) { LoggingService.Debug("ResourceToolkit: Creating new UnusedResourceKeysViewContent"); this.TitleName = StringParser.Parse("${res:Hornung.ResourceToolkit.UnusedResourceKeys.Title}"); if (unusedKeys == null) { throw new ArgumentNullException("unusedKeys"); } this.unusedKeys = unusedKeys; this.panel = new Panel(); this.panel.SuspendLayout(); this.panel.Dock = DockStyle.Fill; this.listView = new ListView(); this.ListView.Columns.Add(StringParser.Parse("${res:Global.FileName}"), 60); this.ListView.Columns.Add(StringParser.Parse("${res:Hornung.ResourceToolkit.Key}"), 140); this.ListView.Columns.Add(StringParser.Parse("${res:Hornung.ResourceToolkit.Value}"), 140); this.ListView.View = View.Details; this.ListView.FullRowSelect = true; this.ListView.ShowItemToolTips = true; this.ListView.ListViewItemSorter = new ResourceListViewItemComparer(); this.ListView.Dock = DockStyle.Fill; this.ListView.Resize += delegate { if (this.ListView != null && !this.ListView.IsDisposed && !this.ListView.Disposing && this.ListView.Columns.Count >= 3) { this.ListView.Columns[0].Width = Convert.ToInt32(this.ListView.Width * 0.20); this.ListView.Columns[1].Width = Convert.ToInt32(this.ListView.Width * 0.45); this.ListView.Columns[2].Width = Convert.ToInt32(this.ListView.Width * 0.30); } }; this.ListView.HandleCreated += this.ListViewHandleCreated; this.ListView.ContextMenuStrip = MenuService.CreateContextMenu(this, "/AddIns/ResourceToolkit/ViewContent/UnusedResourceKeys/ListViewContextMenu"); this.toolStrip = ToolbarService.CreateToolStrip(this, "/AddIns/ResourceToolkit/ViewContent/UnusedResourceKeys/Toolbar"); this.toolStrip.Dock = DockStyle.Top; this.toolStrip.Stretch = true; this.toolStrip.VisibleChanged += this.ToolStripVisibleChanged; this.panel.Controls.Add(this.ListView); this.panel.Controls.Add(toolStrip); this.panel.ResumeLayout(); }
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; }
public HtmlViewPane(bool showNavigation) { Dock = DockStyle.Fill; Size = new Size(500, 500); webBrowser = new ExtendedWebBrowser(); webBrowser.Dock = DockStyle.Fill; webBrowser.Navigating += WebBrowserNavigating; webBrowser.NewWindowExtended += NewWindow; webBrowser.Navigated += WebBrowserNavigated; webBrowser.StatusTextChanged += WebBrowserStatusTextChanged; webBrowser.DocumentCompleted += WebBrowserDocumentCompleted; Controls.Add(webBrowser); if (showNavigation) { toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/ViewContent/Browser/Toolbar"); toolStrip.GripStyle = ToolStripGripStyle.Hidden; Controls.Add(toolStrip); } }
/// <summary> /// 构造函数 /// </summary> /// <param name="Map"></param> /// <param name="legend"></param> public Attributes(IMap Map, Legend legend) { // 界面初始化 InitializeComponent(); // 工具条插件口 _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/ToolStrips/Attributes"); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.Dock = DockStyle.Top; Controls.Add(_toolStrip); //get current map object _map = Map; _legend = legend; _nameGridDictory = new Dictionary <string, DataGridView>(); // tab event binding tabControl.SelectedIndexChanged += tabControlSelectedPageChanged; // 清空默认的tab tabControl.TabPages.Clear(); }
public ClassBrowserPad() { instance = this; classBrowserTreeView.Dock = DockStyle.Fill; // we need to create a copy of the image list because adding image to // ClassBrowserIconService.ImageList is not allowed, but the ExtTreeView sometimes // does add images to its image list. classBrowserTreeView.ImageList = new ImageList(); classBrowserTreeView.ImageList.Images.AddRange(ClassBrowserIconService.ImageList.Images.Cast <System.Drawing.Image>().ToArray()); classBrowserTreeView.AfterSelect += new TreeViewEventHandler(ClassBrowserTreeViewAfterSelect); contentPanel.Controls.Add(classBrowserTreeView); searchStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Searchbar"); searchStrip.Stretch = true; searchStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(searchStrip); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); ProjectService.SolutionLoaded += ProjectServiceSolutionChanged; ProjectService.ProjectItemAdded += ProjectServiceSolutionChanged; ProjectService.ProjectItemRemoved += ProjectServiceSolutionChanged; ProjectService.ProjectAdded += ProjectServiceSolutionChanged; // rebuild view when project is added to solution ProjectService.SolutionFolderRemoved += ProjectServiceSolutionChanged; // rebuild view when project is removed from solution ProjectService.SolutionClosed += ProjectServiceSolutionClosed; ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated; AmbienceService.AmbienceChanged += new EventHandler(AmbienceServiceAmbienceChanged); if (ProjectService.OpenSolution != null) { ProjectServiceSolutionChanged(null, null); } UpdateToolbars(); }
private void InitializeAddInSupport() { _addInToolStrip = ToolbarService.CreateToolStrip(this, "/Workspace/TextEditor/Toolbar"); if (_addInToolStrip.Items.Count == 0) { _addInToolStrip.Visible = false; } else { _addInToolStrip.Visible = true; this.Controls.Add(_addInToolStrip); _addInToolStrip.RenderMode = ToolStripRenderMode.ManagerRenderMode; _addInToolStrip.GripStyle = ToolStripGripStyle.Hidden; _addInToolStrip.Dock = DockStyle.Top; _addInToolStrip.BringToFront(); panEditor.BringToFront(); } MenuService.AddItemsToMenu(popUpEditor.Items, this, "/Workspace/TextEditor/ContextMenu"); MenuService.AddItemsToMenu(mainMenu.Items, this, "/Workspace/TextEditor/MainMenu"); MenuService.AddItemsToMenu(popUpTab.Items, this, "/Workspace/TextEditor/ContentContextMenu"); }
private Workbench() { // restore form location from last session FormLocationHelper.Apply(this, "StartupFormPosition", true); contentPanel = new Panel(); contentPanel.Dock = DockStyle.Fill; this.Controls.Add(contentPanel); menu = new MenuStrip(); MenuService.AddItemsToMenu(menu.Items, this, "/Workbench/MainMenu"); toolbar = ToolbarService.CreateToolStrip(this, "/Workbench/Toolbar"); this.Controls.Add(toolbar); this.Controls.Add(menu); // Start with an empty text file ShowContent(new TextViewContent()); // Use the Idle event to update the status of menu and toolbar items. Application.Idle += OnApplicationIdle; }
public TableEditorControl1(IFeatureLayer layer) { InitializeComponent(); // 工具条插件接口 _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/Attributes/ToolStrip"); Controls.Add(_toolStrip); FeatureLayer = layer; _selectedRows = new List <int>(); Disposed += delegate { FeatureLayer = null; }; // 从图层向数据表更新 Load += delegate { SetSelectionFromLayer(); dataGridView1.SelectionChanged += DataGridView1SelectionChanged; }; }
public BookmarkPad() { instance = this; bookmarkTreeView.Dock = DockStyle.Fill; bookmarkTreeView.CheckBoxes = true; bookmarkTreeView.HideSelection = false; bookmarkTreeView.Font = ExtTreeNode.RegularBigFont; bookmarkTreeView.IsSorted = false; ToolStrip toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/BookmarkPad/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; myPanel.Controls.AddRange(new Control[] { bookmarkTreeView, toolStrip }); BookmarkManager.Added += new BookmarkEventHandler(BookmarkManagerAdded); BookmarkManager.Removed += new BookmarkEventHandler(BookmarkManagerRemoved); foreach (SDBookmark mark in BookmarkManager.Bookmarks) { AddMark(mark); } }
public HtmlViewPane(bool showNavigation) { Dock = DockStyle.Fill; Size = new Size(500, 500); webBrowser = new ExtendedWebBrowser(); webBrowser.Dock = DockStyle.Fill; webBrowser.NewWindowExtended += delegate(object sender, NewWindowExtendedEventArgs e) { e.Cancel = true; WorkbenchSingleton.Workbench.ShowView(new BrowserPane(e.Url)); }; webBrowser.Navigated += delegate { // do not use e.Url (frames!) urlBox.Text = webBrowser.Url.ToString(); // Update toolbar: foreach (object o in toolStrip.Items) { IStatusUpdate up = o as IStatusUpdate; if (up != null) { up.UpdateStatus(); } } }; Controls.Add(webBrowser); if (showNavigation) { toolStrip = ToolbarService.CreateToolStrip(this, sButtonsPath); toolStrip.GripStyle = ToolStripGripStyle.Hidden; Controls.Add(toolStrip); } }
/// <summary> /// Gets the main toolstrip /// </summary> /// <param name="workbench"></param> /// <returns></returns> public ToolStrip GetMainToolStrip(WorkbenchBase workbench) { return(ToolbarService.CreateToolStrip(workbench, "/Maestro/Shell/Toolbars/Main")); //NOXLATE }
/// <summary> /// Virtual method so we can override this method and return /// a dummy toolstrip when testing. /// </summary> protected virtual ToolStrip CreateToolStrip(string name) { return(ToolbarService.CreateToolStrip(treeView, name)); }
public ToolStrip CreateToolStrip(object parameter, string addInTreePath) { return(ToolbarService.CreateToolStrip(parameter, addInTreePath)); }
/// <summary> /// Adds or removes the visit count list view or the source code /// panel. /// </summary> void UpdateDisplay() { CreateTreeView(); if (showVisitCountPanel) { CreateListView(); } else { DisposeListView(); } if (showSourceCodePanel) { CreateTextEditor(); } else { DisposeTextEditor(); } if (showVisitCountPanel || showSourceCodePanel) { CreateVerticalSplitContainer(); } else { DisposeVerticalSplitContainer(); } if (showSourceCodePanel && showVisitCountPanel) { CreateHorizontalSplitContainer(); } else { DisposeHorizontalSplitContainer(); } // Add tree view. if (showVisitCountPanel || showSourceCodePanel) { if (Controls.Contains(treeView)) { Controls.Remove(treeView); } if (!verticalSplitContainer.Panel1.Controls.Contains(treeView)) { verticalSplitContainer.Panel1.Controls.Add(treeView); } } else { if (!Controls.Contains(treeView)) { Controls.Add(treeView); } } // Add list view. if (showVisitCountPanel) { if (showSourceCodePanel) { if (verticalSplitContainer.Panel2.Controls.Contains(listView)) { verticalSplitContainer.Panel2.Controls.Remove(listView); } if (!horizontalSplitContainer.Panel1.Controls.Contains(listView)) { horizontalSplitContainer.Panel1.Controls.Add(listView); } } else { if (!verticalSplitContainer.Panel2.Controls.Contains(listView)) { verticalSplitContainer.Panel2.Controls.Add(listView); } } } // Add text editor if (showSourceCodePanel) { if (showVisitCountPanel) { if (verticalSplitContainer.Panel2.Controls.Contains(textEditorHost)) { verticalSplitContainer.Panel2.Controls.Remove(textEditorHost); } if (!horizontalSplitContainer.Panel2.Controls.Contains(textEditorHost)) { horizontalSplitContainer.Panel2.Controls.Add(textEditorHost); } } else { if (!verticalSplitContainer.Panel2.Controls.Contains(textEditorHost)) { verticalSplitContainer.Panel2.Controls.Add(textEditorHost); } } } // Add vertical split container. if (showVisitCountPanel || showSourceCodePanel) { if (!Controls.Contains(verticalSplitContainer)) { Controls.Add(verticalSplitContainer); } } // Add horizontal split container. if (showVisitCountPanel && showSourceCodePanel) { if (!verticalSplitContainer.Panel2.Controls.Contains(horizontalSplitContainer)) { verticalSplitContainer.Panel2.Controls.Add(horizontalSplitContainer); } } // Add toolstrip - need to re-add it last otherwise the // other controls will be displayed underneath it. if (toolStrip == null) { toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/CodeCoveragePad/Toolbar"); toolStrip.GripStyle = ToolStripGripStyle.Hidden; } if (Controls.Contains(toolStrip)) { Controls.Remove(toolStrip); } Controls.Add(toolStrip); }