Beispiel #1
0
        public void Init()
        {
            if (Items == null)
            {
                Items = new List <PomodoroItem>
                {
                    new PomodoroItem(PomodoroType.TaskTimer,
                                     Color.FromArgb(255, 240, 58, 23),
                                     Color.FromArgb(255, 239, 105, 80)),
                    new PomodoroItem(PomodoroType.ShortBreak,
                                     Color.FromArgb(255, 131, 190, 236),
                                     Color.FromArgb(255, 179, 219, 212)),
                    new PomodoroItem(PomodoroType.LongBreak,
                                     Color.FromArgb(255, 186, 216, 10),
                                     Color.FromArgb(255, 228, 245, 119)),
                };
            }
            ScheduledToastNotification toast = GetToast();
            PomodoroItem item = Items[0];

            if (toast != null)
            {
                item    = Items.FirstOrDefault(f => f.Id == toast.Id);
                _start  = toast.DeliveryTime.UtcDateTime - item.TimeSpan;
                _finish = toast.DeliveryTime.UtcDateTime;
                Start();
            }
            Select(item);
        }
Beispiel #2
0
 public void Select(PomodoroItem item)
 {
     Item     = item;
     _current = Item.TimeSpan;
     Display  = GetDisplay(_current);
 }