Refactor
This commit is contained in:
parent
4111d5fa48
commit
f8f5eac109
6 changed files with 117 additions and 95 deletions
|
|
@ -82,7 +82,7 @@ namespace LibationWinForms.GridView
|
|||
|
||||
#endregion
|
||||
|
||||
#region UI display functions
|
||||
#region Scan and Remove Books
|
||||
|
||||
public void CloseRemoveBooksColumn()
|
||||
=> productsGrid.RemoveColumnVisible = false;
|
||||
|
|
@ -127,7 +127,7 @@ namespace LibationWinForms.GridView
|
|||
foreach (var r in removable)
|
||||
r.Remove = RemoveStatus.Removed;
|
||||
|
||||
productsGrid_RemovableCountChanged(null);
|
||||
productsGrid_RemovableCountChanged(this, null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -139,6 +139,10 @@ namespace LibationWinForms.GridView
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UI display functions
|
||||
|
||||
public void Display()
|
||||
{
|
||||
try
|
||||
|
|
@ -183,9 +187,9 @@ namespace LibationWinForms.GridView
|
|||
LiberateClicked?.Invoke(this, liveGridEntry.LibraryBook);
|
||||
}
|
||||
|
||||
private void productsGrid_RemovableCountChanged(GridEntry liveGridEntry)
|
||||
private void productsGrid_RemovableCountChanged(object sender, EventArgs e)
|
||||
{
|
||||
RemovableCountChanged?.Invoke(this, productsGrid.GetAllBookEntries().Count(lbe => lbe.Remove is RemoveStatus.Removed));
|
||||
RemovableCountChanged?.Invoke(sender, productsGrid.GetAllBookEntries().Count(lbe => lbe.Remove is RemoveStatus.Removed));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue