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));
        }
 private void UpdateAutoImages()
 {
     if (this.Document.Presenter.IsImageAutoGenerated)
     {
         if (this.Document.Presenter.IsInactiveImageAutoGenerated)
         {
             this.Document.Presenter.InactiveImage = null;
         }
         if (this.Document.Presenter.TargetPage != EntryPointPresenter.NoPage)
         {
             this.Document.Presenter.Image = this.Document.Presenter.TargetPage.GetImage();
             if (this.Document.Presenter.IsInactiveImageAutoGenerated)
             {
                 this.Document.Presenter.InactiveImage = this.Document.Presenter.TargetPage.GetNonFocusImage();
             }
         }
         else if (!string.IsNullOrEmpty(this.ExecutionUrlText.Text))
         {
             try
             {
                 this.Document.Presenter.Image = Shell.GenerateThumbnail(this.ExecutionUrlText.Text);
             }
             catch (Exception exception)
             {
                 Trace.TraceError(exception.ToString());
             }
             this.Document.Presenter.InactiveImage = null;
         }
         else if (this.Document.Presenter.Media.Count > 0)
         {
             MediaInfoPresenter presenter = this.Document.Presenter.Media.First <MediaInfoPresenter>();
             if (((MediaType)presenter.MediaInfo.MediaType) != MediaType.Dvd)
             {
                 this.Document.Presenter.Image = presenter.Image;
             }
             else
             {
                 string uri  = "res://ehres!STARTMENU.QUICKLINK.PLAYDVD.FOCUS.PNG";
                 string str2 = "res://ehres!STARTMENU.QUICKLINK.PLAYDVD.NOFOCUS.PNG";
                 this.Document.Presenter.Image = MediaCenterUtil.GetImageResource(VmcStudioUtil.Application.CommonResources.LibraryCache, uri);
                 if (this.Document.Presenter.IsInactiveImageAutoGenerated)
                 {
                     this.Document.Presenter.InactiveImage = MediaCenterUtil.GetImageResource(VmcStudioUtil.Application.CommonResources.LibraryCache, str2);
                 }
             }
         }
         else
         {
             this.Document.Presenter.Image = null;
         }
     }
 }
 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));
         }
     }
 }