Exemplo n.º 1
0
 private void CommandMainForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         CommandForm.Close();
     }
 }
Exemplo n.º 2
0
        protected virtual void Terminate()
        {
            _bIsRunning         = false;
            _controlDef.Pressed = false;

            if (CommandForm != null)
            {
                CommandForm.Close();
            }

            CommandForm = null;

            InteractionManager.Terminate();
        }
Exemplo n.º 3
0
        public Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
        {
            application = commandData.Application.Application;
            doc         = commandData.Application.ActiveUIDocument.Document;
            StoreOriginalVisibility(doc.ActiveView);

            CommandForm commandForm = new CommandForm();

            if (DialogResult.OK == commandForm.ShowDialog())
            {
                analysisCat = commandForm.SelectedAnalysisCategory;
                commandForm.Close();

                mainForm = new MainForm(doc, analysisCat);
                if (mainForm.FoundStyles)
                {
                    if (DialogResult.OK == mainForm.ShowDialog())
                    {
                        DisplayManinForm();
                    }
                }
            }
            return(Result.Succeeded);
        }