예제 #1
0
        private void SetItemProperties(int addedDays, CalendarItem item)
        {
            if (SelectedDate == DateTime.MinValue && item.ItemDate == DateTime.Today)
            {
                SelectedDate = item.ItemDate;
                if (ShowSelectedDate)
                    item.IsSelected = true;
                _lastItem = item;
            }
            else
            {
                if (item.ItemDate == SelectedDate)
                {
                    if (ShowSelectedDate)
                        item.IsSelected = true;
                }
                else

                    item.IsSelected = false;
            }

            item.DayNumber = addedDays;
            item.SetDayType(this.EventsCalendar);

            item.SetBackcolor();
            item.SetForecolor();
        }