public FCalendar() { calendar = myCI.Calendar; LoadDays(); _CurrentMonth = DateTime.Now.Month; _SelectedFDay = getFDay(DateTime.Now.Date); }
private List <FDay> LoadFDays(int year) { List <FDay> fDays = new List <FDay>(); int week = 0; for (int month = 1; month <= calendar.GetMonthsInYear(year); month++) { for (int day = 1; day <= calendar.GetDaysInMonth(year, month); day++) { FDay fDay = new FDay(year, month, day, week); if (fDay.DayOfWeek == 6) { week++; } fDays.Add(fDay); } } return(fDays); }