diff --git a/Libation.sln b/Libation.sln index 191ce50a..9de9110b 100644 --- a/Libation.sln +++ b/Libation.sln @@ -52,6 +52,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AudibleApi.Tests", "..\audi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibationWinForms", "LibationWinForms\LibationWinForms.csproj", "{635F00E1-AAD1-45F7-BEB7-D909AD33B9F6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsDesigner", "WinFormsDesigner\WinFormsDesigner.csproj", "{0807616A-A77A-4B08-A65A-1582B09E114B}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dinah.Core", "..\Dinah.Core\Dinah.Core\Dinah.Core.csproj", "{9E951521-2587-4FC6-AD26-FAA9179FB6C4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dinah.EntityFrameworkCore", "..\Dinah.Core\Dinah.EntityFrameworkCore\Dinah.EntityFrameworkCore.csproj", "{1255D9BA-CE6E-42E4-A253-6376540B9661}" @@ -144,6 +146,10 @@ Global {635F00E1-AAD1-45F7-BEB7-D909AD33B9F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {635F00E1-AAD1-45F7-BEB7-D909AD33B9F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {635F00E1-AAD1-45F7-BEB7-D909AD33B9F6}.Release|Any CPU.Build.0 = Release|Any CPU + {0807616A-A77A-4B08-A65A-1582B09E114B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0807616A-A77A-4B08-A65A-1582B09E114B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0807616A-A77A-4B08-A65A-1582B09E114B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0807616A-A77A-4B08-A65A-1582B09E114B}.Release|Any CPU.Build.0 = Release|Any CPU {9E951521-2587-4FC6-AD26-FAA9179FB6C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9E951521-2587-4FC6-AD26-FAA9179FB6C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E951521-2587-4FC6-AD26-FAA9179FB6C4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -226,6 +232,7 @@ Global {7EA01F9C-E579-4B01-A3B9-733B49DD0B60} = {7FBBB086-0807-4998-85BF-6D1A49C8AD05} {111420E2-D4F0-4068-B46A-C4B6DCC823DC} = {38E6C6D9-963A-4C5B-89F4-F2F14885ADFD} {635F00E1-AAD1-45F7-BEB7-D909AD33B9F6} = {8679CAC8-9164-4007-BDD2-F004810EDA14} + {0807616A-A77A-4B08-A65A-1582B09E114B} = {8679CAC8-9164-4007-BDD2-F004810EDA14} {9E951521-2587-4FC6-AD26-FAA9179FB6C4} = {43E3ACB3-E0BC-4370-8DBB-E3720C8C8FD1} {1255D9BA-CE6E-42E4-A253-6376540B9661} = {43E3ACB3-E0BC-4370-8DBB-E3720C8C8FD1} {35803735-B669-4090-9681-CC7F7FABDC71} = {7FBBB086-0807-4998-85BF-6D1A49C8AD05} diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index 973ba77e..7cda4a7d 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 5.4.9.141 + 5.4.9.140 diff --git a/LibationWinForms/BookLiberation/ProcessorAutomationController.cs b/LibationWinForms/BookLiberation/ProcessorAutomationController.cs index 107f33ed..7496d81a 100644 --- a/LibationWinForms/BookLiberation/ProcessorAutomationController.cs +++ b/LibationWinForms/BookLiberation/ProcessorAutomationController.cs @@ -281,15 +281,14 @@ namespace LibationWinForms.BookLiberation #endregion #region Set initially displayed book properties from library info. - decryptDialog.SetTitle(actionName, libraryBook.Book.Title); decryptDialog.SetAuthorNames(string.Join(", ", libraryBook.Book.Authors)); decryptDialog.SetNarratorNames(string.Join(", ", libraryBook.Book.NarratorNames)); decryptDialog.SetCoverImage( - WindowsDesktopUtilities.WinAudibleImageServer - .GetImage( + WindowsDesktopUtilities.WinAudibleImageServer.GetImage( libraryBook.Book.PictureId, - FileManager.PictureSize._80x80)); + FileManager.PictureSize._80x80 + )); #endregion #region define how model actions will affect form behavior diff --git a/LibationWinForms/GridEntry.cs b/LibationWinForms/GridEntry.cs index b64a9530..ae04e870 100644 --- a/LibationWinForms/GridEntry.cs +++ b/LibationWinForms/GridEntry.cs @@ -1,7 +1,6 @@ using ApplicationServices; using DataLayer; using Dinah.Core.Drawing; -using FileManager; using System; using System.Collections; using System.Collections.Generic; @@ -25,19 +24,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 - (bool isDefault, byte[] picture) = PictureStorage.GetPicture(PictureDefinition); + var picDef = new FileManager.PictureDefinition(Book.PictureId, FileManager.PictureSize._80x80); + (bool isDefault, byte[] picture) = FileManager.PictureStorage.GetPicture(picDef); if (isDefault) - PictureStorage.PictureCached += PictureStorage_PictureCached; + FileManager.PictureStorage.PictureCached += PictureStorage_PictureCached; //Mutable property. Set the field so PropertyChanged isn't fired. _cover = ImageReader.ToImage(picture); @@ -64,9 +63,8 @@ namespace LibationWinForms { if (pictureId == Book.PictureId) { - (_, byte[] picture) = PictureStorage.GetPicture(PictureDefinition); - Cover = ImageReader.ToImage(picture); - PictureStorage.PictureCached -= PictureStorage_PictureCached; + Cover = WindowsDesktopUtilities.WinAudibleImageServer.GetImage(pictureId, FileManager.PictureSize._80x80); + FileManager.PictureStorage.PictureCached -= PictureStorage_PictureCached; } }