I have a program that controls a relay board via RS232, the program allows multiple schedules to be setup so that these relays are turned on/off as the user needs.
I am trying to use the monthCalendar control to display a monthly view of what relays are on/off by date.
When the monthCalendar control month is scrolled forwards or back, I would like to iterate all of the dates shown on the control but I am not finding an enumerable member of the control to do this. Perhaps I am going about this in the wrong way, and am open to suggestions as to how to accomplish this.
While iterating the dates, each date is passed into a class member which returns true of false, based on this result I will add an entry to a grid or listbox.
Here is a rough example of what I would like to do:
foreach (DateTime date in monthCalendar1.*"Dates"*)
{
if (Scheduler.TurnOn(date))
{
Console.WriteLine("Would turn on: " + date.ToString());
}
}