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


C# ChannelType类代码示例

本文整理汇总了C#中ChannelType的典型用法代码示例。如果您正苦于以下问题:C# ChannelType类的具体用法?C# ChannelType怎么用?C# ChannelType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: SSHChannel

 protected SSHChannel(SSHConnection con, ChannelType type, int localID)
 {
     con.ChannelCollection.RegisterChannel(localID, this);
     _connection = con;
     _type = type;
     _localID = localID;
 }
开发者ID:yiyi99,项目名称:poderosa,代码行数:7,代码来源:ConnectionRoot.cs

示例2: GetLogos

 public Dictionary<string, string> GetLogos(List<string> channelsNames, ChannelType type, string regionCode)
 {
     var result = new Dictionary<string, string>();
     using (var ctx = new EF.RepositoryContext("LogoDB"))
     {
         foreach (var channelName in channelsNames)
         {
             var aliases = ctx.Aliases.Include("Channel").Include("Channel.Logos").Include("Channel.Logos.Suggestion").Where(a => a.Name == channelName && a.Channel.Type == type);
             if (aliases.Any())
             {
                 if (!string.IsNullOrWhiteSpace(regionCode))
                 {
                     // find best matching by RegionCode
                     var matchedByRegion = aliases.FirstOrDefault(a => a.Channel.RegionCode == regionCode);
                     if (matchedByRegion != null)
                     {
                         result.Add(channelName, matchedByRegion.Channel.Logos.First(l => l.Suggestion == null).Id.ToString());
                         continue;
                     }
                 }
                 // simply use first one
                 result.Add(channelName, aliases.First().Channel.Logos.First(l => l.Suggestion == null).Id.ToString());
             }
         }
     }
     return result;
 }
开发者ID:miko31,项目名称:MediaPortal-LogoManager,代码行数:27,代码来源:ChannelManager.svc.cs

示例3: Play

    /// <summary>
    /// Play the specified audioClip on specified channel type. This function is meant to be used for single sound occurences.
    /// Use default level will set the attenuation to its default level.
    /// </summary>
    /// <param name="audioClip">Audio clip.</param>
    /// <param name="clipName">Clip name.</param>
    /// <param name="channeltype">Channeltype.</param>
    public void Play(AudioClip audioClip, ChannelType channeltype, AudioClipInfo clipInfo)
    {
        GameObject go = new GameObject("GameSound");
        go.tag = channeltype.ToString();
        go.transform.SetParent(gameObject.transform, false);
        AudioSource source = go.AddComponent<AudioSource>();
        source.playOnAwake = false;

        source.clip = audioClip;

        float lvl = 0.0f;
        ChannelInfo chInfo = null;
        channelInfos.TryGetValue(channeltype.ToString(), out chInfo);

        if(chInfo != null)
        {
            lvl = clipInfo.useDefaultDBLevel ? chInfo.defaultDBLevel : chInfo.settedDBLevel;
        }
        else
        {
            Debug.LogError("Channel info not found");
        }

        audioMixer.SetFloat(channeltype.ToString(),lvl);
        source.outputAudioMixerGroup = chInfo.audioMixerGroup;

        source.loop = clipInfo.isLoop;

        source.PlayDelayed(clipInfo.delayAtStart);
        playingList.Add(go);
    }
开发者ID:PaulElmo,项目名称:Listen_In-Paul-,代码行数:38,代码来源:SoundManager.cs

示例4: Channel

 public Channel(ChannelType type, int width, int height, long size)
 {
     this.type = type;
     this.width = width;
     this.height = height;
     this.size = size;
 }
开发者ID:NtreevSoft,项目名称:psd-parser,代码行数:7,代码来源:Channel.cs

示例5: SSH2ChannelBase

        /// <summary>
        /// Constructor (initiated by server)
        /// </summary>
        public SSH2ChannelBase(
                IPacketSender<SSH2Packet> packetSender,
                SSHConnectionParameter param,
                SSHProtocolEventManager protocolEventManager,
                uint localChannel,
                uint remoteChannel,
                ChannelType channelType,
                string channelTypeString,
                uint serverWindowSize,
                uint serverMaxPacketSize)
        {
            _packetSender = packetSender;
            _protocolEventManager = protocolEventManager;
            LocalChannel = localChannel;
            RemoteChannel = remoteChannel;
            ChannelType = channelType;
            ChannelTypeString = channelTypeString;

            _localMaxPacketSize = param.MaxPacketSize;
            _localWindowSize = _localWindowSizeLeft = param.WindowSize;
            _serverMaxPacketSize = serverMaxPacketSize;
            _serverWindowSizeLeft = serverWindowSize;

            _state = State.InitiatedByServer; // SendOpenConfirmation() will change state to "Opened"
        }
开发者ID:poderosaproject,项目名称:poderosa,代码行数:28,代码来源:SSH2Channel.cs

示例6: PolicyTypeInfo

        /// <summary>
        /// Setup constructor
		/// </summary>
		/// <param name="policyType">Associated policy type</param>
        /// <param name="name">Policy type display name</param>
        /// <param name="channels">Policy type channels</param>
        /// <param name="available">If policy type is available to be used in the designer</param>
		public PolicyTypeInfo(PolicyType policyType, IPolicyLanguageItem name, ChannelType[] channels, bool available)
		{
			m_PolicyType = policyType;
            m_Name = name;
            m_Channels = channels;
            m_Available = available;
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:PolicyTypeInfo.cs

示例7: SSHChannel

 protected SSHChannel(SSHConnection con, ChannelType type, int local_id)
 {
     con.RegisterChannel(local_id, this);
     _connection = con;
     _type = type;
     _localID = local_id;
 }
开发者ID:rfyiamcool,项目名称:solrex,代码行数:7,代码来源:ConnectionRoot.cs

示例8: Initialize

 public void Initialize(ChannelType channelType, int epgHours, int epgHoursOffset, string allChannelsGroupName)
 {
     _model.EpgHours = epgHours;
     _model.EpgHoursOffset = epgHoursOffset;
     _model.AllChannelsGroupName = allChannelsGroupName;
     ChangeChannelType(channelType);
 }
开发者ID:Christoph21x,项目名称:ARGUS-TV,代码行数:7,代码来源:GuideController.cs

示例9: GetChannel

        public static DoubleMatrix GetChannel(this MatrixBase<YCbCrColor> matrix,  ChannelType channelType)
        {
            var ret = new DoubleMatrix(matrix.RowCount, matrix.ColumnCount);

            for (int i = 0; i < matrix.RowCount; i++)
            {
                for (int j = 0; j < matrix.ColumnCount; j++)
                {
                    switch (channelType)
                    {
                        case ChannelType.Y:
                            ret[i, j] = matrix[i, j].Y;
                            break;
                        case ChannelType.Cr:
                            ret[i, j] = matrix[i, j].Cr;
                            break;
                        case ChannelType.Cb:
                            ret[i, j] = matrix[i, j].Cb;
                            break;
                        default:
                            throw new ArgumentOutOfRangeException("channelType");
                    }
                }
            }

            return ret;
        }
开发者ID:AdamStefan,项目名称:Steganography,代码行数:27,代码来源:ColorMatrix.cs

示例10: ChangeChannelType

        public void ChangeChannelType(ChannelType channelType)
        {
            _model.ChannelType = channelType;
            _model.ChannelGroups.Clear();
            _model.ChannelGroups.AddRange(Proxies.SchedulerService.GetAllChannelGroups(channelType, true).Result);
            _model.ChannelGroups.Add(new ChannelGroup()
            {
                ChannelGroupId = channelType == ChannelType.Television ? ChannelGroup.AllTvChannelsGroupId : ChannelGroup.AllRadioChannelsGroupId,
                ChannelType = channelType,
                GroupName = _model.AllChannelsGroupName,
                VisibleInGuide = true
            });

            if (_model.GuideDateTime == DateTime.MinValue)
            {
                GotoNow();
                _model.CurrentChannelGroupId = _model.ChannelGroups[0].ChannelGroupId;
            }
            else
            {
                bool currentIsOk = false;
                foreach (ChannelGroup channelGroup in _model.ChannelGroups)
                {
                    if (channelGroup.ChannelGroupId == _model.CurrentChannelGroupId)
                    {
                        currentIsOk = true;
                        break;
                    }
                }
                if (!currentIsOk)
                {
                    _model.CurrentChannelGroupId = _model.ChannelGroups[0].ChannelGroupId;
                }
            }
        }
开发者ID:Christoph21x,项目名称:ARGUS-TV,代码行数:35,代码来源:GuideController.cs

示例11: ChannelBase

 /// <summary>
 /// </summary>
 /// <param name="flags">
 /// </param>
 /// <param name="type">
 /// </param>
 /// <param name="id">
 /// </param>
 /// <param name="name">
 /// </param>
 public ChannelBase(ChannelFlags flags, ChannelType type, uint id, string name = "")
 {
     this.channelFlags = flags;
     this.channelType = type;
     this.ChannelId = id;
     this.ChannelName = name;
 }
开发者ID:gordonc64,项目名称:CellAO-NightPredator,代码行数:17,代码来源:ChannelBase.cs

示例12: ImportChannelsContext

        public ImportChannelsContext(ChannelType channelType)
        {
            _channelType = channelType;

            List<TreeNode> nodes = new List<TreeNode>();

            if (channelType == ChannelType.Television)
            {
                List<TvDatabase.ChannelGroup> groups = Utility.GetAllGroups<TvDatabase.ChannelGroup>();
                groups.Add(new TvDatabase.ChannelGroup(-1, "All Channels"));
                foreach (TvDatabase.ChannelGroup group in groups)
                {
                    TreeNode groupNode = new TreeNode(group.GroupName);
                    groupNode.Tag = group;
                    nodes.Add(groupNode);
                    groupNode.Nodes.Add(String.Empty);
                }
            }
            else
            {
                List<TvDatabase.RadioChannelGroup> groups = Utility.GetAllGroups<TvDatabase.RadioChannelGroup>();
                groups.Add(new TvDatabase.RadioChannelGroup(-1, "All Channels"));
                foreach (TvDatabase.RadioChannelGroup group in groups)
                {
                    TreeNode groupNode = new TreeNode(group.GroupName);
                    groupNode.Tag = group;
                    nodes.Add(groupNode);
                    groupNode.Nodes.Add(String.Empty);
                }
            }

            _channelNodes = nodes.ToArray();
        }
开发者ID:dot-i,项目名称:ARGUS-TV-Recorders,代码行数:33,代码来源:ImportChannelsContext.cs

示例13: StartGateway

        private static GatewayRef StartGateway(ActorSystem system, ChannelType type, int port)
        {
            var serializer = PacketSerializer.CreatePacketSerializer();

            var initiator = new GatewayInitiator
            {
                ListenEndPoint = new IPEndPoint(IPAddress.Any, port),
                GatewayLogger = LogManager.GetLogger("Gateway"),
                CreateChannelLogger = (ep, _) => LogManager.GetLogger($"Channel({ep}"),
                ConnectionSettings = new TcpConnectionSettings { PacketSerializer = serializer },
                PacketSerializer = serializer,
                CreateInitialActors = (context, connection) => new[]
                {
                    Tuple.Create(context.ActorOf(Props.Create(() => new EntryActor(context.Self.Cast<ActorBoundChannelRef>()))),
                                 new TaggedType[] { typeof(IEntry) },
                                 (ActorBindingFlags)0)
                }
            };

            var gateway = (type == ChannelType.Tcp)
                ? system.ActorOf(Props.Create(() => new TcpGateway(initiator))).Cast<GatewayRef>()
                : system.ActorOf(Props.Create(() => new UdpGateway(initiator))).Cast<GatewayRef>();
            gateway.Start().Wait();
            return gateway;
        }
开发者ID:SaladLab,项目名称:Akka.Interfaced.SlimSocket,代码行数:25,代码来源:Program.cs

示例14: CreateGateway

        public static Server.GatewayRef CreateGateway(ActorSystem system, ChannelType type, string name, IPEndPoint endPoint,
                                                      XunitOutputLogger.Source outputSource,
                                                      Action<Server.GatewayInitiator> clientInitiatorSetup = null)
        {
            // initialize gateway initiator

            var initiator = new Server.GatewayInitiator()
            {
                GatewayLogger = new XunitOutputLogger($"Gateway({name})", outputSource),
                ListenEndPoint = endPoint,
                ConnectEndPoint = endPoint,
                TokenRequired = false,
                CreateChannelLogger = (_, o) => new XunitOutputLogger($"ServerChannel({name})", outputSource),
                CheckCreateChannel = (_, o) => true,
                ConnectionSettings = new Server.TcpConnectionSettings { PacketSerializer = s_serverSerializer },
                PacketSerializer = s_serverSerializer,
            };

            clientInitiatorSetup?.Invoke(initiator);

            // create gateway and start it

            var gateway = (type == ChannelType.Tcp)
                ? system.ActorOf(Props.Create(() => new Server.TcpGateway(initiator))).Cast<Server.GatewayRef>()
                : system.ActorOf(Props.Create(() => new Server.UdpGateway(initiator))).Cast<Server.GatewayRef>();
            gateway.Start().Wait();

            return gateway;
        }
开发者ID:SaladLab,项目名称:Akka.Interfaced.SlimSocket,代码行数:29,代码来源:ChannelHelper.cs

示例15: Event

 /// <summary>
 /// Erzeugt eine Instanz von der Klasse Event.
 /// </summary>
 /// <param name="id">Die eindeutige Id des Events.</param>
 /// <param name="name">Der Name des Events.</param>
 /// <param name="description">Die Beschreibung des Events.</param>
 /// <param name="type">Der Typ des Kanals, hier Event.</param>
 /// <param name="creationDate">Das Erstellungsdatum des Events.</param>
 /// <param name="modiciationDate">Das Datum der letzten Änderung.</param>
 /// <param name="term">Das zugeordnete Semester.</param>
 /// <param name="locations">Ort, an dem das Event stattfindet.</param>
 /// <param name="dates">Termin, an dem das Event stattfindet.</param>
 /// <param name="contacts">Kontaktdaten von verantwortlichen Personen.</param>
 /// <param name="website">Ein oder mehrere Links auf Webseiten.</param>
 /// <param name="deleted">Gibt an, ob das Event als gelöscht markiert wurde.</param>
 /// <param name="cost">Die dem Event zugeordneten Kosten.</param>
 /// <param name="organizer">Der Veranstalter des Events.</param>
 public Event(int id, string name, string description, ChannelType type, DateTimeOffset creationDate, 
     DateTimeOffset modiciationDate, string term, string locations, string dates, string contacts, 
     string website, bool deleted, string cost, string organizer)
     : base(id, name, description, type, creationDate, modiciationDate, term, locations, dates, contacts, website, deleted)
 {
     this.cost = cost;
     this.organizer = organizer;
 }
开发者ID:ulm-university-news,项目名称:UlmUniversityNewsWindowsApp,代码行数:25,代码来源:Event.cs


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