Ejemplo n.º 1
0
        private ReminderItemDTO CreateReminder(DateTime dateTime, ReminderRepetitions pattern, DateTime?lastShown = null, TimeSpan?remindBefore = null)
        {
            ReminderItemDTO item = new ReminderItemDTO();

            item.DateTime     = dateTime;
            item.Repetitions  = pattern;
            item.LastShown    = lastShown;
            item.RemindBefore = remindBefore;
            return(item);
        }
Ejemplo n.º 2
0
 private RecurrenceInterval fromReminderRepetitions(ReminderRepetitions reminderRepetitions)
 {
     if (reminderRepetitions == ReminderRepetitions.EveryDay)
     {
         return(RecurrenceInterval.Daily);
     }
     if (reminderRepetitions == ReminderRepetitions.EveryWeek)
     {
         return(RecurrenceInterval.Weekly);
     }
     if (reminderRepetitions == ReminderRepetitions.EveryMonth)
     {
         return(RecurrenceInterval.Monthly);
     }
     if (reminderRepetitions == ReminderRepetitions.EveryYear)
     {
         return(RecurrenceInterval.Yearly);
     }
     return(RecurrenceInterval.None);
 }