private bool IsSolutionExistsAndNotDebuggingAndNotBuilding()
        {
            int pfActive;
            int result = MonitorSelection.IsCmdUIContextActive(_solutionNotBuildingAndNotDebuggingContextCookie, out pfActive);

            return(result == VSConstants.S_OK && pfActive > 0);
        }
Example #2
0
        private bool IsCmdUIContextActive(Guid context)
        {
            uint cookie;

            ErrorHandler.ThrowOnFailure(MonitorSelection.GetCmdUIContextCookie(ref context, out cookie));
            int active = 0;

            if (cookie != 0)
            {
                ErrorHandler.ThrowOnFailure(MonitorSelection.IsCmdUIContextActive(cookie, out active));
            }
            return(active != 0);
        }