當前位置: 首頁>>代碼示例>>C#>>正文


C# TvBusinessLayer.GetChannelByTuningDetail方法代碼示例

本文整理匯總了C#中TvDatabase.TvBusinessLayer.GetChannelByTuningDetail方法的典型用法代碼示例。如果您正苦於以下問題:C# TvBusinessLayer.GetChannelByTuningDetail方法的具體用法?C# TvBusinessLayer.GetChannelByTuningDetail怎麽用?C# TvBusinessLayer.GetChannelByTuningDetail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TvDatabase.TvBusinessLayer的用法示例。


在下文中一共展示了TvBusinessLayer.GetChannelByTuningDetail方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PersistPortalChannel

 private static void PersistPortalChannel(PortalChannel pChannel)
 {
   TvBusinessLayer layer = new TvBusinessLayer();
   Channel dbPortalChannel = layer.GetChannelByTuningDetail(pChannel.NetworkId, pChannel.TransportId,
                                                            pChannel.ServiceId);
   if (dbPortalChannel == null)
   {
     Log.Info("Portal channel with networkId={0}, transportId={1}, serviceId={2} not found", pChannel.NetworkId,
              pChannel.TransportId, pChannel.ServiceId);
     return;
   }
   Gentle.Framework.Broker.Execute("delete from ChannelLinkageMap WHERE idPortalChannel=" + dbPortalChannel.IdChannel);
   foreach (LinkedChannel lChannel in pChannel.LinkedChannels)
   {
     Channel dbLinkedChannnel = layer.GetChannelByTuningDetail(lChannel.NetworkId, lChannel.TransportId,
                                                               lChannel.ServiceId);
     if (dbLinkedChannnel == null)
     {
       Log.Info("Linked channel with name={0}, networkId={1}, transportId={2}, serviceId={3} not found",
                lChannel.Name, lChannel.NetworkId, lChannel.TransportId, lChannel.ServiceId);
       continue;
     }
     dbLinkedChannnel.DisplayName = lChannel.Name;
     dbLinkedChannnel.Persist();
     ChannelLinkageMap map = new ChannelLinkageMap(dbPortalChannel.IdChannel, dbLinkedChannnel.IdChannel,
                                                   lChannel.Name);
     map.Persist();
   }
 }
開發者ID:arangas,項目名稱:MediaPortal-1,代碼行數:29,代碼來源:ChannelLinkageGrabber.cs

示例2: FilterOutEPGChannel

    /// <summary>
    /// checks if a received EPGChannel should be filtered from the resultlist
    /// </summary>
    /// <value></value>
    protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
    {
      TvBusinessLayer layer = new TvBusinessLayer();
      if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
      {
        DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
        Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
        DVBTChannel dvbtchannel = new DVBTChannel();
        if (dbchannel == null)
        {
          return false;
        }
        foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
        {
          if (detail.ChannelType == 4)
          {
            dvbtchannel.Frequency = detail.Frequency;
            dvbtchannel.BandWidth = detail.Bandwidth;
          }
        }
        return this.CurrentChannel.IsDifferentTransponder(dvbtchannel);
      }
      else
        return false;

    }
開發者ID:nio22,項目名稱:MediaPortal-1,代碼行數:30,代碼來源:TvCardDVBT.cs

示例3: FilterOutEPGChannel

 /// <summary>
 /// checks if a received EPGChannel should be filtered from the resultlist
 /// </summary>
 /// <value></value>
 protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
 {
   TvBusinessLayer layer = new TvBusinessLayer();
   if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
   {
     DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
     Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
     DVBSChannel dvbschannel = new DVBSChannel();
     if (dbchannel == null)
     {
       return false;
     }
     foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
     {
       if (detail.ChannelType == 3)
       {
         dvbschannel.Frequency = detail.Frequency;
         dvbschannel.Polarisation = (Polarisation)detail.Polarisation;
         dvbschannel.ModulationType = (ModulationType)detail.Modulation;
         dvbschannel.SatelliteIndex = detail.SatIndex;
         dvbschannel.InnerFecRate = (BinaryConvolutionCodeRate)detail.InnerFecRate;
         dvbschannel.Pilot = (Pilot)detail.Pilot;
         dvbschannel.Rolloff = (RollOff)detail.RollOff;
         dvbschannel.DisEqc = (DisEqcType)detail.Diseqc;
       }
     }
     return this.CurrentChannel.IsDifferentTransponder(dvbschannel);
   }
   else
     return false;  
 }
開發者ID:nio22,項目名稱:MediaPortal-1,代碼行數:35,代碼來源:TvCardDVBS.cs

示例4: FilterOutEPGChannel

 /// <summary>
 /// checks if a received EPGChannel should be filtered from the resultlist
 /// </summary>
 /// <value></value>
 protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
 {
   TvBusinessLayer layer = new TvBusinessLayer();
   if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
   {
     DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
     Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
     ATSCChannel atscchannel = new ATSCChannel();
     if (dbchannel == null)
     {
       return false;
     }
     foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
     {
       if (detail.ChannelType == 1)
       {
         atscchannel.MajorChannel = detail.MajorChannel;
         atscchannel.MinorChannel = detail.MinorChannel;
         atscchannel.PhysicalChannel = detail.ChannelNumber;
       }
     }
     return this.CurrentChannel.IsDifferentTransponder(atscchannel);
   }
   else
     return false;
 }
開發者ID:npcomplete111,項目名稱:MediaPortal-1,代碼行數:30,代碼來源:TvCardATSC.cs


注:本文中的TvDatabase.TvBusinessLayer.GetChannelByTuningDetail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。