本文整理汇总了C#中INotification.NeedCustomSound方法的典型用法代码示例。如果您正苦于以下问题:C# INotification.NeedCustomSound方法的具体用法?C# INotification.NeedCustomSound怎么用?C# INotification.NeedCustomSound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INotification
的用法示例。
在下文中一共展示了INotification.NeedCustomSound方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetNotification
private void SetNotification(NotificationTypeEnum notificationTypeEnum)
{
_notification = _notificationFactory.Get(notificationTypeEnum);
_notification.Configuration = new NotificationConfiguration()
{
Icon = AppModel.Instance.NotifyIcon,
DefaultSound = Resources.NotificationSound
};
try
{
_notification.Configuration.CustomSound = AppModel.Instance.CustomNotificationSound;
}
catch (CachedSoundFileNotExistsException)
{
if (!_notification.NeedCustomSound())
{
return;
}
MessageBox.Show(string.Format(Properties.Notifications.AudioFileNotFound, Application.ProductName,
Properties.Notifications.NotifSound),Properties.Notifications.AudioFileNotFoundTitle,
MessageBoxButtons.OK, MessageBoxIcon.Error);
_model.NotificationSettings = NotificationTypeEnum.SoundNotification;
}
}