/// <summary> /// Called when the internal templates are loaded. /// This is a good time to retrieve references to the internal parts of this control. /// </summary> public override void OnApplyTemplate() { base.OnApplyTemplate(); Logger.LogInfo("Applying template"); mainViewer = this.Template.FindName("PART_MainViewer", this) as PdfViewerComponent; outlinesView = this.Template.FindName("PART_OutlinesView", this) as OutlinesView; thumbnailView = this.Template.FindName("PART_ThumbnailView", this) as ThumbnailView; navigationTabControl = this.Template.FindName("PART_NavigationTabControl", this) as TabControl; thumbnailTabItem = this.Template.FindName("PART_ThumbnailViewTab", this) as TabItem; outlinesTabItem = this.Template.FindName("PART_OutlinesViewTab", this) as TabItem; grid = this.Template.FindName("PART_MainGrid", this) as Grid; outlinesView.SetController(controller); thumbnailView.SetController(controller); pane.SetController(controller); mainViewer.SetController(controller); mainViewer.SetViewerPane(pane); pane.MouseModeChanged += OnMouseModeChanged; navigationTabControl.SelectionChanged += NavigationTabControlSelectionChangedEventHandler; ApplySelectedViewerTab(); ShowOutlines = _showOutlines; ShowThumbnails = _showThumbnails; pane.Focus(); Logger.LogInfo("Template applied"); }
/// <summary> /// Select the given thumb /// </summary> /// <param name="tv">Thumbnail view.</param> /// <param name="page">A 0-based index to the page to select</param> private void SelectThumb(ThumbnailView tv, int page) { if (tv == null || tv.Items[page].Selected) { return; } tv.ClearSelection(); tv.Items[page].Selected = true; tv.ScrollTo(page); }
void ReleaseDesignerOutlets() { if (AlbumArtView != null) { AlbumArtView.Dispose(); AlbumArtView = null; } if (BlurOverlay != null) { BlurOverlay.Dispose(); BlurOverlay = null; } if (TrackName != null) { TrackName.Dispose(); TrackName = null; } if (ArtistName != null) { ArtistName.Dispose(); ArtistName = null; } if (InstrumentalTag != null) { InstrumentalTag.Dispose(); InstrumentalTag = null; } if (PlayerIcon != null) { PlayerIcon.Dispose(); PlayerIcon = null; } if (ThumbnailView != null) { ThumbnailView.Dispose(); ThumbnailView = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }
private void DrawThum() { thumView = Panel.gameObject.AddComponent <ThumbnailView>(); thumView.CreateThumbnailView(Panel.gameObject, new Vector3(0f, 0f, 0), new Vector3(146f, 382f, 0f), EquipBigSprite); }
public IImage GetThumbnail() { if (thumbnail == null) { thumbnail = renderService.CreateRenderTargetImage(ThumbnailSize); renderService.Render(thumbnail, new [] { Viewport.Create(IntVector2.Zero, ThumbnailSize, ThumbnailView.Create(this)) }, 0); } else if (thumbnailDirty) { renderService.Render(thumbnail, new[] { Viewport.Create(IntVector2.Zero, ThumbnailSize, ThumbnailView.Create(this)) }, 0); } thumbnailDirty = false; return(thumbnail); }
private void selectAllBtn_Click(object sender, RoutedEventArgs e) { ThumbnailView.SelectAll(); }
void ReleaseDesignerOutlets() { if (ProgressBar != null) { ProgressBar.Dispose(); ProgressBar = null; } if (ProgressBackground != null) { ProgressBackground.Dispose(); ProgressBackground = null; } if (MainScroll != null) { MainScroll.Dispose(); MainScroll = null; } if (LyricsTextView != null) { LyricsTextView.Dispose(); LyricsTextView = null; } if (AlbumArtView != null) { AlbumArtView.Dispose(); AlbumArtView = null; } if (BlurOverlay != null) { BlurOverlay.Dispose(); BlurOverlay = null; } if (TrackName != null) { TrackName.Dispose(); TrackName = null; } if (ArtistName != null) { ArtistName.Dispose(); ArtistName = null; } if (ThumbnailView != null) { ThumbnailView.Dispose(); ThumbnailView = null; } if (PlayerIcon != null) { PlayerIcon.Dispose(); PlayerIcon = null; } if (ExplicitTag != null) { ExplicitTag.Dispose(); ExplicitTag = null; } if (OpenInBrowserButton != null) { OpenInBrowserButton.Dispose(); OpenInBrowserButton = null; } if (ChangeTextSizeButton != null) { ChangeTextSizeButton.Dispose(); ChangeTextSizeButton = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }
/// <summary> /// A class to highlight pdf documents that are in an annotation viewer and have a thumbnail viewer /// </summary> /// <param name="viewer">An annotation viewer with one layer for putting highlights on</param> /// <param name="thumbnailViewer">An optional thumbnail viewer (can be null)</param> public PdfFindHighlighter(AnnotateViewer viewer, ThumbnailView thumbnailViewer) { _viewer = viewer; _thumbnailViewer = thumbnailViewer; }