private void NotifyUserOfStreamEnding(object sender, ElapsedEventArgs e) { ShowError(TranslationProvider.Translate(MultistringTags.TERMINAL_VIDEO_TIMES_OUT, ChangeTracker.VideoWarningBefore), null, false, ChangeTracker.VideoWarningBefore); StreamTimer.Stop(); StreamTimer.Interval = ChangeTracker.VideoWarningBefore * 1000; StreamTimer.Elapsed -= NotifyUserOfStreamEnding; StreamTimer.Elapsed += EndStream; StreamTimer.Start(); }
private void StopTimer() { if (StreamTimer != null) { StreamTimer.Stop(); StreamTimer.Elapsed -= NotifyUserOfStreamEnding; StreamTimer.Elapsed -= EndStream; StreamTimer = null; } }