/// <summary>
        /// Fired when the user invokes the menu item "Cancel".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeCancel(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);
            this.helper.Cancel();
        }
Exemple #2
0
        /// <summary>
        /// Fired when the user invokes the menu item "Analyze Folder".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeAnalyzeFolder(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            this.helper.Analyze(false, false, AnalysisType.Folder);
        }
        /// <summary>
        /// Fired when the user invokes the menu item Reanalyze on the solution.
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeReanalyzeSolution(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            this.helper.Analyze(true, AnalysisType.Solution);

            StyleCopTrace.Out();
        }
        /// <summary>
        /// Fired when the user invokes the menu item "Include Item".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeIncludeItem(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            ProjectUtilities.SetItemExcluded(AnalysisType.Item, false);

            StyleCopTrace.Out();
        }
        /// <summary>
        /// Fired when the user invokes the menu item "Exclude Item".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeExcludeItem(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            // This is called from the solution Explorer context menu
            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            ProjectUtilities.SetItemExcluded(AnalysisType.Item, true);

            StyleCopTrace.Out();
        }