EventInfo.EventInfo

Overview | Methods | This Package | All Packages

EventInfo.EventInfo

Creates an EventInfo object.

Syntax

public EventInfo( Class componentClass, String name, Class type, MemberAttribute[] attributes )

public EventInfo( Class componentClass, String name, Class type )

public EventInfo( Class componentClass, String name, Class type, MemberAttribute a1 )

public EventInfo( Class componentClass, String name, Class type, MemberAttribute a1, MemberAttribute a2 )

public EventInfo( Class componentClass, String name, Class type, MemberAttribute a1, MemberAttribute a2, MemberAttribute a3 )

public EventInfo( Class componentClass, String name, Class type, MemberAttribute a1, MemberAttribute a2, MemberAttribute a3, MemberAttribute a4 )

public EventInfo( EventInfo oldEventInfo, MemberAttribute[] attributes )

public EventInfo( EventInfo oldEventInfo, MemberAttribute a1 )

public EventInfo( EventInfo oldEventInfo, MemberAttribute a1, MemberAttribute a2 )

public EventInfo( EventInfo oldEventInfo, MemberAttribute a1, MemberAttribute a2, MemberAttribute a3 )

public EventInfo( EventInfo oldEventInfo, MemberAttribute a1, MemberAttribute a2, MemberAttribute a3, MemberAttribute a4 )

Parameters

componentClass

The type of the component that defines the event.

name

The name of the event.

type

The type of the event handling delegate.

attributes

An array of MemberAttribute objects that specify the attributes of the event.

a1, a2, a3, a4

A MemberAttribute object that specifies an attribute of the event.

oldEventInfo

An existing EventInfo object on which to base the new event.

Remarks

When you create a new event using an existing EventInfo object, the attributes of the existing event and those specified for the new event are combined. However, if an attribute of the existing event is of the same class as an attribute specified for the new event, the attribute for the new event takes precedence. For example, if you pass an EventInfo object that specifies CategoryAttribute.Key, but you also pass CategoryAttribute.Mouse, the new event is given the CategoryAttribute.Mouse attribute.

For an example that shows how to create an EventInfo object, see the EventInfo overview.