C# Class Bloom.CollectionTab.LibraryModel

Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Private Properties

Property Type Description
CreateFromSourceBook void
GetBookCollectionsOnce IEnumerable
GetBookReplacedWithTemplate string
GetMetaJsonModfiedForTemplate string

Public Methods

Method Description
AttemptMissingImageReplacements ( string pathToFolderOfReplacementImages = null ) : void
BringBookUpToDate ( ) : void
DeleteBook ( Book book ) : bool
DoChecksOfAllBooks ( ) : void
DoChecksOfAllBooksBackgroundWork ( ProgressDialogBackground dialog, string pathToFolderOfReplacementImages ) : void
DoUpdatesOfAllBooks ( ) : void
DoUpdatesOfAllBooks ( IProgress progress ) : void
DoubleClickedBook ( ) : void
ExportDocFormat ( string path ) : void

All we do at this point is make a file with a ".doc" extension and open it.

The .doc extension allows the operating system to recognize which program should open the file, and the program (whether Microsoft Word or LibreOffice or OpenOffice) seems to handle HTML content just fine.

ExportInDesignXml ( string path ) : void
GetBookCollections ( ) : List
GetBookFromBookInfo ( BookInfo bookInfo ) : Book.Book
GetSuggestedBloomPackPath ( ) : string
LibraryModel ( string pathToLibrary, CollectionSettings collectionSettings, BookSelection bookSelection, SourceCollectionsList sourceCollectionsList, BookCollection bookCollectionFactory, EditBookCommand editBookCommand, CreateFromSourceBookCommand createFromSourceBookCommand, BookServer bookServer, CurrentEditableCollectionSelection currentEditableCollectionSelection, BookThumbNailer thumbNailer ) : System
MakeBloomPack ( string path, bool forReaderTools = false ) : void
OpenFolderOnDisk ( ) : void
ReloadCollections ( ) : void
SelectBook ( Book book ) : void
UpdateThumbnailAsync ( Book book, HtmlThumbNailer thumbnailOptions, Image>.Action callback, Exception>.Action errorCallback ) : void

Protected Methods

Method Description
CompressDirectory ( string directoryPath, ZipOutputStream zipStream, int dirNameOffest, bool forReaderTools ) : void

Adds a directory, along with all files and subdirectories, to the ZipStream.

Protected for testing purposes

Private Methods

Method Description
CreateFromSourceBook ( Book sourceBook ) : void
GetBookCollectionsOnce ( ) : IEnumerable
GetBookReplacedWithTemplate ( string bookPath ) : string

Does some pre-processing on reader files

GetMetaJsonModfiedForTemplate ( string path ) : string

Method Details

AttemptMissingImageReplacements() public method

public AttemptMissingImageReplacements ( string pathToFolderOfReplacementImages = null ) : void
pathToFolderOfReplacementImages string
return void

BringBookUpToDate() public method

public BringBookUpToDate ( ) : void
return void

CompressDirectory() protected static method

Adds a directory, along with all files and subdirectories, to the ZipStream.
Protected for testing purposes
protected static CompressDirectory ( string directoryPath, ZipOutputStream zipStream, int dirNameOffest, bool forReaderTools ) : void
directoryPath string The directory to add recursively
zipStream ICSharpCode.SharpZipLib.Zip.ZipOutputStream The ZipStream to which the files and directories will be added
dirNameOffest int This number of characters will be removed from the full directory or file name /// before creating the zip entry name
forReaderTools bool If True, then some pre-processing will be done to the contents of decodable /// and leveled readers before they are added to the ZipStream
return void

DeleteBook() public method

public DeleteBook ( Book book ) : bool
book Bloom.Book.Book
return bool

DoChecksOfAllBooks() public method

public DoChecksOfAllBooks ( ) : void
return void

DoChecksOfAllBooksBackgroundWork() public method

public DoChecksOfAllBooksBackgroundWork ( ProgressDialogBackground dialog, string pathToFolderOfReplacementImages ) : void
dialog Bloom.ToPalaso.ProgressDialogBackground
pathToFolderOfReplacementImages string
return void

DoUpdatesOfAllBooks() public method

public DoUpdatesOfAllBooks ( ) : void
return void

DoUpdatesOfAllBooks() public method

public DoUpdatesOfAllBooks ( IProgress progress ) : void
progress IProgress
return void

DoubleClickedBook() public method

public DoubleClickedBook ( ) : void
return void

ExportDocFormat() public method

All we do at this point is make a file with a ".doc" extension and open it.
The .doc extension allows the operating system to recognize which program should open the file, and the program (whether Microsoft Word or LibreOffice or OpenOffice) seems to handle HTML content just fine.
public ExportDocFormat ( string path ) : void
path string
return void

ExportInDesignXml() public method

public ExportInDesignXml ( string path ) : void
path string
return void

GetBookCollections() public method

public GetBookCollections ( ) : List
return List

GetBookFromBookInfo() public method

public GetBookFromBookInfo ( BookInfo bookInfo ) : Book.Book
bookInfo Bloom.Book.BookInfo
return Book.Book

GetSuggestedBloomPackPath() public method

public GetSuggestedBloomPackPath ( ) : string
return string

LibraryModel() public method

public LibraryModel ( string pathToLibrary, CollectionSettings collectionSettings, BookSelection bookSelection, SourceCollectionsList sourceCollectionsList, BookCollection bookCollectionFactory, EditBookCommand editBookCommand, CreateFromSourceBookCommand createFromSourceBookCommand, BookServer bookServer, CurrentEditableCollectionSelection currentEditableCollectionSelection, BookThumbNailer thumbNailer ) : System
pathToLibrary string
collectionSettings Bloom.Collection.CollectionSettings
bookSelection Bloom.Book.BookSelection
sourceCollectionsList SourceCollectionsList
bookCollectionFactory Bloom.Collection.BookCollection
editBookCommand EditBookCommand
createFromSourceBookCommand CreateFromSourceBookCommand
bookServer Bloom.Book.BookServer
currentEditableCollectionSelection Bloom.Book.CurrentEditableCollectionSelection
thumbNailer BookThumbNailer
return System

MakeBloomPack() public method

public MakeBloomPack ( string path, bool forReaderTools = false ) : void
path string
forReaderTools bool
return void

OpenFolderOnDisk() public method

public OpenFolderOnDisk ( ) : void
return void

ReloadCollections() public method

public ReloadCollections ( ) : void
return void

SelectBook() public method

public SelectBook ( Book book ) : void
book Bloom.Book.Book
return void

UpdateThumbnailAsync() public method

public UpdateThumbnailAsync ( Book book, HtmlThumbNailer thumbnailOptions, Image>.Action callback, Exception>.Action errorCallback ) : void
book Bloom.Book.Book
thumbnailOptions HtmlThumbNailer
callback Image>.Action
errorCallback Exception>.Action
return void