public static void PrintEvent(Event eventToPrint) { if (eventToPrint != null) { Output.Append(eventToPrint + "\n"); } }
public void AddEvent(DateTime date, string title, string location) { Event newEvent = new Event(date, title, location); this.eventsByTitle.Add(title.ToLower(), newEvent); this.eventsByDate.Add(newEvent); Messages.EventAdded(); }
/// <summary> /// Adds an event. /// </summary> /// <param name="date">The date.</param> /// <param name="title">The title.</param> /// <param name="location">The location.</param> public void AddEvent(DateTime date, string title, string location) { Event newEvent = new Event(date, title, location); string eventTitleLowerCase = newEvent.Title.ToLowerInvariant(); this.eventsByTitle.Add(eventTitleLowerCase, newEvent); this.eventsByDate.Add(newEvent.Date, newEvent); Messages.EventAdded(); }