當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。