private void configDownloadOneCommand() { DownloadOneCommand = new RelayCommand(o => { IsDownloadAll = false; var video = ((VideoDetails)o); if (video != null) { using (Porter.Model.FetchVideoURL cls = new Porter.Model.FetchVideoURL()) { ProgressValue = 0; //video.BeginDownload = true; //video.EndDownload = false; video.IsActive = true; video.ProgressPercentage = 0; video.DownlaodStatus = DownlaodStatus.Begin; try { VideoDownloader(video.Url, video.SelectedVideoExtensionType, video.VideoPath); } catch (Exception) { throw; } } } }, o => checkDownloadStatusIsCompleted(o, DownlaodStatus.None, DownlaodStatus.End, DownlaodStatus.Cancel)); }
void fillVideo(string videoId) { using (Porter.Model.FetchVideoURL cls = new Porter.Model.FetchVideoURL()) { var video = cls.GetVideoDetail(videoId); VideoDetails.Add(video); } }
void fillList(string listName) { using (Porter.Model.FetchVideoURL cls = new Porter.Model.FetchVideoURL()) { var x = cls.GetList(listName); x.ToList().ForEach(a => { VideoDetails.Add(new Porter.Entity.VideoDetails { Url = a.Url, Titel = a.Titel, ImageUrl = a.ImageUrl, ProgressPercentage = 0, VideoID = a.VideoID }); }); } }