public bool PreFilterMessage(ref Message m) { if (m.Msg >= WM_MOUSEMOVE && m.Msg <= WM_MBUTTONDBLCLK || m.Msg == WM_KEYDOWN || m.Msg == WM_KEYUP) { UserActive?.Invoke(this, EventArgs.Empty); if (IdleTimeout != default(TimeSpan)) { _timer.Change((int)IdleTimeout.TotalMilliseconds, -1); } } // Always allow message to continue to the next filter control return(false); }
public void ReportActivityEvent() { UserActive.Invoke(this, new EventArgs()); }