public void SortSongs() { if (songsToPlay.Count > 0) { Console.WriteLine("sort by :\n1.Song\n2.Artist\n3.year\n4.genre\n5.Duration"); byte choise = Convert.ToByte(Console.ReadLine()); switch (choise) { case 1: songsToPlay = Playlist.SongsToPlay(songsToPlay, 1); break; case 2: songsToPlay = Playlist.SongsToPlay(songsToPlay, 2); break; case 3: songsToPlay = Playlist.SongsToPlay(songsToPlay, 3); break; case 4: songsToPlay = Playlist.SongsToPlay(songsToPlay, 4); break; case 5: songsToPlay = Playlist.SongsToPlay(songsToPlay, 5); break; } } else { Console.WriteLine("there is no any song.please before upload songs"); } }
public void UploadSongs() { songs.Add(new Song() { songName = "aux absents", artist = "FonkyFamily", year = "1998", duration = 140, Genre = "hiphop" }); songs.Add(new Song() { songName = "In the name of Amun", artist = "Nile", year = "2007", duration = 251, Genre = "metal" }); songs.Add(new Song() { songName = "drowning", artist = "Sixth June", year = "2014", duration = 187, Genre = "wave" }); songs.Add(new Song() { songName = "Younger Dryas", artist = "Linea Aspera", year = "2005", duration = 134, Genre = "wave" }); songs.Add(new Song() { songName = "Anybody", artist = "Currensy", year = "2000", duration = 274, Genre = "hiphop" }); songs.Add(new Song() { songName = "Solitude depth", artist = "Sterbend", year = "1990", duration = 225, Genre = "metal" }); songs.Add(new Song() { songName = "Im Wasser", artist = "Schwefelgelb", year = "2016", duration = 533, Genre = "ebm" }); songs.Add(new Song() { songName = "Orchidea", artist = "Kauan", year = "2010", duration = 421, Genre = "metal" }); songsToPlay = Playlist.SongsToPlay(songs); }