* #396 New feature : match download status to files
* UI: Visible Books \> Set 'Downloaded' status automatically. Visible books. Prompts before saving changes * CLI: Full library. No prompt
This commit is contained in:
parent
a54516b4f5
commit
c4cebbebe7
23 changed files with 1071 additions and 604 deletions
|
|
@ -87,14 +87,12 @@ namespace LibationWinForms
|
|||
if (confirmationResult != DialogResult.Yes)
|
||||
return;
|
||||
|
||||
foreach (var libraryBook in visibleLibraryBooks)
|
||||
libraryBook.Book.UserDefinedItem.Tags = dialog.NewTags;
|
||||
LibraryCommands.UpdateUserDefinedItem(visibleLibraryBooks.Select(lb => lb.Book));
|
||||
}
|
||||
visibleLibraryBooks.UpdateTags(dialog.NewTags);
|
||||
}
|
||||
|
||||
private void setDownloadedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void setDownloadedManualToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new LiberatedStatusBatchDialog();
|
||||
var dialog = new LiberatedStatusBatchManualDialog();
|
||||
var result = dialog.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
|
@ -110,12 +108,36 @@ namespace LibationWinForms
|
|||
if (confirmationResult != DialogResult.Yes)
|
||||
return;
|
||||
|
||||
foreach (var libraryBook in visibleLibraryBooks)
|
||||
libraryBook.Book.UserDefinedItem.BookStatus = dialog.BookLiberatedStatus;
|
||||
LibraryCommands.UpdateUserDefinedItem(visibleLibraryBooks.Select(lb => lb.Book));
|
||||
}
|
||||
visibleLibraryBooks.UpdateBookStatus(dialog.BookLiberatedStatus);
|
||||
}
|
||||
|
||||
private async void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private async void setDownloadedAutoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new LiberatedStatusBatchAutoDialog();
|
||||
var result = dialog.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var bulkSetStatus = new BulkSetDownloadStatus(productsDisplay.GetVisible(), dialog.SetDownloaded, dialog.SetNotDownloaded);
|
||||
var count = await Task.Run(() => bulkSetStatus.Discover());
|
||||
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
var confirmationResult = MessageBox.Show(
|
||||
bulkSetStatus.AggregateMessage,
|
||||
"Replace downloaded status?",
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question,
|
||||
MessageBoxDefaultButton.Button1);
|
||||
|
||||
if (confirmationResult != DialogResult.Yes)
|
||||
return;
|
||||
|
||||
bulkSetStatus.Execute();
|
||||
}
|
||||
|
||||
private async void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var visibleLibraryBooks = productsDisplay.GetVisible();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue