Removed WinFormsDesigner because it's not being used.
This commit is contained in:
parent
19a710e080
commit
54d24a7b09
4 changed files with 13 additions and 17 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using ApplicationServices;
|
||||
using DataLayer;
|
||||
using Dinah.Core.Drawing;
|
||||
using FileManager;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -24,19 +25,19 @@ namespace LibationWinForms
|
|||
|
||||
private Book Book => LibraryBook.Book;
|
||||
private Image _cover;
|
||||
private PictureDefinition PictureDefinition { get; }
|
||||
|
||||
public GridEntry(LibraryBook libraryBook)
|
||||
{
|
||||
LibraryBook = libraryBook;
|
||||
|
||||
PictureDefinition = new PictureDefinition(Book.PictureId, PictureSize._80x80);
|
||||
_memberValues = CreateMemberValueDictionary();
|
||||
|
||||
//Get cover art. If it's default, subscribe to PictureCached
|
||||
var picDef = new FileManager.PictureDefinition(Book.PictureId, FileManager.PictureSize._80x80);
|
||||
(bool isDefault, byte[] picture) = FileManager.PictureStorage.GetPicture(picDef);
|
||||
(bool isDefault, byte[] picture) = PictureStorage.GetPicture(PictureDefinition);
|
||||
|
||||
if (isDefault)
|
||||
FileManager.PictureStorage.PictureCached += PictureStorage_PictureCached;
|
||||
PictureStorage.PictureCached += PictureStorage_PictureCached;
|
||||
|
||||
//Mutable property. Set the field so PropertyChanged isn't fired.
|
||||
_cover = ImageReader.ToImage(picture);
|
||||
|
|
@ -63,8 +64,9 @@ namespace LibationWinForms
|
|||
{
|
||||
if (pictureId == Book.PictureId)
|
||||
{
|
||||
Cover = WindowsDesktopUtilities.WinAudibleImageServer.GetImage(pictureId, FileManager.PictureSize._80x80);
|
||||
FileManager.PictureStorage.PictureCached -= PictureStorage_PictureCached;
|
||||
(_, byte[] picture) = PictureStorage.GetPicture(PictureDefinition);
|
||||
Cover = ImageReader.ToImage(picture);
|
||||
PictureStorage.PictureCached -= PictureStorage_PictureCached;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue