private void axWindowsMediaPlayer1_MediaChange(object sender, _WMPOCXEvents_MediaChangeEvent e)
        {
            //AxWindowsMediaPlayer wmp = (AxWindowsMediaPlayer)sender;

            //if (ActiveUser.GetQueue().Count() != 0)
            //{
            //    ActiveMedia = ActiveUser.GetQueue().Dequeue();
            //}
            //Media media = Spotflix.FindMedia(ActiveMedia.GetFileName());
            //MediaControl.PlayMedia(media, axWindowsMediaPlayer1, MediaPlayingLabel, ArtistPlayingLabel);
            //string mediaName = media.GetMetadata().GetName();
            //string creator;
            //if (media.GetType() == typeof(Song))
            //{
            //    creator = media.GetMetadata().GetArtist();
            //}
            //else
            //{
            //    creator = media.GetMetadata().GetCreator();
            //}


            //ArtistPlayingLabel.Text = creator;
            //MediaPlayingLabel.Text = mediaName;
        }
Esempio n. 2
0
 void WindowsMediaPlayer部品_MediaChange(object sender, _WMPOCXEvents_MediaChangeEvent e)
 {
     if (メディア情報が変更された != null)
     {
         media = new メディア情報(e.item as IWMPMedia);
         メディア情報が変更された(this, EventArgs.Empty);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Player media change event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event.</param>
 private void player_MediaChange(object sender, _WMPOCXEvents_MediaChangeEvent e)
 {
     if (DateTime.Now > this.MPlayer.Value.LastUpdate.AddSeconds(2))
     {
         if (loadVid)
         {
             PackageHost.PushStateObject("CurrentPlaylist", GetPlaylist());
             PackageHost.PushStateObject("CurrentSong", new TupleList <string, string, string> {
                 { player.currentMedia.getItemInfo("Author"), player.currentMedia.getItemInfo("Album"), player.currentMedia.getItemInfo("Title") }
             });
         }
     }
 }
Esempio n. 4
0
 internal void RaiseOnMediaChange(object sender, _WMPOCXEvents_MediaChangeEvent e)
 {
     if ((this.MediaChange != null)) {
         this.MediaChange(sender, e);
     }
 }
Esempio n. 5
0
 public virtual void MediaChange(object item)
 {
     _WMPOCXEvents_MediaChangeEvent mediachangeEvent = new _WMPOCXEvents_MediaChangeEvent(item);
     this.parent.RaiseOnMediaChange(this.parent, mediachangeEvent);
 }