예제 #1
0
        private void AddDvdButtonClick(object sender, RoutedEventArgs e)
        {
            DriveInfo dataContext = (DriveInfo)((FrameworkElement)sender).DataContext;
            MediaInfo media       = new MediaInfo
            {
                Url       = string.Format("DVD://{0}:/video_ts", dataContext.Name.Substring(0, 1)),
                MediaType = Microsoft.MediaCenter.MediaType.Dvd
            };

            this.Document.Presenter.Media.Add(MediaInfoPresenter.Create(media));
        }
예제 #2
0
 private void InsertResource(string[] files, MediaType mediaType)
 {
     if (files != null)
     {
         foreach (string str in files)
         {
             MediaInfo media = new MediaInfo
             {
                 MediaType = new MediaType?(mediaType),
                 Url       = str
             };
             this.Document.Presenter.Media.Add(MediaInfoPresenter.Create(media));
         }
     }
 }