示例#1
0
 internal void DeleteButtonClick()
 {
     foreach (SongInEntertainmentVM songInEntertainment in _songInEntertainmentCollection)
     {
         if (songInEntertainment.SongComparison(AddedSelectedSong))
         {
             _deletedSongCollection.Add(AddedSelectedSong);
             break;
         }
     }
     for (int i = 0; i < _addedSongCollection.Count; i++)
     {
         if (SongVM.Comparison(_addedSongCollection[i], AddedSelectedSong))
         {
             _addedSongCollection.Remove(_addedSongCollection[i]);
             break;
         }
     }
 }
示例#2
0
 internal void AddButtonClick()
 {
     foreach (SongVM song in _addedSongCollection)
     {
         if (SongVM.Comparison(song, SongViewModel.SelectedSong))
         {
             return;
         }
     }
     for (int i = 0; i < _deletedSongCollection.Count; i++)
     {
         if (SongVM.Comparison(_deletedSongCollection[i], SongViewModel.SelectedSong))
         {
             _deletedSongCollection.Remove(_deletedSongCollection[i]);
             break;
         }
     }
     _addedSongCollection.Add(SongViewModel.SelectedSong);
 }