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.
파일 보기 프로젝트 열기: AMEE/revit 1 사용 예제들

공개 메소드들

메소드 설명
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