client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs
changeset 27 f292db96b050
parent 18 66911d0f0eb6
child 30 644e3cd48034
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs	Tue Dec 22 16:22:22 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs	Mon Jan 04 10:29:39 2010 +0100
@@ -20,35 +20,36 @@
     public partial class MainPage : UserControl
     {
         public MainPage()
-        {
-            Commands.Initialize();
-            InitializeComponent();
-           List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
+        {    Commands.Initialize();
+            FactoryVideoLivre.Initialize();
+            //FactoryVideoLivre.xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+            FactoryVideoLivre.Load("ProjectConfig.xml");
+            List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
             /*************** Content Demo ***************/
-           /* Pour pouvoir tester avec des vidéos :     
-            * - Placer les video dans le dossier Bin
-            * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier
-            */
-           LDTFile file = new LDTFile();
+            /* Pour pouvoir tester avec des vidéos :     
+             * - Placer les video dans le dossier Bin
+             * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier
+             */
+            LDTFile file = new LDTFile();
             // file.Load(new Uri("Modernisation.FileConvertor;component/ENMI08-I-bernard_stiegler-jauffret.ldt", UriKind.Relative).ToString());
             file.Load("Content/ENMI08-I-bernard_stiegler-jauffret.ldt");
-            
+
             LDTFileReader _LDTFR = new LDTFileReader("Content/ENMI08-I-bernard_stiegler-jauffret.ldt");
             VideoBook temp = _LDTFR.VideoBook;
             temp.Chapters[0].VideoSequences = new List<VideoSequence>();
             temp.Chapters[0].VideoSequences.Add(new VideoSequence());
-            temp.MediaPath = Application.Current.Host.Source.Host+@"/test.wmv";
+            temp.MediaPath = Application.Current.Host.Source.Host + @"/test.wmv";
             SelectedVideoBooks.Add(temp);
             temp = new LDTFileReader("Content/ENMI08-II-antoine_masson-jauffret.ldt").VideoBook;
-           
-            temp.MediaPath = Application.Current.Host.Source.Host+@"/video.mp4";
+
+            temp.MediaPath = Application.Current.Host.Source.Host + @"/video.mp4";
             SelectedVideoBooks.Add(temp);
             SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-III_elizabethrosse-psychologie_et_reseaux_sociaux-jauffret.ldt").VideoBook);
-           // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook);
+            // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook);
             /********************************************/
 
             /*************** Initialisation des commandes ***************/
-            
+            InitializeComponent();
             // Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed);
             /********************************************/
             MainElement.DataContext = new MainVM(SelectedVideoBooks);
@@ -61,8 +62,27 @@
             ProductionViewElement.DataContext = new HeaderProductionVM();
             /********************************************/
            
+
+            //èMainElement.DataContext = new MainVM(new List<VideoBook>());
+
         }
 
+        void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+        {
+            if (e.Error == null)
+            {
+                
+              
+            }
+            else
+            {
+                MessageBox.Show(e.Error.InnerException.Message);
+            }
+        }
+           
+           
+        
+
        
     }