Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
        public void DetachEvent(UIEventName eventName, HtmlEventHandler handler)
        {
            switch (eventName)
            {
            case UIEventName.MouseDown:
            {
                this.evhMouseDown -= handler;
            } break;

            case UIEventName.MouseUp:
            {
                this.evhMouseUp -= handler;
            } break;
            }
        }
Ejemplo n.º 4
0
        public void DetachEvent(UIEventName eventName, HtmlEventHandler handler)
        {
            switch (eventName)
            {
                case UIEventName.MouseDown:
                    {
                        this.evhMouseDown -= handler;
                    } break;
                case UIEventName.MouseUp:
                    {
                        this.evhMouseUp -= handler;
                    } break;
            }

        }
Ejemplo n.º 5
0
        //------------------------------------------------------
        public void AttachEvent(UIEventName eventName, HtmlEventHandler handler)
        {
            switch (eventName)
            {
            case UIEventName.MouseDown:
            {
                _evhMouseDown += handler;
            }
            break;

            case UIEventName.MouseUp:
            {
                _evhMouseUp += handler;
            }
            break;
            }
        }
Ejemplo n.º 6
0
 public virtual void RaiseEvent(UIEventName eventName, UIEventArgs e)
 {
 }
Ejemplo n.º 7
0
 public virtual void DetachEvent(UIEventName eventName, HtmlEventHandler handler)
 {
 }
Ejemplo n.º 8
0
 public static void SetEventInfo(this UIKeyEventArgs e, UIEventName eventName)
 {
     e._eventName = eventName;
 }
Ejemplo n.º 9
0
 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;
 }