EventCommandEventArgs.DisableEvent(Int32) 方法
定义
禁用有指定标识符的事件。Disables the event that have the specified identifier.
public:
bool DisableEvent(int eventId);
public bool DisableEvent (int eventId);
member this.DisableEvent : int -> bool
Public Function DisableEvent (eventId As Integer) As Boolean
参数
- eventId
- Int32
禁用事件的标识符。The identifier of the event to disable.
返回
如果 eventId 在范围中,则为 true;否则为 false。true if eventId is in range; otherwise, false.
注解
可以通过调用 DisableEvent 以 eventID = 1 开头的,然后继续直到返回,关闭事件侦听器中的所有事件 DisableEvent false 。You can turn off all events in an event listener by calling DisableEvent starting with eventID = 1 and continuing until DisableEvent returns false.