public void ExecuteRemoveDownloadsCommand(object parameter) { List <Torrent> downloads = (parameter as IList).Cast <Torrent>().ToList(); foreach (Torrent torrent in downloads) { DownloadedTorrents.Remove(torrent); } onPropertyChanged("LatestDownload"); }
public void ExecuteResetFilterCommand(object parameter) { Filter filter = parameter as Filter; int indexOfFilter = Filters.IndexOf(filter); List <Torrent> downloads = DownloadedTorrents.FindDownloadedTorrents(indexOfFilter); foreach (Torrent torrent in downloads) { DownloadedTorrents.Remove(torrent); } onPropertyChanged("DownloadedTorrents"); onPropertyChanged("LatestDownload"); }