示例#1
0
        public FormSectionBox(UIApplication uiapp, ExternalEvent exEvent, ClassRequestHandler handler)
        {
            m_UIApplication = uiapp;

            m_Handler = handler;
            m_ExEvent = exEvent;

            InitializeComponent();
        }
示例#2
0
        protected override void OnFormClosed(FormClosedEventArgs 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;

            // do not forget to call the base class
            base.OnFormClosed(e);
        }
示例#3
0
        public void ShowFormCopy(UIApplication uiapp)
        {
            // If we do not have a dialog yet, create and show it
            if (m_FormSectionBoxList == null || m_FormSectionBoxList.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_FormSectionBoxList = new FormSectionBoxList(uiapp, exEvent, handler);
                //m_FormSectionBox = new FormSectionBox(exEvent, handler);
                m_FormSectionBoxList.Show();
            }
        }