Esempio n. 1
0
        private void MonthCalendar_DateSelected(object sender, DateRangeEventArgs e)
        {
            IEnumerable <string> friendsBornInThatDate;
            EventCollection      eventsThatDate;

            birthDayFriendsListBox.Items.Clear();
            EventsOnDateListBox.Items.Clear();
            friendsBornInThatDate = m_AppLogicFacade.GetFriendsWhoBornThatDate(e.Start);
            foreach (string friendName in friendsBornInThatDate)
            {
                birthDayFriendsListBox.Items.Add(friendName);
            }
            EventsOnDateListBox.DisplayMember = "Name";

            eventsThatDate = new EventCollection(m_AppLogicFacade.GetEventsOnThatDate(e.Start));

            IEnumerator <IEvent> eventsThatDateEnumerator = eventsThatDate.GetEnumerator();

            while (eventsThatDateEnumerator.MoveNext())
            {
                EventsOnDateListBox.Items.Add(eventsThatDateEnumerator.Current);
            }
        }