예제 #1
0
        private void ANCS_NotificationRemoved(NotificationConsumer sender, NotificationSourceData args)
        {
            var toastHistory = ToastNotificationManager.History;

            try
            {
                toastHistory.Remove(args.NotificationUID.ToString());
            }
            catch (Exception)
            {
                // Just be silent
            }
        }
예제 #2
0
 private void NotificationConsumer_NotificationRemoved(NotificationConsumer sender, NotificationSourceData args)
 {
     try
     {
         ToastNotificationManager.History.Remove(args.NotificationUID.ToString(), args.CategoryId.ToString(), "Apple Notification Center");
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }