public ImageSource GetNonFocusImage() { if (this.nonFocusImageResource == null) { return((ImageSource)null); } else { return(MediaCenterUtil.GetImageResource((IResourceLibraryCache)VmcStudioUtil.Application.CommonResources.LibraryCache, this.nonFocusImageResource)); } }
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 ImageSource GetImage(string resourceUrl) { ImageSource imageResource; if (!this.images.TryGetValue(resourceUrl, out imageResource)) { imageResource = MediaCenterUtil.GetImageResource((IResourceLibraryCache)this.cache, resourceUrl); this.images[resourceUrl] = imageResource; if (imageResource == null) { Trace.TraceWarning("Could not find image resource: {0}", new object[1] { (object)resourceUrl }); } } return(imageResource); }