public Result OnStartup(UIControlledApplication application) { m_FormSectionBox = null; // no dialog needed yet; the command will bring it m_FormSectionBoxList = null; thisApp = this; // static access to this application instance return(Result.Succeeded); }
public void ShowForm(UIApplication uiapp) { // If we do not have a dialog yet, create and show it if (m_FormSectionBox == null || m_FormSectionBox.IsDisposed) { // A new handler to handle request posting by the dialog ClassRequestHandler handler = new ClassRequestHandler(); // External Event for the dialog to use (to post requests) ExternalEvent exEvent = ExternalEvent.Create(handler); // We give the objects to the new dialog; // The dialog becomes the owner responsible fore disposing them, eventually. m_FormSectionBox = new FormSectionBox(uiapp, exEvent, handler); //m_FormSectionBox = new FormSectionBox(exEvent, handler); m_FormSectionBox.Show(); } }