From 84a8fb0074bcaf2c52b53260bd6200b45cc58e20 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Sat, 14 May 2022 16:13:19 -0600 Subject: [PATCH] Minor refactor --- Source/LibationWinForms/ProcessQueue/ProcessBook.cs | 9 +-------- .../LibationWinForms/ProcessQueue/ProcessBookControl.cs | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/LibationWinForms/ProcessQueue/ProcessBook.cs b/Source/LibationWinForms/ProcessQueue/ProcessBook.cs index d0f158e4..edae6212 100644 --- a/Source/LibationWinForms/ProcessQueue/ProcessBook.cs +++ b/Source/LibationWinForms/ProcessQueue/ProcessBook.cs @@ -47,7 +47,6 @@ namespace LibationWinForms.ProcessQueue private string _bookText; private int _progress; private TimeSpan _timeRemaining; - private LibraryBook _libraryBook; private Image _cover; public ProcessBookResult Result { get => _result; private set { _result = value; NotifyPropertyChanged(); } } @@ -55,10 +54,9 @@ namespace LibationWinForms.ProcessQueue public string BookText { get => _bookText; private set { _bookText = value; NotifyPropertyChanged(); } } public int Progress { get => _progress; private set { _progress = value; NotifyPropertyChanged(); } } public TimeSpan TimeRemaining { get => _timeRemaining; private set { _timeRemaining = value; NotifyPropertyChanged(); } } - public LibraryBook LibraryBook { get => _libraryBook; private set { _libraryBook = value; NotifyPropertyChanged(); } } public Image Cover { get => _cover; private set { _cover = value; NotifyPropertyChanged(); } } - + public LibraryBook LibraryBook { get; private set; } private Processable CurrentProcessable => _currentProcessable ??= Processes.Dequeue().Invoke(); private Processable NextProcessable() => _currentProcessable = null; private Processable _currentProcessable; @@ -284,11 +282,6 @@ namespace LibationWinForms.ProcessQueue title = libraryBook.Book.Title; authorNames = libraryBook.Book.AuthorNames(); narratorNames = libraryBook.Book.NarratorNames(); - Cover = Dinah.Core.Drawing.ImageReader.ToImage(PictureStorage.GetPicture( - new PictureDefinition( - libraryBook.Book.PictureId, - PictureSize._80x80)).bytes); - updateBookInfo(); } diff --git a/Source/LibationWinForms/ProcessQueue/ProcessBookControl.cs b/Source/LibationWinForms/ProcessQueue/ProcessBookControl.cs index a31b8a86..7eee6913 100644 --- a/Source/LibationWinForms/ProcessQueue/ProcessBookControl.cs +++ b/Source/LibationWinForms/ProcessQueue/ProcessBookControl.cs @@ -46,7 +46,7 @@ namespace LibationWinForms.ProcessQueue public void SetProgrss(int progress) { - //Disabvle slow fill + //Disable slow fill //https://stackoverflow.com/a/5332770/3335599 if (progress < progressBar1.Maximum) progressBar1.Value = progress + 1;