当前位置: 首页>>代码示例>>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;未经允许,请勿转载。