/// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void Execute(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            var project = SolutionHelper.GetCurrentProject();

            if (project == null)
            {
                LoggerHelper.Log("Unable to get current project.");
                return;
            }

            ToolWindowHelper.Prompt <ProjectRenameDialogToolPane>(this.package, new ProjectRenameDialogViewModel(project));
        }
Example #2
0
 /// <summary>
 /// Shows the tool window when the menu item is clicked.
 /// </summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event args.</param>
 private void Execute(object sender, EventArgs e)
 {
     ToolWindowHelper.Prompt <ProjectMoverToolWindow>(this.package);
 }