예제 #1
0
        /// <summary>
        ///   This method creates and shows a modeless dialog, unless it already exists.
        /// </summary>
        /// <remarks>
        ///   The external command invokes this on the end-user's request
        /// </remarks>
        ///
        public void ShowForm(UIApplication uiapp)
        {
            m_revit    = uiapp;
            m_document = uiapp.ActiveUIDocument.Document;

            // If we do not have a dialog yet, create and show it
            if (m_MyForm == null || m_MyForm.IsDisposed)
            {
                m_MyForm = new AppearanceAssetEditingForm();
                m_MyForm.Show();

                // if we have a dialog, we need Idling too
                uiapp.Idling += IdlingHandler;
            }
        }