internal static void ShowNotification(IManagedAudioSession session) { try { var content = new VolumeNotificationContent(session); _notificationManager.ShowNotification(content, session.Id, true, NotificationDisplayTime); } catch (ObjectDisposedException) { } catch (Exception e) { Logger.Error("Failed to display notification", e); } }
internal static void ShowNotificationExample() { try { var dummySession = new DummyAudioSession(50, false, "Application", IconHelper.GenericExeIcon); var content = new VolumeNotificationContent(dummySession); _notificationManager.ShowNotification(content, _exampleNotificationId, false, TimeSpan.MaxValue); } catch (ObjectDisposedException) { } catch (Exception e) { Logger.Error("Failed to display example notification", e); } }