Exemplo n.º 1
0
        public FilmViewModel()
        {
            Filmliste              = new Model.FilmList();
            selectedFilm           = new Model.FilmNavn();
            AddFilmRelayCommand    = new RelayCommand(AddNewFilm);
            RemoveFilmRelayCommand = new RelayCommand(RemoveNewFilm);

            SaveFilmCommand = new RelayCommand(GemDataTilDiskAsync);
            HentDataCommand = new RelayCommand(HentdataFraDiskAsync);

            DeleteAllFilmCommand = new RelayCommand(() => this.Filmliste.Clear());

            NewFilm = new Model.FilmNavn();

            // Eksempel til brug af klasser til commands
            // AddFilmCommand = new AddFilmCommand(AddNewFilm);
            // RemoveFilmCommand = new RemoveFilmCommand(RemoveNewFilm);

            localfolder = ApplicationData.Current.LocalFolder;
        }
Exemplo n.º 2
0
 public FilmViewModel()
 {
     Filmliste      = new Model.FilmList();
     selectedFilm   = new Model.FilmNavn();
     AddFilmCommand = new RelayCommand(AddNewFilm, null);
 }