Beispiel #1
0
        public void SwitchPlaylist(PlaylistItemViewModel item)
        {
            var removeFrom = item.IsInPlaylist ? playlistItems : excludedLibraryItems;
            var addTo      = item.IsInPlaylist ? excludedLibraryItems : playlistItems;

            removeFrom.RemoveAt(item.DisplayIndex);
            addTo.Add(item.Model.Item);
            PlaylistsChanged();
        }
Beispiel #2
0
 private void Move(List <MediaItem> items, PlaylistItemViewModel item, bool moveUp)
 {
     items.RemoveAt(item.DisplayIndex);
     items.Insert(moveUp ? Math.Max(0, item.DisplayIndex - 1) : Math.Min(playlistItems.Count, item.DisplayIndex + 1), item.Model.Item);
 }
Beispiel #3
0
 public void Move(PlaylistItemViewModel item, bool moveUp)
 {
     Move(item.IsInPlaylist ? playlistItems : excludedLibraryItems, item, moveUp);
     PlaylistsChanged();
 }