Ejemplo n.º 1
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (this.onMouseClick != null)
     {
         return(this.onMouseClick(this, arg));
     }
     return(null);
 }
Ejemplo n.º 2
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (Handler != null)
     {
         Handler = Handler.MouseClick(arg);
     }
     if (Handler == null)
     {
         return(this.continuation(arg));
     }
     return(this);
 }
Ejemplo n.º 3
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (Left != null)
     {
         Left = Left.MouseClick(arg);
     }
     if (Right != null)
     {
         Right = Right.MouseClick(arg);
     }
     return(ThisIfLeftAndRightIsNotNull());
 }
Ejemplo n.º 4
0
        public void Evaluate(int spreadMax)
        {
            var binCount = BinSizePin.IOObject.Length;

            FSubjects.ResizeAndDispose(binCount);
            MouseOut.ResizeAndDismiss(binCount, slice => new Mouse(FSubjects[slice]));
            for (int bin = 0; bin < binCount; bin++)
            {
                var subject           = FSubjects[bin];
                var notificationCount = EventTypeIn[bin].SliceCount;
                for (int i = 0; i < notificationCount; i++)
                {
                    var position = PositionIn[bin][i].ToMousePoint();
                    MouseNotification notification;
                    switch (EventTypeIn[bin][i])
                    {
                    case MouseNotificationKind.MouseDown:
                        notification = new MouseDownNotification(position, MouseExtensions.ClientArea, GetMouseButtons(bin, i));
                        break;

                    case MouseNotificationKind.MouseUp:
                        notification = new MouseUpNotification(position, MouseExtensions.ClientArea, GetMouseButtons(bin, i));
                        break;

                    case MouseNotificationKind.MouseMove:
                        notification = new MouseMoveNotification(position, MouseExtensions.ClientArea);
                        break;

                    case MouseNotificationKind.MouseWheel:
                        notification = new MouseWheelNotification(position, MouseExtensions.ClientArea, MouseWheelIn[bin][i]);
                        break;

                    case MouseNotificationKind.MouseClick:
                        notification = new MouseClickNotification(position, MouseExtensions.ClientArea, GetMouseButtons(bin, i), Math.Max(ClickCountIn[bin][i], 1));
                        break;

                    default:
                        throw new NotImplementedException();
                    }
                    if (notification != null)
                    {
                        subject.OnNext(notification);
                    }
                }
            }
        }
Ejemplo n.º 5
0
 public IMouseKeyboardHandler MouseClick(MouseClickNotification arg)
 {
     return(FHandler.MouseClick(arg) ? this : null);
 }