コード例 #1
0
        public Result OnStartup(UIControlledApplication application)
        {
            m_MyForm = null; // no dialog needed yet; the command will bring it
            thisApp  = this; // static access to this application instance

            return(Result.Succeeded);
        }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FamiliesUpdate = ((DS.RevitApp.FamiliesUpdate.StartForms)(target));

            #line 10 "..\..\..\StartForms.xaml"
                this.FamiliesUpdate.Closed += new System.EventHandler(this.FamiliesUpdate_Closed);

            #line default
            #line hidden
                return;

            case 2:

            #line 23 "..\..\..\StartForms.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Projects_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.Mask = ((System.Windows.Controls.CheckBox)(target));

            #line 25 "..\..\..\StartForms.xaml"
                this.Mask.Checked += new System.Windows.RoutedEventHandler(this.Mask_Checked);

            #line default
            #line hidden

            #line 25 "..\..\..\StartForms.xaml"
                this.Mask.Unchecked += new System.Windows.RoutedEventHandler(this.Mask_Unchecked);

            #line default
            #line hidden
                return;

            case 4:

            #line 28 "..\..\..\StartForms.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Families_Click);

            #line default
            #line hidden
                return;

            case 5:

            #line 30 "..\..\..\StartForms.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_StartLoading_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
コード例 #3
0
        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();
            }
        }