public override void RaiseEvent(UIEventName eventName, UIEventArgs e) { switch (eventName) { case UIEventName.MouseDown: { _mouseDownEventHandler?.Invoke((UIMouseEventArgs)e); } break; case UIEventName.MouseMove: { _mouseMoveEventHandler?.Invoke((UIMouseEventArgs)e); } break; case UIEventName.MouseUp: { _mouseUpEventHandler?.Invoke((UIMouseEventArgs)e); } break; case UIEventName.MouseLostFocus: { _mouseLostFocusEventHandler?.Invoke(e); } break; case UIEventName.KeyDown: { _keyDownEventHandler?.Invoke((UIKeyEventArgs)e); } break; } }
public override void DetachEvent(UIEventName eventName, HtmlEventHandler handler) { switch (eventName) { case UIEventName.MouseDown: { if (_mouseDownEventHandler != null) { _mouseDownEventHandler -= handler; } } break; case UIEventName.MouseMove: { if (_mouseMoveEventHandler != null) { _mouseMoveEventHandler -= handler; } } break; case UIEventName.MouseUp: { if (_mouseUpEventHandler != null) { _mouseUpEventHandler -= handler; } } break; case UIEventName.MouseLostFocus: { if (_mouseLostFocusEventHandler != null) { _mouseLostFocusEventHandler -= handler; } } break; case UIEventName.KeyDown: { if (_keyDownEventHandler != null) { _keyDownEventHandler -= handler; } } break; } }
public void DetachEvent(UIEventName eventName, HtmlEventHandler handler) { switch (eventName) { case UIEventName.MouseDown: { this.evhMouseDown -= handler; } break; case UIEventName.MouseUp: { this.evhMouseUp -= handler; } break; } }
//------------------------------------------------------ public void AttachEvent(UIEventName eventName, HtmlEventHandler handler) { switch (eventName) { case UIEventName.MouseDown: { _evhMouseDown += handler; } break; case UIEventName.MouseUp: { _evhMouseUp += handler; } break; } }
public virtual void RaiseEvent(UIEventName eventName, UIEventArgs e) { }
public virtual void DetachEvent(UIEventName eventName, HtmlEventHandler handler) { }
public static void SetEventInfo(this UIKeyEventArgs e, UIEventName eventName) { e._eventName = eventName; }
public static void SetEventInfo(this UIKeyEventArgs e, bool shift, bool alt, bool control, UIEventName eventName) { e.Shift = shift; e.Alt = alt; e.Ctrl = control; e._eventName = eventName; }