示例#1
0
 public void ForceNowPlayingBroadcast()
 {
     lock (monitor)
     {
         if (queue != null)
         {
             NowPlayingPacket packet = new NowPlayingPacket(queue[Index]);
             GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <NowPlayingPacket>(packet);
         }
     }
 }
示例#2
0
 /// <summary>
 /// Handle NowPlayingPacket. Fill own properties with received data
 /// </summary>
 /// <param name="packet">Object containting every kind of information about the song</param>
 private void ReceiveMessage(NowPlayingPacket packet)
 {
     nowPlayingLenght = packet.Length;
     NowPlayingTrack  = packet.Title.Equals("") ? packet.Path.Split('\\').Last(): packet.Title;
     NowPlayingArtist = packet.Artist;
     NowPlayingAlbum  = packet.Album;
     TimeEllapsed     = 0;
     IsPlaying        = true;
     if (!progressTimer.IsEnabled)
     {
         progressTimer.Start();
     }
 }
示例#3
0
 private void ReceiveMessage(NowPlayingPacket packet)
 {
     Task.Factory.StartNew(() =>
     {
         foreach (SongModel sm in SongList)
         {
             if (packet.Path.Equals(sm.Path))
             {
                 sm.NowPlaying = true;
             }
             else
             {
                 sm.NowPlaying = false;
             }
         }
     });
 }
示例#4
0
 private void ReceiveMessage(NowPlayingPacket packet)
 {
     nowPlayingPath = packet.Path;
 }
示例#5
0
 private void ReceiveMessage(NowPlayingPacket packet)
 {
     AlbumArtImg = packet.AlbumArt;
 }