Ejemplo n.º 1
0
        public void Load(string file)
        {
            if (File.Exists(file))
            {
                XDocument doc = XDocument.Load(file);

                XElement elemPresentation = doc.Element("Presentation");

                Plays.Clear();

                if (elemPresentation != null)
                {
                    Name = elemPresentation.Attribute("Name").Value;

                    XElement elemFiles = elemPresentation.Element("Files");
                    if (elemFiles != null)
                    {
                        foreach (XElement elem in elemFiles.Elements("File"))
                        {
                            PresentationPlay play = new PresentationPlay();

                            play.ReadXML(elem);

                            Plays.Add(play);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public Presentation(string name, List <PresentationPlay> pPlays)
        {
            Name = name;

            Plays.Clear();

            foreach (PresentationPlay pPlay in pPlays)
            {
                Plays.Add(pPlay);
            }
        }
Ejemplo n.º 3
0
        public Presentation()
        {
            Name = string.Empty;

            Plays.Clear();
        }