Beispiel #1
0
        private void LoadMonths()
        {
            if (BlackoutDays == null)
            {
                return;
            }

            for (DateTime i = Min; i <= Max;)
            {
                var dateTime = new DateTime(i.Year, i.Month, 1);

                var dateTimeModel = new RTDCalendarViewToggleButton()
                {
                    DateTime             = dateTime,
                    IsBlackout           = true,
                    IsSelected           = false,
                    IsBlackSelectionMode = false,
                    IsDisabled           = false,
                    IsToday = false
                };

                Months.Add(new CalendarDays <RTDCalendarViewToggleButton>(dateTimeModel, BlackoutDays.ToArray()));
                i = i.AddMonths(1);
            }
        }
Beispiel #2
0
        private void LoadYears()
        {
            for (DateTime i = Min; i <= Max;)
            {
                for (int j = 1; j <= 12; j++)
                {
                    var dateTime = new DateTime(i.Year, j, 1);

                    var dateTimeModel = new RTDCalendarViewToggleButton()
                    {
                        DateTime             = dateTime,
                        IsBlackout           = false,
                        IsSelected           = false,
                        IsBlackSelectionMode = false,
                        IsDisabled           = false,
                        IsToday = false
                    };

                    Months.Add(new CalendarDays <RTDCalendarViewToggleButton>(dateTimeModel));
                }
                i = i.AddYears(1);
            }
        }