C# 클래스 Bloom.BookThumbNailer

This class is a place to gather the methods that have to do with making thumbnails of pages of books. Three of the methods were previously methods of Book itself, but the fourth (MakeThumbnailOfCover) needed to do too much UI stuff to belong in a model class, so it seemed worth pulling all this out to a new class. In live code there is typically only one instance of this created by the ApplicationServer. In test code they may be created as needed; nothing requires this to be a singleton. Indeed, it could be a static class except that it requires the HtmlThumbNailer.
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 메소드들

메소드 설명
BookThumbNailer ( HtmlThumbNailer thumbNailer ) : System
GetThumbNailOfBookCover ( Book book, HtmlThumbNailer thumbnailOptions, Action callback, Action errorCallback, bool async ) : void
GetThumbnailForPage ( Book book, IPage page, bool isLandscape ) : Image

Currently used by the image server to get thumbnails that are used in the add page dialog. Since this dialog can show an enlarged version of the page, we generate these at a higher resolution than usual. Also, to make more realistic views of template pages we insert fake text wherever there is an empty edit block. The result is cached for possible future use so the caller should not dispose of it.

MakeThumbnailOfCover ( Book book, Control invokeTarget ) : void
MakeThumbnailOfCover ( Book book, int height, Control invokeTarget ) : void
RebuildThumbNailAsync ( Book book, HtmlThumbNailer thumbnailOptions, Image>.Action callback, Exception>.Action errorCallback ) : void

Will call either 'callback' or 'errorCallback' UNLESS the thumbnail is readonly, in which case it will do neither.

RebuildThumbNailNow ( Book book, HtmlThumbNailer thumbnailOptions ) : void

Will make a new thumbnail (or throw) UNLESS the thumbnail is readonly, in which case it will do nothing.

비공개 메소드들

메소드 설명
RebuildThumbNail ( Book book, HtmlThumbNailer thumbnailOptions, Image>.Action callback, Exception>.Action errorCallback, bool async ) : void

Will call either 'callback' or 'errorCallback' UNLESS the thumbnail is readonly, in which case it will do neither.

메소드 상세

BookThumbNailer() 공개 메소드

public BookThumbNailer ( HtmlThumbNailer thumbNailer ) : System
thumbNailer HtmlThumbNailer
리턴 System

GetThumbNailOfBookCover() 공개 메소드

public GetThumbNailOfBookCover ( Book book, HtmlThumbNailer thumbnailOptions, Action callback, Action errorCallback, bool async ) : void
book Bloom.Book.Book
thumbnailOptions HtmlThumbNailer
callback Action
errorCallback Action
async bool
리턴 void

GetThumbnailForPage() 공개 메소드

Currently used by the image server to get thumbnails that are used in the add page dialog. Since this dialog can show an enlarged version of the page, we generate these at a higher resolution than usual. Also, to make more realistic views of template pages we insert fake text wherever there is an empty edit block. The result is cached for possible future use so the caller should not dispose of it.
public GetThumbnailForPage ( Book book, IPage page, bool isLandscape ) : Image
book Bloom.Book.Book
page IPage
isLandscape bool
리턴 Image

MakeThumbnailOfCover() 공개 메소드

public MakeThumbnailOfCover ( Book book, Control invokeTarget ) : void
book Bloom.Book.Book
invokeTarget System.Windows.Forms.Control
리턴 void

MakeThumbnailOfCover() 공개 메소드

public MakeThumbnailOfCover ( Book book, int height, Control invokeTarget ) : void
book Bloom.Book.Book
height int
invokeTarget System.Windows.Forms.Control
리턴 void

RebuildThumbNailAsync() 공개 메소드

Will call either 'callback' or 'errorCallback' UNLESS the thumbnail is readonly, in which case it will do neither.
public RebuildThumbNailAsync ( Book book, HtmlThumbNailer thumbnailOptions, Image>.Action callback, Exception>.Action errorCallback ) : void
book Bloom.Book.Book
thumbnailOptions HtmlThumbNailer
callback Image>.Action
errorCallback Exception>.Action
리턴 void

RebuildThumbNailNow() 공개 메소드

Will make a new thumbnail (or throw) UNLESS the thumbnail is readonly, in which case it will do nothing.
public RebuildThumbNailNow ( Book book, HtmlThumbNailer thumbnailOptions ) : void
book Bloom.Book.Book
thumbnailOptions HtmlThumbNailer
리턴 void