public SongImageInfo NextSong(string name) { int index = Songs.ToList().FindIndex(x => x.GetName() == name); if (index == -1) { return(SongImageInfo.GetNullInfo()); } index++; if (index == Songs.Length - 1) { index = 0; } return(Songs[index].GetInfo(0)); }
public SongImageInfo Prev() { if (ImagesPosition == 0) { SongsPosition--; if (SongsPosition < 0) { SongsPosition = 0; return(SongImageInfo.GetNullInfo()); } ImagesPosition = Songs[SongsPosition].Images.Length - 1; } else { ImagesPosition--; } return(Songs[SongsPosition].GetInfo(ImagesPosition)); }
public SongImageInfo Next() { if (ImagesPosition == Songs[SongsPosition].Images.Length - 1) { SongsPosition++; if (SongsPosition == Songs.Length) { SongsPosition = Songs.Length - 1; return(SongImageInfo.GetNullInfo()); } ImagesPosition = 0; } else { ImagesPosition++; } return(Songs[SongsPosition].GetInfo(ImagesPosition)); }