Example #1
0
        private void AddNewSong(object parameter)
        {
            var svm = new SongViewModel();

            svm.Artist = SelectedSong.Artist;
            svm.Id     = SelectedSong.Id;
            svm.Title  = SelectedSong.Title;

            Songs.Add(svm);
        }
Example #2
0
        private void AddNewSong(object parameter)
        {
            var svm = new SongViewModel();

            svm.Artist = SongViewModel.Artist;
            svm.Id = SongViewModel.Id;
            svm.Title = SongViewModel.Title;

            Songs.Add(svm);
        }
Example #3
0
        public SongListviewModel()
        {
            songRepository = new DummySongRepository();
            var songList = songRepository.ToList().Select(s => new SongViewModel(s));

            SongViewModel = new SongViewModel();
            Songs = new ObservableCollection<SongViewModel>(songList);

            AddSong = new RelayCommand(AddNewSong);
        }
Example #4
0
        public SongListviewModel()
        {
            songRepository = new DummySongRepository();
            var songList = songRepository.ToList().Select(s => new SongViewModel(s));

            SelectedSong = new SongViewModel();
            Songs        = new ObservableCollection <SongViewModel>(songList);


            AddSong = new RelayCommand(AddNewSong);
        }
Example #5
0
        public SongListviewModel()
        {
            songRepository = new DummySongRepository();
            var songList = songRepository.ToList().Select(s => new SongViewModel(s));

            SelectedSong = new SongViewModel();
            Songs = new ObservableCollection<SongViewModel>(songList);

            ClearSong = new RelayCommand(ClearThesong, CanClearSong);
            DeleteSongCommand = new RelayCommand(DeleteSong, CanDeleteSong);
            AddSong = new RelayCommand(AddNewSong, CanAddSong);
        }
Example #6
0
 private void DeleteSong()
 {
     Songs.Remove(SelectedSong);
     SelectedSong = new SongViewModel();
 }
Example #7
0
 private void ClearThesong()
 {
     SelectedSong = new SongViewModel();
 }
Example #8
0
        private void AddNewSong()
        {
            var svm = new SongViewModel();

            svm.Artist = SelectedSong.Artist;
            svm.Id = SelectedSong.Id;
            svm.Title = SelectedSong.Title;

            Songs.Add(svm);
        }
Example #9
0
 private void DeleteSong()
 {
     Songs.Remove(SelectedSong);
     SelectedSong = new SongViewModel();
 }
Example #10
0
 private void ClearThesong()
 {
     SelectedSong = new SongViewModel();
 }