object IReflect.InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) { if (name == "[DISPID=0]") { IHTMLEventObj eventObj = (IHTMLEventObj)args[0]; if (null != this.eventHandler) { ElementEventName eventName = (ElementEventName)Enum.Parse(typeof(ElementEventName), eventObj.type); this.eventHandler(this, new ElementEventArgs(this.element, eventName, eventObj)); } } return(null); }
public ElementEventArgs(Element element, ElementEventName eventName, IHTMLEventObj eventObj) { this.EventName = eventName; this.Element = element; this.EventObj = eventObj; }