|
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 |
{ |
|
|
24 |
List<VideoBook> SelectedVideoBooks = new List<VideoBook>(); |
|
|
25 |
/*************** Content Demo ***************/ |
|
|
26 |
/* Pour pouvoir tester avec des vidéos : |
|
|
27 |
* - Placer les video dans le dossier Bin |
|
|
28 |
* - Rajouter Application.Current.Host.Source.Host devant le nom du fichier |
|
|
29 |
*/ |
|
|
30 |
LDTFile file = new LDTFile(); |
|
|
31 |
// file.Load(new Uri("Modernisation.FileConvertor;component/ENMI08-I-bernard_stiegler-jauffret.ldt", UriKind.Relative).ToString()); |
|
|
32 |
file.Load("Content/ENMI08-I-bernard_stiegler-jauffret.ldt"); |
|
|
33 |
|
|
|
34 |
LDTFileReader _LDTFR = new LDTFileReader("Content/ENMI08-I-bernard_stiegler-jauffret.ldt"); |
|
|
35 |
VideoBook temp = _LDTFR.VideoBook; |
|
|
36 |
temp.Chapters[0].VideoSequences = new List<VideoSequence>(); |
|
|
37 |
temp.Chapters[0].VideoSequences.Add(new VideoSequence()); |
|
|
38 |
temp.MediaPath = Application.Current.Host.Source.Host+@"/test.wmv"; |
|
|
39 |
SelectedVideoBooks.Add(temp); |
|
|
40 |
temp = new LDTFileReader("Content/ENMI08-II-antoine_masson-jauffret.ldt").VideoBook; |
|
|
41 |
|
|
|
42 |
temp.MediaPath = Application.Current.Host.Source.Host+@"/video.mp4"; |
|
|
43 |
SelectedVideoBooks.Add(temp); |
|
|
44 |
SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-III_elizabethrosse-psychologie_et_reseaux_sociaux-jauffret.ldt").VideoBook); |
|
|
45 |
SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook); |
|
|
46 |
/********************************************/ |
|
|
47 |
|
|
|
48 |
/*************** Initialisation des commandes ***************/ |
|
|
49 |
Commands.Initialize(); |
|
|
50 |
Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed); |
|
|
51 |
/********************************************/ |
|
|
52 |
|
|
|
53 |
/*************** Initialisation des Component ***************/ |
|
|
54 |
InitializeComponent(); |
|
|
55 |
ConsultationViewElement.DataContext = new ConsultationViewVM(); |
|
|
56 |
NavigationBarVM navvm = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) }; |
|
|
57 |
NavigationBarElement.DataContext = navvm; |
|
|
58 |
HeaderControlElement.DataContext = new HeaderControlVM("L'utilisateur"); |
|
|
59 |
ProductionViewElement.DataContext = new HeaderProductionVM(); |
|
|
60 |
/********************************************/ |
|
|
61 |
} |
|
|
62 |
|
|
|
63 |
void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
|
64 |
{ |
|
|
65 |
Commands.VideoViewer.Pause.Execute(); |
|
|
66 |
FlipTest.ExecuteFlip(); |
|
|
67 |
} |
|
|
68 |
} |
|
|
69 |
|
|
|
70 |
} |