public void Remove(int index) { Sorting.RemoveSongFromSortDictionaries(outputSongs[index], sortDictionaries); this.pathDictionary.Remove(outputSongs[index].Path); outputSongs.Remove(outputSongs[index]); OnLibraryChanged(new LibraryChangedEventArgs()); }
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); } }
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()); }