Next iterative step toward replacing live scanning with db state. FilePaths.json => db

This commit is contained in:
Robert McRackan 2021-07-28 09:40:27 -04:00
parent 5c6bf300c6
commit 75f1d987fc
7 changed files with 85 additions and 14 deletions

View file

@ -176,7 +176,8 @@ namespace LibationWinForms.BookLiberation
downloadDialog.UpdateFilename(destination);
downloadDialog.Show();
new System.Threading.Thread(() => {
new System.Threading.Thread(() =>
{
var downloadFile = new DownloadFile();
downloadFile.DownloadProgressChanged += (_, progress) => downloadDialog.UIThread(() =>
@ -190,7 +191,9 @@ namespace LibationWinForms.BookLiberation
});
downloadFile.PerformDownloadFileAsync(url, destination).GetAwaiter().GetResult();
}).Start();
})
{ IsBackground = true }
.Start();
}
// subscribed to Begin event because a new form should be created+processed+closed on each iteration