Beispiel #1
0
 public StartForms(UIApplication app, ExternalEvent exEvent, ExternalEventHandler handler)
 {
     InitializeComponent();
     this.App  = app;
     m_ExEvent = exEvent;
     m_Handler = handler;
 }
Beispiel #2
0
 private void FamiliesUpdate_Closed(object sender, EventArgs e)
 {
     // we own both the event and the handler
     // we should dispose it before we are closed
     m_ExEvent.Dispose();
     m_ExEvent = null;
     m_Handler = null;
     Close();
 }
        public void ShowForm(UIApplication uiapp)
        {
            // If we do not have a dialog yet, create and show it
            if (m_MyForm == null || !m_MyForm.IsActive)
            {
                // A new handler to handle request posting by the dialog
                ExternalEventHandler handler = new ExternalEventHandler(uiapp);

                // 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_MyForm = new StartForms(uiapp, exEvent, handler);
                m_MyForm.Show();
            }
        }