Exemple #1
0
 public void Remove(int index)
 {
     Sorting.RemoveSongFromSortDictionaries(outputSongs[index], sortDictionaries);
     this.pathDictionary.Remove(outputSongs[index].Path);
     outputSongs.Remove(outputSongs[index]);
     OnLibraryChanged(new LibraryChangedEventArgs());
 }
Exemple #2
0
        public void Remove(int index)
        {
            if (CurrentIndex > index)
            {
                CurrentIndex--;
            }
            songPaths.RemoveAt(index);

            Sorting.RemoveSongFromSortDictionaries(this.outputSongs[index], this.sortDictionaries);
            if (index < outputSongs.Count)
            {
                outputSongs.RemoveAt(index);
            }
        }
Exemple #3
0
        public void Remove(string path)
        {
            Song toBeRemoved = null;

            foreach (Song s in outputSongs)
            {
                if (s.Path == path)
                {
                    toBeRemoved = s;
                }
            }
            Sorting.RemoveSongFromSortDictionaries(toBeRemoved, sortDictionaries);
            outputSongs.Remove(toBeRemoved);
            this.pathDictionary.Remove(toBeRemoved.Path);
            this.OnLibraryChanged(new LibraryChangedEventArgs());
        }