Example #1
0
        /// <summary>
        /// This function is the callback used to execute a command when the a menu item is clicked.
        /// See the Initialize method to see how the menu item is associated to this function using
        /// the OleMenuCommandService service and the MenuCommand class.
        /// </summary>
        private void DisplayLaunchForm(object sender, EventArgs e)
        {
            // Show a Message Box to prove we were here
            var dte = (EnvDTE80.DTE2)GetService(typeof(EnvDTE.DTE));
            LaunchFrom launchForm = new LaunchFrom(dte);
            if (launchForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                // The user clicked on Ok in the form, so launch the file using the sample debug engine.
                string filePath = launchForm.FilePath;

                LaunchDebugTarget(filePath, launchForm.SelectLuaFile);
            }
        }
Example #2
0
        /// <summary>
        /// This function is the callback used to execute a command when the a menu item is clicked.
        /// See the Initialize method to see how the menu item is associated to this function using
        /// the OleMenuCommandService service and the MenuCommand class.
        /// </summary>
        private void DisplayLaunchForm(object sender, EventArgs e)
        {
            // Show a Message Box to prove we were here
            var        dte        = (EnvDTE80.DTE2)GetService(typeof(EnvDTE.DTE));
            LaunchFrom launchForm = new LaunchFrom(dte);

            if (launchForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                // The user clicked on Ok in the form, so launch the file using the sample debug engine.
                string filePath = launchForm.FilePath;

                LaunchDebugTarget(filePath, launchForm.SelectLuaFile);
            }
        }