Beispiel #1
0
 public static Result OnStartup(UIControlledApplication app)
 {
     MFElePlaced.StartUp(app.ActiveAddInId);
     app.ControlledApplication.DocumentOpened  += new EventHandler <DocumentOpenedEventArgs>(OpenedEvent);
     app.ControlledApplication.DocumentClosing += new EventHandler <DocumentClosingEventArgs>(ClosingEvent);
     app.ControlledApplication.DocumentCreated += new EventHandler <DocumentCreatedEventArgs>(CreatedEvent);
     RegisterUpdater(app.ActiveAddInId);
     return(Result.Succeeded);
 }
Beispiel #2
0
        public static void StartUp(AddInId id)
        {
            MFElePlaced updater = new MFElePlaced(id);

            UpdaterRegistry.RegisterUpdater(updater, true);
            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(),
                                       new ElementClassFilter(typeof(FamilyInstance)),
                                       Element.GetChangeTypeElementAddition());
        }
Beispiel #3
0
        public static Result OnShutdown(UIControlledApplication app)
        {
            MFElePlaced.ShutDown(app.ActiveAddInId);
            app.ControlledApplication.DocumentOpened  -= new EventHandler <DocumentOpenedEventArgs>(OpenedEvent);
            app.ControlledApplication.DocumentClosing -= new EventHandler <DocumentClosingEventArgs>(ClosingEvent);
            app.ControlledApplication.DocumentCreated -= new EventHandler <DocumentCreatedEventArgs>(CreatedEvent);
            MFTypeNameChange updater = new MFTypeNameChange(app.ActiveAddInId);

            UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
            return(Result.Succeeded);
        }
Beispiel #4
0
        public static void ShutDown(AddInId id)
        {
            MFElePlaced updater = new MFElePlaced(id);

            UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
        }