public HomePageViewModel()
        {
            facade        = Façade.Instance();
            Movies        = facade.AllMovie();
            GenreMovie    = facade.AllGenre();
            Comment       = new Commentaire_Note();
            MovieSelected = null;
            Search        = "";
            Genre         = "";

            NameCollection = new List <string>
            {
                "Action",
                "Comédie",
                "Horreur"
            };

            MyButtonAddMovieCommand     = new RelayCommand(MyButtonAddMovieCommandExecute, MyButtonAddMovieCanExecute);
            MyAddMovieCommand           = new RelayCommand(MyAddMovieCommandExecute, MyAddMovieCanExecute);
            MyDeleteMovieCommand        = new RelayCommand(MyDeleteMovieCommandExecute, MyDeleteMovieCanExecute);
            MySearchCommand             = new RelayCommand(MySearchCommandExecute, MySearchCanExecute);
            MyButtonCommentMovieCommand = new RelayCommand(MyButtonCommentMovieCommandExecute, MyButtonCommentMovieCanExecute);
            MyCommentMovieCommand       = new RelayCommand(MyCommentMovieCommandExecute, MyCommentMovieCanExecute);
            MyButtonAllCommentCommand   = new RelayCommand(MyButtonAllCommentMovieCommandExecute, MyButtonAllCommentMovieCanExecute);
        }
Esempio n. 2
0
 public MainViewModel()
 {
     facade    = Façade.Instance();
     Login     = "";
     Password  = "";
     User      = null;
     MyCommand = new RelayCommand(MyCommandExecute, MyCommandCanExecute);
     MyButtonAddUserCommand = new RelayCommand(MyButtonAddUserCommandExecute, MyButtonAddUserCommandCanExecute);
     MyAddUserCommand       = new RelayCommand(MyAddUserCommandExecute, MyAddUserCommandCanExecute);
     MyDeleteUserCommand    = new RelayCommand(MyDeleteUserCommandExecute, MyDeleteUserCommandCanExecute);
     civiliteList           = new List <string>
     {
         "Mr.",
         "Mme."
     };
 }