client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs
changeset 28 2d4ec5ab2a40
parent 27 f292db96b050
child 30 644e3cd48034
--- a/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs	Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs	Tue Jan 05 15:53:48 2010 +0100
@@ -17,6 +17,8 @@
          public static WebClient xmlClient = new WebClient();
         private static XDocument _configDoc; 
          public static VideoChapterDescription[] VideoChapterDescriptions {get;private set;}
+         public static PolemicTypeDescription[] AnnotationDescriptions { get; private set; }
+
          public static int NumberOfChapters
          {
              get
@@ -70,14 +72,21 @@
        static public void Load(string path)
        {
            _configDoc = XDocument.Load(path);
-           List<VideoChapterDescription> temp = new List<VideoChapterDescription>();
+           List<VideoChapterDescription> temp_vl = new List<VideoChapterDescription>();
+
+           List<PolemicTypeDescription> temp_an = new List<PolemicTypeDescription>();
            int nb = 0;
            foreach (XElement XChapter in _configDoc.Root.Element("VideoBook").Elements())
            {
-               temp.Add(new VideoChapterDescription(nb,XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
+               temp_vl .Add(new VideoChapterDescription(nb,XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
                nb++;
            }
-           VideoChapterDescriptions = temp.ToArray();
+           foreach (XElement XAnnotation in _configDoc.Root.Element("PolemicTypes").Elements())
+           {
+               temp_an.Add(new PolemicTypeDescription(XAnnotation.Attribute("name").Value, XAnnotation.Attribute("color").Value));
+           }
+           VideoChapterDescriptions = temp_vl .ToArray();
+           AnnotationDescriptions = temp_an.ToArray();
        }