private void HandleApplicationNotification(object sender, NotificationEventArgs ea) { BeginInvoke((Action)(() => { //code to update UI PostNotification(ea.Id, ea.Text, ea.ClickHandler, ea.Kind, ea.InformationUrl); })); }
private void PostNotification(string id, string text, Action clickHandler, NotificationKind kind, string informationUrl) { NotificationEventArgs notification = new NotificationEventArgs { Id = id, Text = text, ClickHandler = clickHandler, Kind = kind, InformationUrl = informationUrl }; if (NotificationReceived != null) NotificationReceived(this, notification); }
private void HandleNotificationDismissed(object sender, NotificationEventArgs ea) { notificationsControl.RemoveNotification(ea.Id); }