19 { |
19 { |
20 public partial class MainPage : UserControl |
20 public partial class MainPage : UserControl |
21 { |
21 { |
22 public MainPage() |
22 public MainPage() |
23 { |
23 { |
24 |
24 InitializeComponent(); |
25 List<VideoBook> SelectedVideoBooks = new List<VideoBook>(); |
25 List<VideoBook> SelectedVideoBooks = new List<VideoBook>(); |
26 /*************** Content Demo ***************/ |
26 /*************** Content Demo ***************/ |
27 /* Pour pouvoir tester avec des vidéos : |
27 /* Pour pouvoir tester avec des vidéos : |
28 * - Placer les video dans le dossier Bin |
28 * - Placer les video dans le dossier Bin |
29 * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier |
29 * - Rajouter Application.Current.Host.Source.Host devant le nom du fichier |
46 // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook); |
46 // SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook); |
47 /********************************************/ |
47 /********************************************/ |
48 |
48 |
49 /*************** Initialisation des commandes ***************/ |
49 /*************** Initialisation des commandes ***************/ |
50 Commands.Initialize(); |
50 Commands.Initialize(); |
51 Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed); |
51 // Commands.FlipView.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(FlipView_Executed); |
52 /********************************************/ |
52 /********************************************/ |
53 |
53 MainElement.DataContext = new MainVM(SelectedVideoBooks); |
54 /*************** Initialisation des Component ***************/ |
54 /*************** Initialisation des Component ************** |
55 InitializeComponent(); |
55 InitializeComponent(); |
56 ConsultationViewElement.DataContext = new ConsultationViewVM(); |
56 ConsultationViewElement.DataContext = new ConsultationViewVM(); |
57 NavigationBarVM navvm = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) }; |
57 NavigationBarVM navvm = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) }; |
58 NavigationBarElement.DataContext = navvm; |
58 NavigationBarElement.DataContext = navvm; |
59 HeaderControlElement.DataContext = new HeaderControlVM("L'utilisateur"); |
59 HeaderControlElement.DataContext = new HeaderControlVM("L'utilisateur"); |
60 ProductionViewElement.DataContext = new HeaderProductionVM(); |
60 ProductionViewElement.DataContext = new HeaderProductionVM(); |
61 /********************************************/ |
61 /********************************************/ |
62 |
62 |
63 } |
63 } |
64 |
64 |
65 void FlipView_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
65 |
66 { |
|
67 Commands.VideoViewer.Pause.Execute(); |
|
68 FlipTest.ExecuteFlip(); |
|
69 } |
|
70 } |
66 } |
71 |
67 |
72 } |
68 } |