Example #1
0
 /// <summary>
 /// Fires the <see cref="onInactive"/> and <see cref="Inactive"/> events.
 /// </summary>
 private void OnInactive()
 {
     if (IsActive)
     {
         IsActive = false;
         onInactive?.Invoke();
         Inactive?.Invoke(this, EventArgs.Empty);
     }
 }
Example #2
0
 private void Stop()
 {
     _timer.Cancel();
     _timer = null;
     Inactive?.Invoke(this, null);
 }