Much faster for grid refresh
This commit is contained in:
parent
a3542c53e2
commit
1fcacb9cfb
10 changed files with 30 additions and 21 deletions
|
|
@ -1,6 +1,6 @@
|
|||
namespace LibationWinForms.Dialogs
|
||||
{
|
||||
partial class EditTagsDialog
|
||||
partial class BookDetailsDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
|
@ -3,15 +3,15 @@ using System.Windows.Forms;
|
|||
|
||||
namespace LibationWinForms.Dialogs
|
||||
{
|
||||
public partial class EditTagsDialog : Form
|
||||
public partial class BookDetailsDialog : Form
|
||||
{
|
||||
public string NewTags { get; private set; }
|
||||
|
||||
public EditTagsDialog()
|
||||
public BookDetailsDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public EditTagsDialog(string title, string rawTags) : this()
|
||||
public BookDetailsDialog(string title, string rawTags) : this()
|
||||
{
|
||||
this.Text = $"Edit Tags - {title}";
|
||||
|
||||
|
|
@ -255,11 +255,11 @@ namespace LibationWinForms
|
|||
// EditTagsDialog should display better-formatted title
|
||||
liveGridEntry.TryDisplayValue(nameof(liveGridEntry.Title), out string value);
|
||||
|
||||
var editTagsForm = new EditTagsDialog(value, liveGridEntry.Tags);
|
||||
if (editTagsForm.ShowDialog() != DialogResult.OK)
|
||||
var bookDetailsForm = new BookDetailsDialog(value, liveGridEntry.Tags);
|
||||
if (bookDetailsForm.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var qtyChanges = LibraryCommands.UpdateTags(liveGridEntry.GetBook(), editTagsForm.NewTags);
|
||||
var qtyChanges = LibraryCommands.UpdateTags(liveGridEntry.GetBook(), bookDetailsForm.NewTags);
|
||||
if (qtyChanges == 0)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue