当前位置: 首页>>代码示例>>C#>>正文


C# Channel.IsWebstream方法代码示例

本文整理汇总了C#中TvDatabase.Channel.IsWebstream方法的典型用法代码示例。如果您正苦于以下问题:C# Channel.IsWebstream方法的具体用法?C# Channel.IsWebstream怎么用?C# Channel.IsWebstream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TvDatabase.Channel的用法示例。


在下文中一共展示了Channel.IsWebstream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WebChannel

 public WebChannel(Channel ch)
 {
   this.idChannel = ch.IdChannel;
   this.displayName = ch.DisplayName;
   this.grabEPG = ch.GrabEpg;
   this.isRadio = ch.IsRadio;
   this.isTv = ch.IsTv;
   this.isWebStream = ch.IsWebstream();
 }
开发者ID:rndthoughts,项目名称:ipimpplus,代码行数:9,代码来源:Classes.cs

示例2: WebMiniEPG

 public WebMiniEPG(Channel ch)
 {
     if (ch == null)
     return;
       this.idChannel = ch.IdChannel;
       this.name = ch.DisplayName;
       this.isWebStream = ch.IsWebstream();
       epgNow = new WebShortProgram(ch.CurrentProgram);
       epgNext=new WebShortProgram(ch.NextProgram);
 }
开发者ID:oxan,项目名称:mpwebservices,代码行数:10,代码来源:Classes.cs

示例3: CreateListViewItemForChannel

    /// <summary>
    /// Create a listview item for a channel
    /// </summary>
    /// <param name="ch">Channel</param>
    /// <param name="cards">All available cards</param>
    /// <returns>Listview item representing the channel</returns>
    internal ListViewItem CreateListViewItemForChannel(Channel ch, Dictionary<int, CardType> cards)
    {
      if (_listViewCache.ContainsKey(ch.IdChannel)) return _listViewCache[ch.IdChannel];

      bool analog = false;
      bool dvbc = false;
      bool dvbt = false;
      bool dvbs = false;
      bool atsc = false;
      bool dvbip = false;
      bool webstream = false;
      bool notmapped = true;
      if (ch.IsWebstream())
      {
        webstream = true;
        notmapped = false;
      }
      if (notmapped)
      {
        IList<ChannelMap> maps = ch.ReferringChannelMap();
        foreach (ChannelMap map in maps)
        {
          if (cards.ContainsKey(map.IdCard))
          {
            CardType type = cards[map.IdCard];
            switch (type)
            {
              case CardType.Analog:
                analog = true;
                notmapped = false;
                break;
              case CardType.DvbC:
                dvbc = true;
                notmapped = false;
                break;
              case CardType.DvbT:
                dvbt = true;
                notmapped = false;
                break;
              case CardType.DvbS:
                dvbs = true;
                notmapped = false;
                break;
              case CardType.Atsc:
                atsc = true;
                notmapped = false;
                break;
              case CardType.DvbIP:
                dvbip = true;
                notmapped = false;
                break;
            }
          }
        }
      }
      ListViewItem item = new ListViewItem(ch.DisplayName);
      item.Checked = ch.VisibleInGuide;
      item.Tag = ch;


      IList<string> groups = ch.GroupNames;
      List<string> groupNames = new List<string>();
      foreach (string groupName in groups)
      {
        if (groupName != TvConstants.TvGroupNames.AllChannels &&
            groupName != TvConstants.RadioGroupNames.AllChannels)
        {
//Don't add "All Channels"
          groupNames.Add(groupName);
        }
      }
      string group = String.Join(", ", groupNames.ToArray());
      item.SubItems.Add(group);

      List<string> providers = new List<string>();
      IList<TuningDetail> tuningDetails = ch.ReferringTuningDetail();
      bool hasFta = false;
      bool hasScrambled = false;
      foreach (TuningDetail detail in tuningDetails)
      {
        if (!providers.Contains(detail.Provider) && !String.IsNullOrEmpty(detail.Provider))
        {
          providers.Add(detail.Provider);
        }
        if (detail.FreeToAir)
        {
          hasFta = true;
        }
        if (!detail.FreeToAir)
        {
          hasScrambled = true;
        }
      }

//.........这里部分代码省略.........
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:101,代码来源:ChannelListViewHandler.cs


注:本文中的TvDatabase.Channel.IsWebstream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。