diff --git a/LibationWinForms/AsyncNotifyPropertyChanged.cs b/LibationWinForms/AsyncNotifyPropertyChanged.cs index 20b8b512..1510d4fa 100644 --- a/LibationWinForms/AsyncNotifyPropertyChanged.cs +++ b/LibationWinForms/AsyncNotifyPropertyChanged.cs @@ -1,4 +1,5 @@ -using System.ComponentModel; +using Dinah.Core.Threading; +using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; diff --git a/LibationWinForms/BookLiberation/BaseForms/LiberationBaseForm.cs b/LibationWinForms/BookLiberation/BaseForms/LiberationBaseForm.cs index b69fa90d..dbf80104 100644 --- a/LibationWinForms/BookLiberation/BaseForms/LiberationBaseForm.cs +++ b/LibationWinForms/BookLiberation/BaseForms/LiberationBaseForm.cs @@ -1,6 +1,6 @@ using DataLayer; using Dinah.Core.Net.Http; -using Dinah.Core.Windows.Forms; +using Dinah.Core.Threading; using FileLiberator; using System; using System.Windows.Forms; @@ -122,8 +122,8 @@ namespace LibationWinForms.BookLiberation.BaseForms /// /// If the form was shown using Show (not ShowDialog), Form.Close calls Form.Dispose /// - private void OnStreamingCompletedClose(object sender, string completedString) => this.UIThread(() => Close()); - private void OnCompletedDispose(object sender, LibraryBook e) => this.UIThread(() => Dispose()); + private void OnStreamingCompletedClose(object sender, string completedString) => this.UIThread(Close); + private void OnCompletedDispose(object sender, LibraryBook e) => this.UIThread(Dispose); /// /// If StreamingBegin is fired from a worker thread, the window will be created on that @@ -132,7 +132,7 @@ namespace LibationWinForms.BookLiberation.BaseForms /// could cause it to freeze. Form.BeginInvoke won't work until the form is created /// (ie. shown) because Control doesn't get a window handle until it is Shown. /// - private void OnStreamingBeginShow(object sender, string beginString) => Invoker.Invoke(Show); + private void OnStreamingBeginShow(object sender, string beginString) => Invoker.UIThread(Show); #endregion