C# Класс Revit.SDK.Samples.EventsMonitor.CS.EventManager

This class is a manager for application events. In this class, user can subscribe and remove the events according to what he select. This class used the controlled Application as the sender. If you want to use Application or Document as the sender, the usage is same. "+=" is used to register event and "-=" is used to remove event.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
EventManager ( UIControlledApplication app ) : System

Constructor for application event manager.

Update ( List selection ) : void

A public method used to update the events subscription

app_eventsHandlerMethod ( Object obj, EventArgs args ) : void

Generic event handler can be subscribed to any events. It will dump events information(sender and EventArgs) to log window and log file

Приватные методы

Метод Описание
EventManager ( ) : System

Prevent the compiler from generating a default constructor.

addEvents ( String eventName ) : void

Register event according to event name. The generic handler app_eventsHandlerMethod will be subscribed to this event.

subtractEvents ( String eventName ) : void

Remove registered event by its name.

Описание методов

EventManager() публичный Метод

Constructor for application event manager.
public EventManager ( UIControlledApplication app ) : System
app UIControlledApplication
Результат System

Update() публичный Метод

A public method used to update the events subscription
public Update ( List selection ) : void
selection List
Результат void

app_eventsHandlerMethod() публичный Метод

Generic event handler can be subscribed to any events. It will dump events information(sender and EventArgs) to log window and log file
public app_eventsHandlerMethod ( Object obj, EventArgs args ) : void
obj Object
args System.EventArgs
Результат void