static void Main(string[] args) { library = new Library(); skipSongs = new SkipSongs(library); //skipSongs.Delete(); SkipSongs(10); Console.WriteLine(); foreach (Song s in skipSongs.GetSongs()) { Console.WriteLine(s.Path); } Console.WriteLine(); foreach (SkipSong ss in skipSongs) { Console.WriteLine(ss.Song.Path); ss.Handle = ProgressType.Remove; } Console.WriteLine(); Console.WriteLine(skipSongs.GetSongs().Count()); foreach (Song s in skipSongs.GetSongs()) { Console.WriteLine(s.Path); } Console.WriteLine(library.Playlists.SelectMany(p => p.Songs).Count()); Console.ReadLine(); }
private void List_SkippedSong(object sender, EventArgs e) { IList <object> selectedItems = lbxSongs.SelectedItems; lbxSongs.ItemsSource = list.GetSongs(); foreach (object selectedItem in selectedItems) { lbxSongs.SelectedItems.Add(selectedItem); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { open = true; list = e.Parameter as SkipSongs; list.SkippedSong += List_SkippedSong; lbxSongs.ItemsSource = list.GetSongs(); base.OnNavigatedTo(e); }