private void UpdateStatus(StatusCheckData status) { status.DidWorkOnce = true; status.IsWorking = true; status.LastWorkingTimestamp = DateTime.Now; OnStatusChanged?.Invoke(); }
public StatusChecker() { InterceptorStatus = new StatusCheckData(TimeSpan.FromSeconds(1)); KeyboardStatus = new StatusCheckData(); MouseStatus = new StatusCheckData(); StatusList = new List <StatusCheckData>() { InterceptorStatus, KeyboardStatus, MouseStatus }; m_AutoEvent = new AutoResetEvent(false); m_Timer = new Timer(CheckStatus, m_AutoEvent, Timeout.Infinite, Timeout.Infinite); }