Added remove books context menu item.
This commit is contained in:
parent
f621ca63e8
commit
af48641281
12
LibationWinForms/Form1.Designer.cs
generated
12
LibationWinForms/Form1.Designer.cs
generated
@ -58,6 +58,7 @@
|
|||||||
this.backupsCountsLbl = new System.Windows.Forms.ToolStripStatusLabel();
|
this.backupsCountsLbl = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.pdfsCountsLbl = new System.Windows.Forms.ToolStripStatusLabel();
|
this.pdfsCountsLbl = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.addFilterBtn = new System.Windows.Forms.Button();
|
this.addFilterBtn = new System.Windows.Forms.Button();
|
||||||
|
this.removeLibraryBooksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@ -128,7 +129,8 @@
|
|||||||
this.noAccountsYetAddAccountToolStripMenuItem,
|
this.noAccountsYetAddAccountToolStripMenuItem,
|
||||||
this.scanLibraryToolStripMenuItem,
|
this.scanLibraryToolStripMenuItem,
|
||||||
this.scanLibraryOfAllAccountsToolStripMenuItem,
|
this.scanLibraryOfAllAccountsToolStripMenuItem,
|
||||||
this.scanLibraryOfSomeAccountsToolStripMenuItem});
|
this.scanLibraryOfSomeAccountsToolStripMenuItem,
|
||||||
|
this.removeLibraryBooksToolStripMenuItem});
|
||||||
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
|
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
|
||||||
this.importToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
this.importToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||||
this.importToolStripMenuItem.Text = "&Import";
|
this.importToolStripMenuItem.Text = "&Import";
|
||||||
@ -309,6 +311,13 @@
|
|||||||
this.addFilterBtn.UseVisualStyleBackColor = true;
|
this.addFilterBtn.UseVisualStyleBackColor = true;
|
||||||
this.addFilterBtn.Click += new System.EventHandler(this.AddFilterBtn_Click);
|
this.addFilterBtn.Click += new System.EventHandler(this.AddFilterBtn_Click);
|
||||||
//
|
//
|
||||||
|
// removeLibraryBooksToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.removeLibraryBooksToolStripMenuItem.Name = "removeLibraryBooksToolStripMenuItem";
|
||||||
|
this.removeLibraryBooksToolStripMenuItem.Size = new System.Drawing.Size(247, 22);
|
||||||
|
this.removeLibraryBooksToolStripMenuItem.Text = "Remove Library Books";
|
||||||
|
this.removeLibraryBooksToolStripMenuItem.Click += new System.EventHandler(this.removeLibraryBooksToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
@ -368,5 +377,6 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem exportLibraryToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem exportLibraryToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem convertAllM4bToMp3ToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem convertAllM4bToMp3ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem removeLibraryBooksToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -455,5 +455,20 @@ namespace LibationWinForms
|
|||||||
|
|
||||||
private void basicSettingsToolStripMenuItem_Click(object sender, EventArgs e) => new SettingsDialog().ShowDialog();
|
private void basicSettingsToolStripMenuItem_Click(object sender, EventArgs e) => new SettingsDialog().ShowDialog();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private void removeLibraryBooksToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using var persister = AudibleApiStorage.GetAccountsSettingsPersister();
|
||||||
|
var firstAccount = persister.AccountsSettings.GetAll().FirstOrDefault();
|
||||||
|
scanLibrariesRemovedBooks(firstAccount);
|
||||||
|
}
|
||||||
|
private void scanLibrariesRemovedBooks(params Account[] accounts)
|
||||||
|
{
|
||||||
|
using var dialog = new RemoveBooksDialog(accounts);
|
||||||
|
dialog.ShowDialog();
|
||||||
|
|
||||||
|
if (dialog.BooksRemoved)
|
||||||
|
reloadGrid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user