private void OnGlobalHookMouseWheel(object sender, MouseWheelEventArgs e) { if (ClientState.CurrentClientFocused) { return; } //don't process a hook event within 2 seconds of receiving network events. #if BailClient if (ShouldHookBailMouse()) { return; } ClientState.LastHookEvent_Mouse = DateTime.UtcNow; #endif #if QUEUE_CLIENT _dispatcher.Process(new MouseWheelMessage(e.DeltaX, e.DeltaY)); #else _dispatcher.Send(MouseWheelMessage.GetBytes(e.DeltaX, e.DeltaY)); #endif e.Handled = true; }
private bool ProcessMouseWheelMessage(MouseWheelMessage wheelMessage) { if (!_tile.Enabled) { return(true); } ReleaseCapture(true); IMouseWheelHandler handler = _shortcutManager.GetMouseWheelHandler(wheelMessage.Shortcut); if (handler != null) { this.CaptureMouseWheelHandler = handler; handler.Wheel(wheelMessage.WheelDelta); MouseWheelManager.Instance.OnMouseWheel(); return(true); } return(false); }
public void OnMouseWheeling(object sender, MouseWheelEventArgs e) { if (_destroyed) { return; } PerformanceMonitor p = PerformanceMonitor.CurrentInstance; bool okToSend = p.MouseWheelMsgCount <= ThrottleSettings.Default.MaxPendingMouseMoveMsgAllowed; if (okToSend) { PerformanceMonitor.CurrentInstance.Begin(1000); Message msg = new MouseWheelMessage { Identifier = Guid.NewGuid(), TargetId = ServerEntity.Identifier, Delta = e.Delta }; _eventMediator.DispatchMessage(msg); } }