Inheritance: System.Windows.Forms.Form
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            var dialog = new ConfigureCommandsForm();
            dialog.ShowDialog();

            MessageBox.Show("Restart Revit to see changes to the commands in the Ribbon", "Configure RevitPythonShell", MessageBoxButtons.OK, MessageBoxIcon.Information);

            return Result.Succeeded;
        }
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            var dialog = new ConfigureCommandsForm();

            dialog.ShowDialog();

            MessageBox.Show("Restart Revit to see changes to the commands in the Ribbon", "Configure RevitPythonShell", MessageBoxButtons.OK, MessageBoxIcon.Information);

            return(Result.Succeeded);
        }
示例#3
0
        public override int Execute(params string[] parameters)
        {
            //load the application
            if (!RevitPythonShellApplication.applicationLoaded)
            {
                RevitPythonShellApplication.OnLoaded();
            }

            var dialog = new ConfigureCommandsForm();

            dialog.ShowDialog();

            MessageBox.Show("Restart Navisworks to see changes to the commands in the Ribbon", "Configure NavisPythonShell", MessageBoxButtons.OK, MessageBoxIcon.Information);

            return(0);
        }
示例#4
0
        /// <summary>
        /// Show the dialog for configuring scripts.
        /// </summary>
        private void btnConfigureScripts_Click(object sender, EventArgs e)
        {
            var dialog = new ConfigureCommandsForm();
            dialog.ShowDialog(this);

            // reset toolbar (remove script buttons, then re-add them)
            while (toolStrip.Items.Count > 2) // leave "Configure Commands" and the separator
            {
                toolStrip.Items.RemoveAt(2);
            }
            LoadCommands();
        }