Exemple #1
0
 partial void EnsureHomeEventVisible(Event eventToShow);
Exemple #2
0
 private bool isVisibleEvent(Event e, int dayIndex)
 {
     return e.Day.Index == dayIndex &&
         (e.IsSelected || IsOnlyGoingVisible == false);
 }
Exemple #3
0
        private void LoadConferenceEventData(IXmlNode nodeEvent, Day day, Room room)
        {
            Event conferenceEvent = new Event();
            conferenceEvent.Id = nodeEvent.Attributes.GetNamedItem("id").InnerText;
            conferenceEvent.Start = day.Date.Add(DateTime.Parse(nodeEvent.SelectSingleNode("start").InnerText).TimeOfDay);
            conferenceEvent.Duration = TimeSpan.Parse(nodeEvent.SelectSingleNode("duration").InnerText);
            conferenceEvent.Room = room;
            conferenceEvent.Day = day;
            conferenceEvent.Slug = nodeEvent.SelectSingleNode("slug").InnerText;
            conferenceEvent.Title = nodeEvent.SelectSingleNode("title").InnerText;
            conferenceEvent.Subtitle = nodeEvent.SelectSingleNode("subtitle").InnerText;
            string trackName = nodeEvent.SelectSingleNode("track").InnerText;
            conferenceEvent.Track = Conference.Tracks.FirstOrDefault(item => item.Name == trackName);
            if (conferenceEvent.Track == null)
            {
                conferenceEvent.Track = new Track() { Name = trackName };
                Conference.Tracks.Add(conferenceEvent.Track);
            }
            string typeName = nodeEvent.SelectSingleNode("type").InnerText;
            conferenceEvent.Type = Conference.EventTypes.FirstOrDefault(item => item.Name == typeName);
            if (conferenceEvent.Type == null)
            {
                conferenceEvent.Type = new EventType() { Name = typeName };
                Conference.EventTypes.Add(conferenceEvent.Type);
            }
            conferenceEvent.Language = nodeEvent.SelectSingleNode("language").InnerText;
            conferenceEvent.Abstract = nodeEvent.SelectSingleNode("abstract").InnerText;
            conferenceEvent.Description = nodeEvent.SelectSingleNode("description").InnerText;

            conferenceEvent.Persons = new List<Person>();
            IXmlNode nodesPersons = nodeEvent.SelectSingleNode("persons");
            XmlNodeList nodesPersonList = nodesPersons.SelectNodes("person");
            foreach (IXmlNode item in nodesPersonList)
            {
                Person person = LoadConferencePersonData(item);
                conferenceEvent.Persons.Add(person);
            }

            conferenceEvent.Links = new List<Link>();
            IXmlNode nodesLinks = nodeEvent.SelectSingleNode("links");
            XmlNodeList nodesLinkList = nodesLinks.SelectNodes("link");
            foreach (IXmlNode item in nodesLinkList)
            {
                Link link = new Link();
                link.Name = item.InnerText;
                link.Url = item.Attributes.GetNamedItem("href").InnerText;
                conferenceEvent.Links.Add(link);
            }

            Conference.Events.Add(conferenceEvent);
        }