Inheritance: IExternalEventHandler
        /// <summary>
        /// The external command invokes this on the end-user's request 
        /// </summary>
        /// <param name="uiapp"></param>
        public void ShowForm(UIApplication uiapp)
        {
            // If we do not have a dialog yet, create and show it
              if (RvtWindow != null) return;

              // A new handler to handle request posting by the dialog
              ExtOpenView handler = new ExtOpenView();

              // External Event for the dialog to use (to post requests)
              ExternalEvent m_event = ExternalEvent.Create(handler);

              // We give the objects to the new dialog;
              // The dialog becomes the owner responsible for disposing them, eventually.
              RvtWindow = new RevitWindow(uiapp, m_event, handler);
              RvtWindow.Show();
        }
Exemple #2
0
        /// <summary>
        /// The external command invokes this on the end-user's request
        /// </summary>
        /// <param name="uiapp"></param>
        public void ShowForm(UIApplication uiapp)
        {
            // If we do not have a dialog yet, create and show it
            if (RvtWindow != null)
            {
                return;
            }

            // A new handler to handle request posting by the dialog
            ExtOpenView handler = new ExtOpenView();

            // External Event for the dialog to use (to post requests)
            ExternalEvent m_event = ExternalEvent.Create(handler);

            // We give the objects to the new dialog;
            // The dialog becomes the owner responsible for disposing them, eventually.
            RvtWindow = new RevitWindow(uiapp, m_event, handler);
            RvtWindow.Show();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="_uiapp"></param>
        /// <param name="exEvent"></param>
        /// <param name="handler"></param>
        public RevitWindow(UIApplication _uiapp, ExternalEvent exEvent, ExtOpenView handler)
        {
            InitializeComponent();

              try
              {

            m_ExEvent = exEvent;
            m_Handler = handler;
            uiapp = _uiapp;

            mainPan.jiraPan.AddIssueBtn.Click += new RoutedEventHandler(AddIssueJira);
            mainPan.bcfPan.AddIssueBtn.Click += new RoutedEventHandler(AddIssueBCF);

            mainPan.bcfPan.Open3dViewBtn.Click += new RoutedEventHandler(Open3dViewBCF);
            mainPan.jiraPan.Open3dViewBtn.Click += new RoutedEventHandler(Open3dViewJira);
              }

              catch (Exception ex1)
              {
            MessageBox.Show("exception: " + ex1);
              }
        }