client/src/Iri.Modernisation.Data/Ldt/Readers.cs
changeset 30 644e3cd48034
parent 28 2d4ec5ab2a40
child 34 4d9ebc6fbbe8
--- a/client/src/Iri.Modernisation.Data/Ldt/Readers.cs	Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/Readers.cs	Thu Jan 14 16:39:50 2010 +0100
@@ -9,33 +9,16 @@
 using System.Windows.Media.Animation;
 using System.Windows.Shapes;
 using Iri.Modernisation.Data.Models;
-
+using System.Xml.Linq;
 namespace Iri.Modernisation.Data.LDTClass
 {
     public class LDTFileReader
     {
-        private LDTFile _ldtFile;
-        private VideoBook _videoBook;
-        public VideoBook VideoBook
-        {
-            get
-            {
-                return _videoBook;
-            }
-        }
-        public LDTFileReader(String LDTPath)
+        public static VideoBook ConvertToVideoBook(XDocument Path)
         {
-            _ldtFile = new LDTFile();
-            _ldtFile.Load(LDTPath);
-            ConvertLdtToVideoBook();
-        }
-        public LDTFileReader(LDTFile ldtFile)
-        {
-            _ldtFile = ldtFile;
-            ConvertLdtToVideoBook();
-        }
-        private void ConvertLdtToVideoBook()
-        {
+            LDTFile _ldtFile = new LDTFile();
+            _ldtFile.Load(Path);
+            VideoBook _videoBook = new VideoBook();
             if (_ldtFile != null)
             {
                 // Initialisation du VideoBook
@@ -111,6 +94,7 @@
                       }
 
                 }
+                return _videoBook;
                 // Initialisation des Annotations
                 //Initialisation des Liens
             }