private void OnTimerStopped(TimerStopped @event) { if (@event.IsIntervalCompleted && userPreferences.ShowToastNotifications) { var toast = Toasts.IntervalCompleted(@event.IntervalType, pomodoroEngine.SuggestedBreakType); toast.Activated += OnToastActivated; toastNotifier.Show(toast); } }
private void OnTimerStopped(TimerStopped @event) { if (@event.IsIntervalCompleted && userPreferences.ShowToastNotifications) { var toast = Toasts.IntervalCompleted(@event.IntervalType, pomodoroEngine.SuggestedBreakType); TimerWindow.DispatcherUi.BeginInvoke(new System.Action (() => toastNotifier.Show(toast)) ); } }