public Task OnVpnStateChanged(VpnStateChangedEventArgs e) { if (!_config.MaintenanceTrackerEnabled) { return(Task.CompletedTask); } _state = e.State; if (e.State.Status == VpnStatus.Connected) { if (!_timer.IsEnabled) { _timer.Interval = _config.MaintenanceCheckInterval; _timer.Start(); } } else { if (_timer.IsEnabled) { _timer.Stop(); } } return(Task.CompletedTask); }
private void StopTimer() { if (_timer.IsEnabled) { _timer.Stop(); } }
public void OnUserLoggedOut() { _timer.Stop(); _firstTime = true; }
public void OnUserLoggedOut() { _timer.Stop(); }