![]() I hope you will enjoy it as much as I do. Many thanks to SevenZip which allows me to uncompress in memory. That was the other major point because I put myself in a hurry when I saw the performance " src="" /> but it works. This was the same with the rar stream.I got the message: "header corrupted". I found a solution by going through two MemoryStreams before creating the BitmapImage. I don't know why but BitmapImage is not serializable. I was unable to reload the saved catalog covers into the binary file. Then, I add threads for cover generation and binary reading. ![]() I just use a simple theme from the WPF toolkit provided on CodePlex to skin the application. WPF is used as the rendering surface, but no special effects are used because it a pain in terms of performance. See the constructor and the GenerateCover function. When it's the first loading, I parse the directories, and construct the book with the second parameter set to true to generate its cover in a thread. MemoryStream stream2 = new MemoryStream() ĭispatcherPriority.Normal, (ThreadStart) delegate (MemoryStream)formatter.Deserialize(streamBin) String filePath = ( string)formatter.Deserialize(streamBin) book count int count = ( int)formatter.Deserialize(streamBin) Stream streamBin = new FileStream(( string)fileName, IFormatter formatter = new BinaryFormatter() WPF brings the big advantage of advanced binding, and I use the ObservableCollection so I can notify later that some properties have changed, like the cover images which are loaded after the collection and the binding. ParameterizedThreadStart(ParseDirectory)) New ParameterizedThreadStart(LoadCovers)) Įlse // binary files does not exist, parse the directory load the cover images Thread t = new Thread( load the book name and bookmark if (LoadBooks(bin)) Once a book is open, display the pages inside and the folder structure.Being quick because of zipped content access, implement image cache management.Reading a book, placing the bookmark on a current page, and restoring it.Manage the book library, by parsing a specified folder, displaying the cover pages.The application (in my opinion) has to fulfill the following: It's more an experiment than anything else the solution is clean but not perfect. I decided to use this project to experiment more on WPF, and its graphic capacity fits the needs and helps fulfill the missing functionalities. They unzip pages on the disk, or hang between pages, or do not manage the library, etc. Why this project? There are so many e-book readers already available, but none of them suited my requirements. This article is obsolete, Please check out the new publication: CodeProject article I am also interested in 7 phone development, so I took the idea of dynamic books that I have seen on an iphone application. I decided to rewrite it to explore a bit more about the MVVM pattern and extend it to another ebook format. With the "success" of this first project and some spare time, I started a complete new version hosted on the same CodePlex project. ![]() Download latest version of source code (external link).What’s more? If you’re an Amazon Prime member, you can enjoy complimentary access to 1,000 books, magazines, comics, and more. ![]() But if you want to get free books, you can try Kindle Unlimited, which gives you unrestricted access to a range of ebooks at one affordable monthly price. I appreciate that there is no mandatory subscription, and you can even add your books to read. So, it’s easy to switch between reading and listening or enjoy both simultaneously for an engaging experience. Moreover, no matter how many books you’re reading at a time, it remembers your spot in each so you can seamlessly pick up where you left off.įurther, it doubles up as an audiobook app with access to Audible narrations at low prices. I love how you can adjust the display brightness, font size, and colors for eye comfort. It offers the largest collection of millions of books, newspapers, and magazines from across the world. The Amazon Kindle app changed how I read by making it convenient to access my entire library on my iPhone or iPad.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |