Exemplo n.º 1
0
 public void Notify(string title, string message, string imageName)
 {
     if (this.IsEnabled)
     {
         Task.Factory.StartNew(() => {
             NotificationWindow notificationWindow;
             App.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => {
                 notificationWindow = new NotificationWindow(title, message, currentHighId++, imageName);
                 notificationWindow.Show();
                 Application.Current.MainWindow.Activate();
             }));
         });
     }
 }