Esempio n. 1
0
        /// <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 MenuItemCallback(object sender, EventArgs e)
        {
            //string message = string.Format(CultureInfo.CurrentCulture, "Inside {0}.MenuItemCallback()", this.GetType().FullName);
            //string title = "Command";

            //SessionInputForm window = new SessionInputForm(GetSolutionName((DTE2)ServiceProvider.GetService(typeof(DTE))));
            //window.ShowDialog();

            DTE2 dte = (DTE2)ServiceProvider.GetService(typeof(DTE));

            if (dte.Debugger == null || dte.Debugger.CurrentStackFrame == null)
            {
                SessionInputFormSimple window = new SessionInputFormSimple(GetSolutionName(dte));
                window.ShowDialog();
            }
            else
            {
                MessageBox.Show("Swarm Debugger configuration cannot open when the debug is running! Please, stop the run debug mode and try again.", "Cannot open");
            }

            // Show a message box to prove we were here
            //VsShellUtilities.ShowMessageBox(
            //    this.ServiceProvider,
            //    message,
            //    title,
            //    OLEMSGICON.OLEMSGICON_INFO,
            //    OLEMSGBUTTON.OLEMSGBUTTON_OK,
            //    OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
        }
Esempio n. 2
0
        private void SolutionEvents_Opened()
        {
            //SessionInputForm window = new SessionInputForm(GetSolutionName(applicationObject));
            //window.ShowDialog();

            SessionInputFormSimple window = new SessionInputFormSimple(GetSolutionName(applicationObject));

            window.ShowDialog();
        }