Exemple #1
0
 // create a single loooong list of expo booths
 void filterEventsToExpo()
 {
     var eventsVar =
        (from Event in events
     where Event.Kind.Equals("Expo")
     select Event).ToList<Event>();
     ScheduleSlice expoList = new ScheduleSlice("all exhibitors", eventsVar);
     EventSlices.Add(expoList);
 }
Exemple #2
0
 /// <summary>
 /// create the slices, selecting only starred events and dividing them based on the event day
 /// </summary>
 void filterEventsByStars()
 {
     List<string> eventDays = schedule.eventDays;
     ScheduleSlice starSlice;
     var eventsVar = (List<Event>)null;
     foreach (string dayName in eventDays)
     {
         eventsVar =
        (from Event in events
     where Event.day.Equals(dayName) && (Event.Star == true)
     select Event).ToList<Event>();
         starSlice = new ScheduleSlice(dayName, eventsVar);
         EventSlices.Add(starSlice);
     }
 }
Exemple #3
0
        /// <summary>
        /// create the slices, retrieving events that contain the given search term in either title or description,
        /// and dividing events based on which field it was found in
        /// </summary>
        void filterEventsBySearch()
        {
            var eventsVar =
             (from Event in events
              where isContainedIn(Event.Name, searchQuery)
              select Event).ToList<Event>();
             ScheduleSlice eventTitlesSlice = new ScheduleSlice("title", eventsVar);
             EventSlices.Add(eventTitlesSlice);

             eventsVar.Clear();
              eventsVar =
             (from Event in events
              where isContainedIn(Event.Details, searchQuery)
              select Event).ToList<Event>();
              ScheduleSlice eventDetailsSlice = new ScheduleSlice("description", eventsVar);
              EventSlices.Add(eventDetailsSlice);
        }
Exemple #4
0
        /// <summary>
        /// create the slices, dividing events based on the event location
        /// </summary>
        void filterEventsByLocation()
        {
            pivotTemplateName = "pivotListTemplate";

               List<String> eventLocations = schedule.eventLocations;
               var eventsVar = (List<Event>)null;
               ScheduleSlice eventLocationSlice;
               foreach (string location in eventLocations)
               {
               eventsVar =
            (from Event in events
             where Event.Location.Contains(location) && !Event.Kind.Equals("Expo")
             select Event).ToList<Event>();
               eventLocationSlice = new ScheduleSlice(location, eventsVar);
               if (eventsVar.Count != 0)
               {
                   EventSlices.Add(eventLocationSlice);
               }
               }
        }
Exemple #5
0
        /// <summary>
        /// create the slices, dividing events based on the event type (panel, show, etc)
        /// </summary>
        void filterEventsByEventType()
        {
            pivotTemplateName = "pivotListTemplate";

               List<String> eventTypes = schedule.eventTypes;
               var eventsVar = (List<Event>)null;
               ScheduleSlice eventTypeSlice;
               foreach (string typeName in eventTypes)
               {
               eventsVar =
            (from Event in events
             where Event.Kind == typeName && !Event.Kind.Equals("Expo")
             select Event).ToList<Event>();
               eventTypeSlice = new ScheduleSlice(typeName, eventsVar);
               if (eventsVar.Count != 0)
               {
                   EventSlices.Add(eventTypeSlice);
               }
               }
        }
Exemple #6
0
 /// <summary>
 /// create the slices, dividing events based on the event day
 /// </summary>
 void filterEventsByDay()
 {
     List<string> eventDays = schedule.eventDays;
     ScheduleSlice daySlice;
     var eventsVar = (List<Event>)null;
     foreach (string dayName in eventDays)
     {
         eventsVar =
         (from Event in events
          where Event.day.Equals(dayName) &&!Event.Kind.Equals("Expo")
          select Event).ToList<Event>();
         daySlice = new ScheduleSlice(dayName, eventsVar);
         EventSlices.Add(daySlice);
     }
 }