client/src/Iri.Modernisation.Controls/ViewModel/Main/MainVM.cs
changeset 25 a9c815025a1b
parent 17 0e4e63f6f567
child 36 b6df6fce6e5d
equal deleted inserted replaced
24:c031f1132dde 25:a9c815025a1b
    12 using Iri.Modernisation.Data.Models;
    12 using Iri.Modernisation.Data.Models;
    13 using Iri.Modernisation.BaseMVVM.Commands;
    13 using Iri.Modernisation.BaseMVVM.Commands;
    14 using Iri.Modernisation.BaseMVVM.ViewModel;
    14 using Iri.Modernisation.BaseMVVM.ViewModel;
    15 namespace Iri.Modernisation.Controls.ViewModel
    15 namespace Iri.Modernisation.Controls.ViewModel
    16 {
    16 {
       
    17     /// <summary>
       
    18     /// ViewModel de Main
       
    19     /// </summary>
    17     public class MainVM : BaseMVVM.ViewModel.ViewModel
    20     public class MainVM : BaseMVVM.ViewModel.ViewModel
    18     {
    21     {
    19         private ConsultationViewVM _consultationViewVM;
    22         private ConsultationViewVM _consultationViewVM;
       
    23         /// <summary>
       
    24         /// ViewModel de ConsultationView
       
    25         /// </summary>
    20         public ConsultationViewVM ViewModelConsultationView
    26         public ConsultationViewVM ViewModelConsultationView
    21         {
    27         {
    22             get
    28             get
    23             {
    29             {
    24                 return _consultationViewVM;
    30                 return _consultationViewVM;
    29                 OnPropertyChanged("ViewModelConsultationView");
    35                 OnPropertyChanged("ViewModelConsultationView");
    30             }
    36             }
    31         }
    37         }
    32 
    38 
    33         private NavigationBarVM _navigationBarVM;
    39         private NavigationBarVM _navigationBarVM;
       
    40         /// <summary>
       
    41         /// ViewModel de NavigationBar
       
    42         /// </summary>
    34         public NavigationBarVM ViewModelNavigationBar
    43         public NavigationBarVM ViewModelNavigationBar
    35         {
    44         {
    36             get
    45             get
    37             {
    46             {
    38                 return _navigationBarVM;
    47                 return _navigationBarVM;
    43                 OnPropertyChanged("ViewModelNavigationBar");
    52                 OnPropertyChanged("ViewModelNavigationBar");
    44             }
    53             }
    45         }
    54         }
    46 
    55 
    47         private HeaderControlVM _headerControlVM;
    56         private HeaderControlVM _headerControlVM;
       
    57         /// <summary>
       
    58         /// ViewsModel de HeaderControl
       
    59         /// </summary>
    48         public HeaderControlVM ViewModelHeaderControl
    60         public HeaderControlVM ViewModelHeaderControl
    49         {
    61         {
    50             get
    62             get
    51             {
    63             {
    52                 return _headerControlVM;
    64                 return _headerControlVM;
    57                 OnPropertyChanged("ViewModelHeaderControl");
    69                 OnPropertyChanged("ViewModelHeaderControl");
    58             }
    70             }
    59         }
    71         }
    60 
    72 
    61         private ProductionViewVM _productionViewVM;
    73         private ProductionViewVM _productionViewVM;
       
    74         /// <summary>
       
    75         /// ViewModel de ProductionView
       
    76         /// </summary>
    62         public ProductionViewVM ViewModelProductionView
    77         public ProductionViewVM ViewModelProductionView
    63         {
    78         {
    64             get
    79             get
    65             {
    80             {
    66                 return _productionViewVM;
    81                 return _productionViewVM;
    70                 _productionViewVM = value;
    85                 _productionViewVM = value;
    71                 OnPropertyChanged("ViewModelProductionView");
    86                 OnPropertyChanged("ViewModelProductionView");
    72             }
    87             }
    73         }
    88         }
    74 
    89 
    75         /*private HeaderProductionVM _headerProductionVM;
       
    76         public HeaderProductionVM ViewModelHeaderProduction
       
    77         {
       
    78             get
       
    79             {
       
    80                 return _headerProductionVM;
       
    81             }
       
    82             set
       
    83             {
       
    84                 _headerProductionVM = value;
       
    85                 OnPropertyChanged("ViewModelHeaderProduction");
       
    86             }
       
    87         }*/
       
    88 
       
    89         public MainVM(List<VideoBook> videoBooks)
    90         public MainVM(List<VideoBook> videoBooks)
    90         {
    91         {
    91 
    92 
    92             InitializeCommands();
    93             InitializeCommands();
    93             List<VideoBook> SelectedVideoBooks = videoBooks;
    94             List<VideoBook> SelectedVideoBooks = videoBooks;
    96             // Initialisation des Components //
    97             // Initialisation des Components //
    97             ViewModelProductionView = new ProductionViewVM();
    98             ViewModelProductionView = new ProductionViewVM();
    98             ViewModelConsultationView = new ConsultationViewVM();
    99             ViewModelConsultationView = new ConsultationViewVM();
    99             ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
   100             ViewModelNavigationBar = new NavigationBarVM() { ConsultMenuViewModel = new ConsultMenuVM(SelectedVideoBooks) };
   100             ViewModelHeaderControl = new HeaderControlVM();
   101             ViewModelHeaderControl = new HeaderControlVM();
   101            // ViewModelHeaderProduction = new HeaderProductionVM();
   102           
   102             //------------------------------------------------------//
       
   103         }
   103         }
   104 
   104 
   105         private void InitializeCommands()
   105         private void InitializeCommands()
   106         {
   106         {
   107             Commands.Initialize();
   107             Commands.Initialize();