From 89059510fd4d1286ce4e3ab89eb2b3b91f499f83 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Mon, 16 May 2022 12:37:56 -0600 Subject: [PATCH] More logical naming --- ...terableBindingList.cs => FilterableSortableBindingList.cs} | 4 ++-- Source/LibationWinForms/grid/ProductsGrid.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename Source/LibationWinForms/grid/{SortableFilterableBindingList.cs => FilterableSortableBindingList.cs} (96%) diff --git a/Source/LibationWinForms/grid/SortableFilterableBindingList.cs b/Source/LibationWinForms/grid/FilterableSortableBindingList.cs similarity index 96% rename from Source/LibationWinForms/grid/SortableFilterableBindingList.cs rename to Source/LibationWinForms/grid/FilterableSortableBindingList.cs index 54f98b03..e0f83776 100644 --- a/Source/LibationWinForms/grid/SortableFilterableBindingList.cs +++ b/Source/LibationWinForms/grid/FilterableSortableBindingList.cs @@ -19,7 +19,7 @@ namespace LibationWinForms * Remove is overridden to ensure that removed items are removed from * the base list (visible items) as well as the FilterRemoved list. */ - internal class SortableFilterableBindingList : SortableBindingList, IBindingListView + internal class FilterableSortableBindingList : SortableBindingList, IBindingListView { /// /// Items that were removed from the list due to filtering @@ -30,7 +30,7 @@ namespace LibationWinForms /// private string FilterString; private Action Sort; - public SortableFilterableBindingList(IEnumerable enumeration) : base(enumeration) + public FilterableSortableBindingList(IEnumerable enumeration) : base(enumeration) { //This is only necessary because SortableBindingList doesn't expose Sort() //You should make SortableBindingList.Sort protected and remove reflection diff --git a/Source/LibationWinForms/grid/ProductsGrid.cs b/Source/LibationWinForms/grid/ProductsGrid.cs index 42632f69..50c4ebdd 100644 --- a/Source/LibationWinForms/grid/ProductsGrid.cs +++ b/Source/LibationWinForms/grid/ProductsGrid.cs @@ -156,7 +156,7 @@ namespace LibationWinForms #region UI display functions - private SortableFilterableBindingList bindingList; + private FilterableSortableBindingList bindingList; private bool hasBeenDisplayed; public event EventHandler InitialLoaded; @@ -180,7 +180,7 @@ namespace LibationWinForms private void bindToGrid(List dbBooks) { - bindingList = new SortableFilterableBindingList(dbBooks.OrderByDescending(lb => lb.DateAdded).Select(lb => new GridEntry(lb))); + bindingList = new FilterableSortableBindingList(dbBooks.OrderByDescending(lb => lb.DateAdded).Select(lb => new GridEntry(lb))); gridEntryBindingSource.DataSource = bindingList; }