internal void AddAlert(Alert alert) { alert.Manager = this; lock(Alerts) { Alerts.Add(alert); } }
private void EngagementOnRDPConnectionAccepted(object sender, EventArgs eventArgs) { _thisAlert = new Alert() { Message = Engagement.SecondParty.Party.Firstname + " is Connected", ClickCommand = () => _appContext.UIManager.Dashboard.ActivateEngagement(Engagement.SecondParty) }; _appContext.NotificationManager.AddAlert(_thisAlert); if (Dispatcher.CheckAccess()) { IndicateRdpConnection(); } else { Dispatcher.Invoke(new Action(IndicateRdpConnection)); } }
internal void DeleteAlert(Alert alert) { lock (Alerts) { if (Alerts.Remove(alert)) { Logger.Debug("Successfully removed alert [" + alert.ToString() + "]"); } else { Logger.Warn("Failed to remove notication [" + alert.ToString() + "]"); } } }