protected override void Run() { Pad pad = null; try { var pads = IdeApp.Workbench.Pads; // Try get Pads for first time } catch { } foreach (var p in IdeApp.Workbench.Pads) { if (string.Equals(p.Id, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", System.StringComparison.OrdinalIgnoreCase)) { pad = p; } } if (pad == null) { var content = new MonoDevelop.VersionControl.TFS.GUI.TeamExplorerPad(); //pad = IdeApp.Workbench.AddPad(content, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", "Team Explorer", "Right", null); pad = IdeApp.Workbench.ShowPad(content, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", "Team Explorer", "Right", null); if (pad == null) return; } pad.Sticky = true; pad.AutoHide = false; pad.BringToFront(); }
protected override void Run() { Pad pad = null; try { var pads = IdeApp.Workbench.Pads; // Try get Pads for first time } catch { } foreach (var p in IdeApp.Workbench.Pads) { if (string.Equals(p.Id, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", System.StringComparison.OrdinalIgnoreCase)) { pad = p; } } if (pad == null) { var content = new MonoDevelop.VersionControl.TFS.GUI.TeamExplorerPad(); //pad = IdeApp.Workbench.AddPad(content, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", "Team Explorer", "Right", null); pad = IdeApp.Workbench.ShowPad(content, "MonoDevelop.VersionControl.TFS.TeamExplorerPad", "Team Explorer", "Right", null); if (pad == null) { return; } } pad.Sticky = true; pad.AutoHide = false; pad.BringToFront(); }