public void Remove(Notification notification) { _container.Remove(notification); if (_container.Count == 0) { CountBeforeReset = 0; } }
private void CheckForNotifications(object sender, EventArgs eventArgs) { if (IsNewDay()) { // Clear any notifications that may have been dismissed. Allow them to alert again today. _notificationQueue.Clear(); } foreach (Task task in _MainWindowViewModel.Tasks) { if (task.DueDate.Date == DateTime.Today) { Notification notification = new Notification( "A task is due today\n" + task.Key + " " + task.Description, new OpenTaskCommand(task) as ITaskDashCommand, new DelayTaskCommand(task) as ITaskDashCommand ); ShowPopup(notification); } } }
public RemoveNotificationCommand(Notification notification, NotificationList notifications) { _notifications = notifications; _notification = notification; }
private bool CheckEquals(Notification other) { bool equalLength = Equals(other._delayLength, _delayLength); bool equalButtonPresses = other._dismissButtonPressed.Equals(_dismissButtonPressed); bool equalDescriptions = Equals(other.Description, Description); bool equalDelay = other.DelayTime.Equals(DelayTime); return equalLength && equalButtonPresses && equalDescriptions && equalDelay; }
public bool Equals(Notification other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; bool equal = CheckEquals(other); return equal; }
public void Add(Notification notification) { _container.Add(notification); CountBeforeReset++; }
private void ShowPopup(Notification notification) { _notificationQueue.Enqueue(notification); }