Exemplo n.º 1
0
 public void PopulateDisplay()
 {
     if (this.summaryDisplay == null)
     {
         VideoSummaryData    videoSummaryData = new VideoSummaryData(0, this.uiName, this.videoId, this.thumbSize, this.style);
         VideoSummaryDisplay display          = new VideoSummaryDisplay(this.parentScreen, videoSummaryData);
         this.SetSummary(videoSummaryData, display);
         Service.Get <EventManager>().RegisterObserver(this, EventId.UIVideosRefresh, EventPriority.Default);
         Service.Get <EventManager>().RegisterObserver(this, EventId.UIVideosSourceTypeResponse, EventPriority.Default);
     }
     this.QueryStart();
 }
Exemplo n.º 2
0
 public EatResponse OnEvent(EventId id, object cookie)
 {
     if (id == EventId.UIVideosRefresh)
     {
         VideoSummaryDisplay videoSummaryDisplay = (VideoSummaryDisplay)cookie;
         if (videoSummaryDisplay == this.summaryDisplay)
         {
             this.QueryStart();
         }
     }
     else if (id == EventId.UIVideosSourceTypeResponse && this.summaryDisplay != null)
     {
         KeyValuePair <List <string>, string> keyValuePair = (KeyValuePair <List <string>, string>)cookie;
         if (keyValuePair.get_Key().Contains(this.summaryDisplay.GetGuid()))
         {
             this.summaryDisplay.UpdateSourceType(keyValuePair.get_Value());
         }
     }
     return(EatResponse.NotEaten);
 }
Exemplo n.º 3
0
 private void SetSummary(VideoSummaryData data, VideoSummaryDisplay display)
 {
     this.summaryData    = data;
     this.summaryDisplay = display;
 }