コード例 #1
0
ファイル: PlayLiveFactory.cs プロジェクト: uvbs/MyProjects
        public PlayLiveFactory(object parameter)
        {
            _liveInfo = parameter as LiveListItem;

            _mediaManage = new MediaExtensionManager();
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "ppvod:");
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "pplive3:");
        }
コード例 #2
0
        public void SetSource(LiveListItem liveItem)
        {
            this.DataContext = liveItem;

            if (_lastSelectBtn != null)
                _lastSelectBtn.IsChecked = false;
            _lastSelectBtn = btntoday;
            _lastSelectBtn.IsChecked = true;
            _liveInfo = liveItem;
            _paradeTime = DateTime.Now.ToString("yyyy-MM-dd");

            RequestDatas();
        }
コード例 #3
0
 private bool IsStart(LiveListItem item)
 {
     if (LiveCenterFactoryBase.IsDirectPlay(item.ChannelInfo.LiveType))
     {
         if (!(item.ChannelInfo.StartTime <= DateTime.Now
             && item.ChannelInfo.EndTime >= DateTime.Now))
         {
             liveDetailClose();
             return false;
         }
     }
     return true;
 }
コード例 #4
0
 void CreateItems(LiveListGroup group, IEnumerable<LiveChannelInfo> items)
 {
     bool hasReuslt = false;
     foreach (var live in items)
     {
         hasReuslt = true;
         var item = new LiveListItem() { ChannelInfo = live };
         group.ItemsGroup.Add(item);
     }
     if (!hasReuslt)
         group.ItemsGroup.Add(new LiveListItem() { ChannelInfo = new LiveChannelInfo(LiveType.Sports) { Id = 0, Title = string.Format("暂无{0}节目", group.GroupName), StartTime = DateTime.Now.AddDays(1) } });
 }