|
12
|
1 |
using System; |
|
|
2 |
using System.Net; |
|
|
3 |
using System.Windows; |
|
|
4 |
using System.Windows.Controls; |
|
|
5 |
using System.Windows.Documents; |
|
|
6 |
using System.Windows.Ink; |
|
|
7 |
using System.Windows.Input; |
|
|
8 |
using System.Windows.Media; |
|
|
9 |
using System.Windows.Media.Animation; |
|
|
10 |
using System.Windows.Shapes; |
|
|
11 |
using System.Collections.Generic; |
|
|
12 |
using Iri.Modernisation.Data.Models; |
|
|
13 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
|
14 |
using Iri.Modernisation.BaseMVVM.ViewModel; |
|
36
|
15 |
using System.Collections.ObjectModel; |
|
12
|
16 |
namespace Iri.Modernisation.Controls.ViewModel |
|
|
17 |
{ |
|
25
|
18 |
/// <summary> |
|
|
19 |
/// ViewModel de Main |
|
|
20 |
/// </summary> |
|
12
|
21 |
public class MainVM : BaseMVVM.ViewModel.ViewModel |
|
|
22 |
{ |
|
|
23 |
private ConsultationViewVM _consultationViewVM; |
|
25
|
24 |
/// <summary> |
|
|
25 |
/// ViewModel de ConsultationView |
|
|
26 |
/// </summary> |
|
12
|
27 |
public ConsultationViewVM ViewModelConsultationView |
|
|
28 |
{ |
|
|
29 |
get |
|
|
30 |
{ |
|
|
31 |
return _consultationViewVM; |
|
|
32 |
} |
|
|
33 |
set |
|
|
34 |
{ |
|
|
35 |
_consultationViewVM = value; |
|
|
36 |
OnPropertyChanged("ViewModelConsultationView"); |
|
|
37 |
} |
|
|
38 |
} |
|
|
39 |
|
|
|
40 |
private NavigationBarVM _navigationBarVM; |
|
25
|
41 |
/// <summary> |
|
|
42 |
/// ViewModel de NavigationBar |
|
|
43 |
/// </summary> |
|
12
|
44 |
public NavigationBarVM ViewModelNavigationBar |
|
|
45 |
{ |
|
|
46 |
get |
|
|
47 |
{ |
|
|
48 |
return _navigationBarVM; |
|
|
49 |
} |
|
|
50 |
set |
|
|
51 |
{ |
|
|
52 |
_navigationBarVM = value; |
|
|
53 |
OnPropertyChanged("ViewModelNavigationBar"); |
|
|
54 |
} |
|
|
55 |
} |
|
|
56 |
|
|
|
57 |
private HeaderControlVM _headerControlVM; |
|
25
|
58 |
/// <summary> |
|
|
59 |
/// ViewsModel de HeaderControl |
|
|
60 |
/// </summary> |
|
12
|
61 |
public HeaderControlVM ViewModelHeaderControl |
|
|
62 |
{ |
|
|
63 |
get |
|
|
64 |
{ |
|
|
65 |
return _headerControlVM; |
|
|
66 |
} |
|
|
67 |
set |
|
|
68 |
{ |
|
|
69 |
_headerControlVM = value; |
|
|
70 |
OnPropertyChanged("ViewModelHeaderControl"); |
|
|
71 |
} |
|
|
72 |
} |
|
|
73 |
|
|
17
|
74 |
private ProductionViewVM _productionViewVM; |
|
25
|
75 |
/// <summary> |
|
|
76 |
/// ViewModel de ProductionView |
|
|
77 |
/// </summary> |
|
17
|
78 |
public ProductionViewVM ViewModelProductionView |
|
|
79 |
{ |
|
|
80 |
get |
|
|
81 |
{ |
|
|
82 |
return _productionViewVM; |
|
|
83 |
} |
|
|
84 |
set |
|
|
85 |
{ |
|
|
86 |
_productionViewVM = value; |
|
|
87 |
OnPropertyChanged("ViewModelProductionView"); |
|
|
88 |
} |
|
|
89 |
} |
|
|
90 |
|
|
36
|
91 |
public MainVM() |
|
12
|
92 |
{ |
|
13
|
93 |
|
|
12
|
94 |
InitializeCommands(); |
|
36
|
95 |
List<VideoBook> SelectedVideoBooks = new List<VideoBook>(); |
|
|
96 |
SelectedVideoBooks = SettingsProject.ListVideoBook; |
|
12
|
97 |
|
|
|
98 |
|
|
|
99 |
// Initialisation des Components // |
|
36
|
100 |
ViewModelProductionView = new ProductionViewVM() { RecordedVideoSequences = new ObservableCollection<VideoSequence>(SettingsProject.ProductionVideo) }; |
|
12
|
101 |
ViewModelConsultationView = new ConsultationViewVM(); |
|
|
102 |
ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) }; |
|
|
103 |
ViewModelHeaderControl = new HeaderControlVM(); |
|
25
|
104 |
|
|
12
|
105 |
} |
|
|
106 |
|
|
|
107 |
private void InitializeCommands() |
|
|
108 |
{ |
|
|
109 |
Commands.Initialize(); |
|
|
110 |
} |
|
|
111 |
|
|
|
112 |
} |
|
|
113 |
} |