Beispiel #1
0
 /// <summary>
 /// Adds the specified <see cref="CalendarDayTop"/> as a passing one
 /// </summary>
 /// <param name="top"></param>
 internal void AddTopPassing(CalendarDayTop top)
 {
     if (!TopsPassing.Contains(top))
     {
         TopsPassing.Add(top);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Creates a new Day
        /// </summary>
        /// <param name="calendar">Calendar this day belongs to</param>
        /// <param name="date">Date of the day</param>
        /// <param name="index">Index of the day on the current calendar's view</param>
        internal CalendarDay(Calendar calendar, DateTime date, int index)
            : base(calendar)
        {
            _containedItems = new List <CalendarItem>();
            _calendar       = calendar;
            _dayTop         = new CalendarDayTop(this);
            _date           = date;
            Index           = index;

            UpdateUnits();
        }
Beispiel #3
0
        /// <summary>
        /// Creates a new Day
        /// </summary>
        /// <param name="calendar">Calendar this day belongs to</param>
        /// <param name="date">Date of the day</param>
        /// <param name="index">Index of the day on the current calendar's view</param>
        internal CalendarDay(Calendar calendar, DateTime date, int index)
            : base(calendar)
        {
            _containedItems = new List<CalendarItem>();
            _calendar = calendar;
            _dayTop = new CalendarDayTop(this);
            _date = date;
            _index = index;

            UpdateUnits();
        }
 /// <summary>
 /// Compares both <see cref="CalendarDayTop"/> items by Date
 /// </summary>
 /// <param name="top1"></param>
 /// <param name="top2"></param>
 /// <returns></returns>
 private static int CompareTops(CalendarDayTop top1, CalendarDayTop top2)
 {
     return top1.Date.CompareTo(top2.Date);
 }
 /// <summary>
 /// Adds the specified <see cref="CalendarDayTop"/> as a passing one
 /// </summary>
 /// <param name="top"></param>
 internal void AddTopPassing(CalendarDayTop top)
 {
     if (!TopsPassing.Contains(top))
     {
         TopsPassing.Add(top);
     }
 }