| author | Matthieu Totet |
| Tue, 24 Nov 2009 10:42:26 +0100 | |
| changeset 12 | 513caf1637bf |
| parent 10 | 12515e11b357 |
| child 14 | a48c44bc825b |
| permissions | -rw-r--r-- |
| 0 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Net; |
|
5 |
using System.Windows; |
|
6 |
using System.Windows.Controls; |
|
7 |
using System.Windows.Documents; |
|
8 |
using System.Windows.Input; |
|
9 |
using System.Windows.Media; |
|
10 |
using System.Windows.Media.Animation; |
|
11 |
using System.Windows.Shapes; |
|
12 |
using System.Windows.Browser; |
|
13 |
using Iri.Modernisation.Controls.ViewModel; |
|
14 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
15 |
using Iri.Modernisation.Data.LDTClass; |
|
16 |
using Iri.Modernisation.Data.Models; |
|
17 |
||
18 |
namespace Iri.Modernisation.Test.MainInterface |
|
19 |
{ |
|
20 |
public partial class MainPage : UserControl |
|
21 |
{ |
|
22 |
public MainPage() |
|
23 |
{ |
|
| 12 | 24 |
InitializeComponent(); |
| 0 | 25 |
List<VideoBook> SelectedVideoBooks = new List<VideoBook>(); |
26 |
/*************** Content Demo ***************/ |
|
27 |
/* Pour pouvoir tester avec des vidéos : |
|
28 |
* - Placer les video dans le dossier Bin |
|
29 |
* - Rajouter Application.Current.Host.Source.Host devant le nom du fichier |
|
30 |
*/ |
|
31 |
LDTFile file = new LDTFile(); |
|
32 |
// file.Load(new Uri("Modernisation.FileConvertor;component/ENMI08-I-bernard_stiegler-jauffret.ldt", UriKind.Relative).ToString()); |
|
33 |
file.Load("Content/ENMI08-I-bernard_stiegler-jauffret.ldt"); |
|
34 |
|
|
35 |
LDTFileReader _LDTFR = new LDTFileReader("Content/ENMI08-I-bernard_stiegler-jauffret.ldt"); |
|
36 |
VideoBook temp = _LDTFR.VideoBook; |
|
37 |
temp.Chapters[0].VideoSequences = new List<VideoSequence>(); |
|
38 |
temp.Chapters[0].VideoSequences.Add(new VideoSequence()); |
|
39 |
temp.MediaPath = Application.Current.Host.Source.Host+@"/test.wmv"; |
|
40 |
SelectedVideoBooks.Add(temp); |
|
41 |
temp = new LDTFileReader("Content/ENMI08-II-antoine_masson-jauffret.ldt").VideoBook; |
|
42 |
|
|
43 |
temp.MediaPath = Application.Current.Host.Source.Host+@"/video.mp4"; |
|
44 |
SelectedVideoBooks.Add(temp); |
|
45 |
SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-III_elizabethrosse-psychologie_et_reseaux_sociaux-jauffret.ldt").VideoBook); |
|
|
10
12515e11b357
Update PolemicElement View : Can Display Correct Color of VideoChapter
Matthieu Totet
parents:
7
diff
changeset
|
46 |
// SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook); |
| 0 | 47 |
/********************************************/ |
48 |
||
49 |
/*************** Initialisation des commandes ***************/ |
|
50 |
Commands.Initialize(); |
|
| 12 | 51 |
// Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed); |
| 0 | 52 |
/********************************************/ |
| 12 | 53 |
MainElement.DataContext = new MainVM(SelectedVideoBooks); |
54 |
/*************** Initialisation des Component ************** |
|
| 0 | 55 |
InitializeComponent(); |
56 |
ConsultationViewElement.DataContext = new ConsultationViewVM(); |
|
57 |
NavigationBarVM navvm = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) }; |
|
58 |
NavigationBarElement.DataContext = navvm; |
|
59 |
HeaderControlElement.DataContext = new HeaderControlVM("L'utilisateur"); |
|
60 |
ProductionViewElement.DataContext = new HeaderProductionVM(); |
|
61 |
/********************************************/ |
|
| 3 | 62 |
|
| 0 | 63 |
} |
64 |
||
| 12 | 65 |
|
| 0 | 66 |
} |
67 |
|
|
68 |
} |