Exemple #1
0
 private void InitializeMediaPlayer(ProgramItem programItem, bool autoplay = false)
 {
     mediaPlayer.URL     = programItem.FilePath;
     lblCurrentItem.Text = programItem.FilePath;
     if (!autoplay)
     {
         mediaPlayer.Ctlcontrols.stop();
     }
 }
Exemple #2
0
 private void lvProgramItems_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (IsMediaPlaying)
     {
         if (e.IsSelected)
         {
             e.Item.Selected = false;
         }
     }
     selectedItem = (ProgramItem)e.Item.Tag;
     if (!IsMediaPlaying)
     {
         InitializeMediaPlayer(selectedItem);
     }
 }