public void UpdateAgenda()
{
if(General.Power.IsSleepTime() || !this.Visible)
{
// We don't want to update the agenda when the computer is
// asleep, because it would spin up the harddisk
agendaupdateneeded = true;
}
else
{
DateTime today = DateTime.Today;
DateTime nextweek = today + new TimeSpan(5, 23, 59, 59);
agendadata = General.Agenda.GetItems(today, nextweek);
agendaupdateneeded = false;
}
}