private void OnEndReminder(object sender, ReminderEventArgs e) { var currentReminders = _remindersUc.CurrentReminders; _remindersUc.RemoveReminder(e.Reminder, ref currentReminders); _remindersUc.AddDoneReminder(e.Reminder); _remindersUc.RefreshReminders(); }
private void OnRefreshTimer(object sender, ReminderEventArgs e) { var remainingTime = _reminder.GetRemainingTime(); if (remainingTime == _reminder.Interval - 1 || remainingTime == -1) // Repeats or is done { RefreshReminders?.Invoke(sender, e); } timeLbl.Text = remainingTime.ToString(); }
private void OnCreateReminder(object sender, ReminderEventArgs e) { var reminder = e.Reminder; reminder.EndReminder += OnEndReminder; var currentReminders = _remindersUc.CurrentReminders; _remindersUc.AddToReminders(e.Reminder, ref currentReminders); _remindersUc.RefreshReminders(); LoadUserControl(_remindersUc); }
private void OnRefreshReminders(object sender, ReminderEventArgs e) { AddDoneReminder(e.Reminder); RefreshReminders(); }