public void AddItemToDay(DoubleTime newItem)
        {
            DayOfWeek day = newItem.Day;

            if (GetCollapseTime(newItem) is DoubleTime result)
            {
                throw new ArgumentException(result.ToString());
            }

            this[day].Add(newItem);
            RaisePropertyChanged(day.ToString());
        }
        public DoubleTime?GetCollapseTime(DoubleTime newItem)
        {
            DayOfWeek day = newItem.Day;

            foreach (DoubleTime oldItem in this[day])
            {
                if (oldItem.GetCollapseTime(newItem) is DoubleTime result)
                {
                    return(result);
                }
            }
            return(null);
        }
 public void RemoveItemFromDay(DoubleTime item)
 => this[item.Day].Remove(item);