Example #1
0
        private void CreateVideoSummaries(List <string> videoGuidList)
        {
            List <string>           list  = new List <string>();
            List <VideoSummaryData> list2 = new List <VideoSummaryData>();
            int count = videoGuidList.Count;

            for (int i = 0; i < count; i++)
            {
                string text = videoGuidList[i];
                if (!list.Contains(text) && this.VideoValid(text))
                {
                    list.Add(text);
                    VideoSummaryData item = new VideoSummaryData(i, this.vidSummaryLabel + "_" + (i + 1), text, ThumbnailSize.SMALL, VideoSummaryStyle.Search);
                    this.foundVids.Add(item);
                    list2.Add(item);
                }
            }
            if (list.Count == 0)
            {
                this.CreateMessageSummary(VideoSummaryStyle.SearchEmpty);
                return;
            }
            this.dataState = DataState.Loaded;
            Service.Get <StaRTSLogger>().DebugFormat("Got {0} results", new object[]
            {
                list.Count
            });
            KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> > keyValuePair = new KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> >(VideoSummaryStyle.Search, list2);

            Service.Get <EventManager>().SendEvent(EventId.UIVideosQueryResponse, keyValuePair);
        }
Example #2
0
 public VideosPostView()
 {
     this.guid             = "";
     this.index            = 0;
     this.summary          = null;
     this.sourceTypeHelper = new QuerySourceTypes();
 }
Example #3
0
 public void Cleanup()
 {
     if (this.summary != null)
     {
         this.summary.Cleanup();
         this.summary = null;
     }
 }
Example #4
0
        private void CreateMessage(VideoSummaryStyle messageType)
        {
            VideoSummaryData item = new VideoSummaryData(1, this.vidSummaryLabel + "_" + 1, "", ThumbnailSize.SMALL, messageType);
            KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> > keyValuePair = new KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> >(messageType, new List <VideoSummaryData>
            {
                item
            });

            Service.Get <EventManager>().SendEvent(EventId.UIVideosQueryResponse, keyValuePair);
        }
Example #5
0
        private void CreateVideoSummary(List <string> videoGuidList)
        {
            List <VideoSummaryData> list = new List <VideoSummaryData>();
            int num = 0;

            while (num < this.numFeatured && num < videoGuidList.Count)
            {
                VideoSummaryData item = new VideoSummaryData(num, this.vidSummaryLabel + "_" + (num + 1), videoGuidList[num], ThumbnailSize.XLARGE, VideoSummaryStyle.Featured);
                this.featuredVids.Add(item);
                list.Add(item);
                num++;
            }
            KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> > keyValuePair = new KeyValuePair <VideoSummaryStyle, List <VideoSummaryData> >(VideoSummaryStyle.Featured, list);

            Service.Get <EventManager>().SendEvent(EventId.UIVideosQueryResponse, keyValuePair);
        }
Example #6
0
 public void ShowPage(string guid)
 {
     this.guid    = guid;
     this.summary = new VideoSummaryData(this.index, "", guid, ThumbnailSize.XXLARGE, VideoSummaryStyle.PostView);
     Service.Get <VideoDataManager>().GetFeed(new VideoDataManager.DataListQueryCompleteDelegate(this.OnSearchQueried));
 }