private void PopulateUrlDownloadList() { UrlDowloadList = new List <string>(); foreach (VideoField field in pnl_videos.Controls) { VideoCheck vc = field.GetChildAtPoint(new Point(545, 45)) as VideoCheck; if (vc.Checked) { UrlDowloadList.Add(field.Text); } } }
private void populateVideoList() { int y = 5; foreach (var video in playlistVideos) { VideoIcon vi = new VideoIcon(video.Thumbnail as string, 5); VideoLabel vl = new VideoLabel(video.Title, 35); VideoCheck vc = new VideoCheck(35); VideoField vf = new VideoField(vi, vl, vc, video.Url, y); vf.Name = video.Title; pnl_videos.Controls.Add(vf); y += 105; } }
private void PopulateVideoList() { var fieldCount = 0; foreach (var video in playlistVideos) { var vi = new VideoIcon(video.Thumbnail.ToString()); var vl = new VideoLabel(video.Title); var vc = new VideoCheck(); var vf = new VideoField(vi, vl, vc, video.Url); pnl_videos.Children.Add(vf); fieldCount++; if (fieldCount < playlistVideos.Count) { var separator = new Border { BorderThickness = new Thickness(0.5), BorderBrush = Brushes.Black, Margin = new Thickness(1, 0, 0, 0) }; pnl_videos.Children.Add(separator); } } }