Exemple #1
0
        private void btnRateAlbum_Click(object sender, RoutedEventArgs e)
        {
            //Open the Rate Album window.
            //(This is the Rate button for the Albums combobox.)
            RateAlbum rateAlbumWindow = new RateAlbum((Album)comboBoxAlbum.SelectedItem);

            rateAlbumWindow.ShowDialog();
            RefreshUIElements();
        }
Exemple #2
0
 private void btnRateSong_Click(object sender, RoutedEventArgs e)
 {
     //Open the appropriate Rate window, based on the type of the SelectedItem.
     //(This is the Rate button for the Songs and Albums list.)
     if (listBoxSongList.SelectedItem is Song)
     {
         RateSong rateSongWindow = new RateSong((Song)listBoxSongList.SelectedItem);
         rateSongWindow.ShowDialog();
         RefreshUIElements();
     }
     if (listBoxSongList.SelectedItem is Album)
     {
         RateAlbum rateAlbumWindow = new RateAlbum((Album)listBoxSongList.SelectedItem);
         rateAlbumWindow.ShowDialog();
         RefreshUIElements();
     }
 }