예제 #1
0
        private void Discography_Click(object sender, RoutedEventArgs e)
        {
            DiscographyView discographyView = new DiscographyView();

            discographyView.Show();
            this.Close();
        }
 public DiscographyViewModel(ObservableCollection <Albums> albums)
 {
     discographyView               = new  DiscographyView();
     Albums                        = albums;
     this.ButtonSearchCommand      = new RelayCommand(this.Search);
     this.RadioCommandSearchCrit   = new RelayCommand(this.SetSearchCriteria);
     this.RadioCommandSortSongID   = new RelayCommand(new Action <object>(SortID));
     this.RadioCommandSortSortName = new RelayCommand(new Action <object>(SortName));
     this.SelectedFilterCommand    = new RelayCommand(this.SetFilter);
 }
 private void Discography_Click(object sender, RoutedEventArgs e)
 {
     this.Close();
     _albums = GameSeedData.AlbumObjects();
     _discographyViewModel = new DiscographyViewModel(_albums);
     _discographyViewModel.SelectedAlbum = _albums.Where(x => x.AlbumName == "Schrei").FirstOrDefault();
     _discographyViewModel.SearchedSongs = GameSeedData.AllSongs();
     _discographyView             = new DiscographyView(_discographyViewModel);
     _discographyView.DataContext = _discographyViewModel;
     _discographyView.Show();
     _discographyViewModel.discographyView = _discographyView;
 }