示例#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;
            }
        }
示例#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;
            }
        }
        public void DetachEvent(UIEventName eventName, HtmlEventHandler handler)
        {
            switch (eventName)
            {
            case UIEventName.MouseDown:
            {
                this.evhMouseDown -= handler;
            } break;

            case UIEventName.MouseUp:
            {
                this.evhMouseUp -= handler;
            } break;
            }
        }
示例#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;
            }

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

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