Exemple #1
0
 public ChannelDetailInfo Clone()
 {
     ChannelDetailInfo newChannelDetailInfo = new ChannelDetailInfo(VID, Title, PlayLink, TypeID, ImgUrl, CatalogTags, DirectorTags, ActTags, YearTags, AreaTags, State, Note, Mark, Bitrate, ResolutionWidth, ResolutionHeight, IsHD, IsRecommend, IsNew, Is3D, Duration, Content, SlotUrl, new List<ProgramInfo>(), IsDown);
     foreach (var item in ProgramInfos)
     {
         ProgramInfo programInfo = new ProgramInfo(item.ChannelVID, item.Title, item.PlayLink, item.SlotUrl, item.Index, item.IsDown);
         newChannelDetailInfo.ProgramInfos.Add(programInfo);
     }
     return newChannelDetailInfo;
 }
        public ChannelDetailInfo Clone()
        {
            ChannelDetailInfo newChannelDetailInfo = new ChannelDetailInfo(VID, Title, PlayLink, TypeID, ImgUrl, CatalogTags, DirectorTags, ActTags, YearTags, AreaTags, State, Note, Mark, Bitrate, ResolutionWidth, ResolutionHeight, IsHD, IsRecommend, IsNew, Is3D, Duration, Content, SlotUrl, new List <ProgramInfo>(), IsDown);

            foreach (var item in ProgramInfos)
            {
                ProgramInfo programInfo = new ProgramInfo(item.ChannelVID, item.Title, item.PlayLink, item.SlotUrl, item.Index, item.IsDown);
                newChannelDetailInfo.ProgramInfos.Add(programInfo);
            }
            return(newChannelDetailInfo);
        }
Exemple #3
0
        public static bool AddTask(ChannelDetailInfo channelDetailInfo, ProgramInfo programInfo)
        {

            MediaFileDownload downloader = new MediaFileDownload();                        
            string index = (programInfo != null) ? programInfo.Index.ToString() : string.Empty;
            string channelVid = (programInfo != null) ? programInfo.ChannelVID.ToString() : string.Empty;
            downloader.Tag = channelDetailInfo.VID.ToString() + "|" + index + "|" + channelVid;
            if (DownFactory.IsExistVid(downloader.Tag as string))
                return false;
            Utils.MediaFileDownload.Add(downloader);
            int rate = (int)channelDetailInfo.Mark;
            string subTitle = string.Empty;
            if (channelDetailInfo.TypeID != 1 && programInfo != null)
            {
                subTitle = "(第" + (programInfo.Index + 1).ToString() + "集)";
            }
            DownFactory.InsertRecord(downloader.Tag as string, channelDetailInfo.ImgUrl, channelDetailInfo.Title, "", downloader.PathName, 0, 0, (int)DownloadStatus.Downloading, rate);
            DownInfo info = new DownInfo(downloader.Tag as string, channelDetailInfo.ImgUrl, "正在下载:0M", 0, channelDetailInfo.Title, subTitle, "/PPTVForWP7;component/Images/Pause.png", rate,String.Empty);
            MyDownloading.Add(info);

            foreach (MediaFileDownload down in Utils.MediaFileDownload.DownloadQueue)
            {
                down.DownloadStatusChange += OnDownloadStatusChange;
                down.DownloadProgressChange += OnDownloadProgressChange;
            }

            return true;
        }
Exemple #4
0
 public DetailInfoHelp(ProgramInfo programInfo, int programIndex)
 {
     ProgramInfo = programInfo;
     ProgramIndex = programIndex;
 }
Exemple #5
0
 private void OnStartDownloadSingleClick(object sender, RoutedEventArgs e)
 {
     //Button button = sender as Button;
     //Grid grid = button.Parent as Grid;
     //_downSign = grid.Children[1] as Rectangle;
     _downSign = sender as Button;
     _piForDownload = null;
     if (!_isLogon)
     {
         MessageBox.Show("请先登录", "提示", MessageBoxButton.OK);
         NavigationService.Navigate(new Uri("/LoginPage.xaml?download=1", UriKind.RelativeOrAbsolute));
     }
     else
     {
         StartDownloadProgram();
     }
 }
Exemple #6
0
 private void ProgramItem_ItemTap(object sender, ProgramInfo programInfo)
 {
     xLoadGrid.Visibility = Visibility.Visible;
     string page = String.Format("/PlayPage.xaml?vid={0}&programIndex={1}&programSource={2}", VID, programInfo.Index, _programSource);
     NavigationService.Navigate(new Uri(page, UriKind.Relative));
 }