Beispiel #1
0
 public void ShowNotificationBubble(string title, string message, NotifyIcon theIcon)
 {
     try
     {
         var feedbackDisplay = CreateFeedbackDisplay(title, message, theIcon);
         if (ViewModel == null)
         {
             _toast.ShowCustomBalloon(feedbackDisplay, PopupAnimation.Fade, 60000);
         }
         else
         {
             UpdateTimer(feedbackDisplay);
             UpdateProgressLevel(feedbackDisplay);
             _toast.ShowCustomBalloon(feedbackDisplay, PopupAnimation.Fade,
                                      ViewModel.NotificationVisibilityTimeSeconds * 1000);
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("An Error Occured : " + e.Message + Environment.NewLine + "Stack Trace : " +
                         e.StackTrace);
     }
 }