public void InvokeAlertAddedEvent(Models.AlertModel alert) { if (ShellView != null) { InvokeOnWindowThread(() => { EventAggregator.GetEvent <Events.AlertAddedEvent>().Publish(alert); if (ShellView.WindowState == WindowState.Minimized) { ShellView.WindowState = WindowState.Normal; } if (!ShellView.Topmost) { ShellView.Topmost = true; ShellView.Topmost = false; } }); } else { EventAggregator.GetEvent <Events.AlertAddedEvent>().Publish(alert); } }
public void AlertRemovedEvent_Handler(Models.AlertModel alert) { if (_alerts.Contains(alert)) { _alerts.Remove(alert); } }