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


C# ITrack类代码示例

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


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

示例1: WaitForIsLoaded

 private static void WaitForIsLoaded(ITrack track, CancellationToken cancellationToken)
 {
     while (!track.IsLoaded() || cancellationToken.IsCancellationRequested)
     {
         Task.Delay(250, cancellationToken);
     }
 }
开发者ID:kfazi,项目名称:SpotifyHeadlessPlayer,代码行数:7,代码来源:TrackExtensions.cs

示例2: Reorder

 private static void Reorder(ITrack track)
 {
     for (var i = 0; i < track.MediaItems.Count; i++)
     {
         track.MediaItems[i].Order = i;
     }
 }
开发者ID:AugustinasNomicas,项目名称:MultitrackPlayer,代码行数:7,代码来源:MediaItemsReorder.cs

示例3: SetTrack

 /// <summary>
 /// Sets the interval's track</summary>
 /// <param name="interval">Interval to move to a new track</param>
 /// <param name="newTrack">New track that becomes the owner of this interval,
 /// or null if there is no new owning track</param>
 /// <remarks>
 /// SetTrack DOES NOT by itself set the interval's Track property!
 /// This happens indirectly and only if ITrack is implemented correctly.
 /// 
 /// If the interval and new track are DomNodes AND Intervals are DOM-children of their track,
 /// you can implement the Track property like this:
 /// public ITrack Track { get { return GetParentAs&lt;ITrack>(); } }
 /// 
 /// Otherwise, use an ObservableCollection for your Intervals list,
 /// monitor changes and update the interval's Track property when
 /// intervals are being added to or removed from a Track.
 /// </remarks>
 public static void SetTrack(this IInterval interval, ITrack newTrack)
 {
     ITrack currentTrack = interval.Track;
     if (currentTrack != null)
         currentTrack.Intervals.Remove(interval);
     if (newTrack != null)
         newTrack.Intervals.Add(interval);
 }
开发者ID:BeRo1985,项目名称:LevelEditor,代码行数:25,代码来源:IInterval.cs

示例4: Track

        public Track(ITrack track, Dispatcher dispatcher)
        {
            InternalTrack = track;

            _album = new Lazy<Album>(() => new Album(InternalTrack.Album, dispatcher));
            _artists = new Lazy<IEnumerable<Artist>>(() => InternalTrack.Artists.Select(artist => new Artist(artist, dispatcher)));
            _duration = new Lazy<TimeSpan>(() => InternalTrack.Duration);
        }
开发者ID:krikelin,项目名称:torshify-client,代码行数:8,代码来源:Track.cs

示例5: Update

        public void Update(TimeSpan dt, ITrack track)
        {
            _position += _velocity * dt.TotalSeconds;
            while (_position > track.Length) _position -= track.Length;

            var tmp = PositionUpdated;
            if (tmp != null) tmp(this);
        }
开发者ID:vidstige,项目名称:URT,代码行数:8,代码来源:Car.cs

示例6: Track

        public Track(ITrack track, Dispatcher dispatcher)
        {
            _dispatcher = dispatcher;
            InternalTrack = track;

            _album = new Lazy<Album>(() => new Album(InternalTrack.Album, _dispatcher));
            _artists = new Lazy<IEnumerable<Artist>>(GetArtists);
            _duration = new Lazy<TimeSpan>(() => InternalTrack.Duration);
        }
开发者ID:torshy,项目名称:torshify-client,代码行数:9,代码来源:Track.cs

示例7: GetIcon

        private static object GetIcon(ITrack track)
        {
            //if (track.TargetType == MediaType.AudioMpeg)
            //{
            //    return "pack://application:,,,/Images/File Audio MP3-01.png";
            //}

            return "pack://application:,,,/Images/File Audio-01.png";
        }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:9,代码来源:TrackViewModel.cs

示例8: PlayOrQueue

        public void PlayOrQueue(ITrack track)
        {
            Append(track);

            if (Index < 0)
            {
                Index = 0;
                Play();
            }
        }
开发者ID:TilmannBach,项目名称:cloudmusic2upnp,代码行数:10,代码来源:Playlist.cs

示例9: SongPlay

        public override void SongPlay(ITrack track)
        {
            if (_client != null)
            {
                var foundChannel = CurrentServer?.TextChannels.First(d => d.Name == "bot_tests");
                foundChannel.SendMessage("Now Playing: " + track.Name + " by " + track.Artists[0].Name);

                _providerConverted = null;
            }
        }
开发者ID:jmazouri,项目名称:Picofy,代码行数:10,代码来源:PicofyDiscord.cs

示例10: TrackStarted

        public TrackStarted(IRoom room, ITrack track)
        {
            if (room == null)
                throw new ArgumentNullException(nameof(room));
            if (track == null)
                throw new ArgumentNullException(nameof(track));

            TrackId = track.Id;
            RoomId = room.Id;
        }
开发者ID:jpmarr,项目名称:kookbox,代码行数:10,代码来源:TrackStarted.cs

示例11: Track

 public Track(ITrack track)
 {
     Name = track.Name;
     Artists = track.Artists.Select(a => new Artist(a)).ToArray();
     Album = track.Album.Name;
     Length = track.Duration;
     IsAvailable = track.IsAvailable;
     Popularity = track.Popularity;
     IsStarred = track.IsStarred;
 }
开发者ID:skomski,项目名称:SpotiFire,代码行数:10,代码来源:Track.cs

示例12: AddTrack

 public void AddTrack(ITrack nuTrack)
 {
     // do some checking
     // perhaps the movie needs to get longer!
     if (GetTrackByTrackId(nuTrack.TrackMetaData.TrackId) != null)
     {
         // We already have a track with that trackId. Create a new one
         nuTrack.TrackMetaData.TrackId = GetNextTrackId();
     }
     Tracks.Add(nuTrack);
 }
开发者ID:langhuihui,项目名称:csharprtmp,代码行数:11,代码来源:Movie.cs

示例13: Equals

 public bool Equals(ITrack track)
 {
     iTunesTrack typeTrack = track as iTunesTrack;
     if (typeTrack != null &&
         typeTrack.m_track.TrackDatabaseID == m_track.TrackDatabaseID)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:kring,项目名称:Voodoo-Voice,代码行数:13,代码来源:iTunesTrack.cs

示例14: BuildMediaItemsTimelineTrackViewModel

        private TrackViewModel BuildMediaItemsTimelineTrackViewModel(ITrack track, MediaItemsTimelineViewModel mediaItemsTimelineViewModel)
        {
            var trackViewModel = new TrackViewModel {
                MediaItems = new ObservableCollection<MediaItemViewModel>(),
                Track = track
            };

            trackViewModel.DropHandler = new TrackViewModelDropHandler(trackViewModel);

            CollectionObserver.BindCollection(trackViewModel.MediaItems,
                                              track.MediaItems,
                                              mediaItem => BuildMediaItemsTimelineMediaItemViewModel(mediaItem, mediaItemsTimelineViewModel, trackViewModel));
            return trackViewModel;
        }
开发者ID:AugustinasNomicas,项目名称:MultitrackPlayer,代码行数:14,代码来源:MultitrackPlayerController.cs

示例15: TrackSimplifier

 public ITrack TrackSimplifier(ITrack track)
 {
     List<ITrackSegment> simplifiedSegmnet = new List<ITrackSegment>();
     foreach (ITrackSegment segment in track.TrackSegments)
     {
         simplifiedSegmnet.Add(SimplifySegment(segment));
     }
     track.TrackSegments.Clear();
     foreach (ITrackSegment segmnet in simplifiedSegmnet)
     {
         track.TrackSegments.Add(segmnet);
     }
     return track;
 }
开发者ID:chinnisuraj1984,项目名称:navigational,代码行数:14,代码来源:Services.cs


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