Example #1
0
 private void ShowMessage(NotificationMessage notificationMessage)
 {
     NotifyToGrowl(notificationMessage);
 }
Example #2
0
        private void NotifyToGrowl(NotificationMessage notificationMessage)
        {
            if (notificationMessage.Title == "" || notificationMessage.Message == "")
            {
                return;
            }

            var notification = new Notification(application.Name, notificationType.Name, DateTime.Now.Ticks.ToString(), notificationMessage.Title, notificationMessage.Message);
            notification.Icon = this.Icon.ToBitmap();
            if (notificationMessage.Url != null)
            {
                notification.CustomTextAttributes.Add("url", notificationMessage.Url);
            }
            growl.Notify(notification, new CallbackContext("OPEN_URL", "string"), notification);
        }