LookupById() public static method

public static LookupById ( int id ) : AutomationEvent
id int
return AutomationEvent
示例#1
0
        void IUIAutomationEventHandler.HandleAutomationEvent(
            IUIAutomationElement sender,
            int eventId)
        {
            AutomationElement automationElement = null;

            if (sender != null)
            {
                automationElement = new AutomationElement(autoElement: sender);
            }
            if (eventId == 20017)
            {
                this._handlingDelegate(sender: automationElement, e: new WindowClosedEventArgs(runtimeId: automationElement.GetRuntimeId()));
            }
            else
            {
                this._handlingDelegate(sender: automationElement, e: new AutomationEventArgs(eventId: AutomationEvent.LookupById(id: eventId)));
            }
        }