예제 #1
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (this.onMouseClick != null)
     {
         return(this.onMouseClick(this, arg));
     }
     return(null);
 }
예제 #2
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (Handler != null)
     {
         Handler = Handler.MouseClick(arg);
     }
     if (Handler == null)
     {
         return(this.continuation(arg));
     }
     return(this);
 }
예제 #3
0
 public IMouseHandler MouseClick(MouseClickNotification arg)
 {
     if (Left != null)
     {
         Left = Left.MouseClick(arg);
     }
     if (Right != null)
     {
         Right = Right.MouseClick(arg);
     }
     return(ThisIfLeftAndRightIsNotNull());
 }
예제 #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);
                    }
                }
            }
        }
예제 #5
0
 public IMouseKeyboardHandler MouseClick(MouseClickNotification arg)
 {
     return(FHandler.MouseClick(arg) ? this : null);
 }