// Create the favorite list private void createFavsList() { _xmFavs.Clear(); XMFavItem fav; Regex reNum = new Regex(@"^\d+$"); // For number matching for (int i = 0; i < favorites.Length; i++) { fav = new XMFavItem(i + 1); fav.RelativeBounds = new Rectangle(0, 0, 100, 50); if (reNum.Match(favorites[i]).Success) { string channel = ((XMListItem)_xmChannels.Items.ToArray()[int.Parse(favorites[i])]).Channel.Text; fav.Logo.Background = fi.DirectoryName + "\\Images\\" + channel + ".png"; } _xmFavs.AddItem(fav); } }
// Create the favorite list private void createFavsList() { _xmFavs.Clear(); XMFavItem fav; Regex reNum = new Regex(@"^\d+$"); // For number matching for (int i = 0; i < favorites.Length; i++) { fav = new XMFavItem(i+1); fav.RelativeBounds = new Rectangle(0,0,100,50); if (reNum.Match(favorites[i]).Success) { string channel = ((XMListItem)_xmChannels.Items.ToArray()[int.Parse(favorites[i])]).Channel.Text; fav.Logo.Background = fi.DirectoryName + "\\Images\\" + channel + ".png"; } _xmFavs.AddItem(fav); } }