Exemplo n.º 1
0
 private void ComboBoxArtist_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (ComboBoxArtist.SelectedItem != null)
     {
         if (ComboBoxArtist.SelectedItem.ToString() == "New Artist...")
         {
             var ad = new ArtistDialog();
             ad.Owner = this;
             ad.ShowDialog();
             Close();
         }
         else
         {
             AddArtist(ComboBoxArtist.SelectedItem.ToString());
             Close();
         }
     }
 }
Exemplo n.º 2
0
 private void ButtonEdit_Click(object sender, RoutedEventArgs e)
 {
     if (cm.SelectedTrack != "")
     {
         var track   = cm.SelectedTrack;
         var album   = cm.GetTrackAlbum(track);
         var artists = cm.ListToString(cm.RetrieveTrackArtistNames(track));
         var td      = new TrackDialog(track, album, artists, cm.GetDiscNumber(track), cm.GetTotalDiscs(album), cm.GetTrackNumber(track), cm.GetTotalTracks(album), cm.GetTrackGenre(track), cm.GetAlbumYear(album));
         td.Show();
     }
     else if (cm.SelectedAlbum != "")
     {
         var album = cm.SelectedAlbum;
         var ad    = new AlbumDialog(album, cm.GetAlbumYear(album), cm.GetTotalDiscs(album), cm.GetTotalTracks(album));
         ad.Show();
     }
     else if (cm.SelectedArtist != "")
     {
         var artist = cm.SelectedArtist;
         var ad     = new ArtistDialog(artist);
         ad.Show();
     }
 }