Type GetPaneType(AnkhToolWindow toolWindow)
        {
            switch (toolWindow)
            {
            case AnkhToolWindow.RepositoryExplorer:
                return(typeof(RepositoryExplorerToolWindow));

            case AnkhToolWindow.WorkingCopyExplorer:
                return(typeof(WorkingCopyExplorerToolWindow));

            case AnkhToolWindow.PendingChanges:
                return(typeof(SvnPendingChangesToolWindow));

            case AnkhToolWindow.Log:
                return(typeof(LogToolWindow));

            case AnkhToolWindow.SvnInfo:
                return(typeof(SccInfoToolWindow));

            case AnkhToolWindow.GitPendingChanges:
                return(typeof(GitPendingChangesToolWindow));

            default:
                throw new ArgumentOutOfRangeException("toolWindow");
            }
        }
        public void ShowToolWindow(AnkhToolWindow toolWindow, int id, bool create)
        {
            ToolWindowPane pane = FindToolWindow(GetPaneType(toolWindow), id, create);

            IVsWindowFrame frame = pane.Frame as IVsWindowFrame;

            if (frame == null)
            {
                throw new InvalidOperationException("FindToolWindow failed");
            }
            // Bring the tool window to the front and give it focus
            Marshal.ThrowExceptionForHR(frame.Show());
        }
        public void CloseToolWindow(AnkhToolWindow toolWindow, int id, FrameCloseMode close)
        {
            ToolWindowPane pane = FindToolWindow(GetPaneType(toolWindow), id, false);

            if (pane == null)
            {
                return;
            }

            IVsWindowFrame frame = pane.Frame as IVsWindowFrame;

            if (frame == null)
            {
                return;
            }

            Marshal.ThrowExceptionForHR(frame.CloseFrame((uint)close));
        }
 public void ShowToolWindow(AnkhToolWindow window)
 {
     ShowToolWindow(window, 0, true);
 }
示例#5
0
 public void ShowToolWindow(AnkhToolWindow window)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     ShowToolWindow(window, 0, true);
 }
示例#6
0
 public void CloseToolWindow(AnkhToolWindow toolWindow, int id, FrameCloseMode close)
 {
     throw new NotImplementedException();
 }