From eb513f563e0618f552514c046fb0cf1051212f97 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Mon, 13 Jun 2022 13:55:39 -0400 Subject: [PATCH] Allow sorting by "Remove" column --- Source/AppScaffolding/AppScaffolding.csproj | 2 +- Source/LibationWinForms/GridView/GridEntry.cs | 1 + Source/LibationWinForms/GridView/LibraryBookEntry.cs | 1 + Source/LibationWinForms/GridView/SeriesEntry.cs | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/AppScaffolding/AppScaffolding.csproj b/Source/AppScaffolding/AppScaffolding.csproj index 4d64c1c4..59a182d3 100644 --- a/Source/AppScaffolding/AppScaffolding.csproj +++ b/Source/AppScaffolding/AppScaffolding.csproj @@ -3,7 +3,7 @@ net6.0-windows - 8.0.0.1 + 8.0.1.1 diff --git a/Source/LibationWinForms/GridView/GridEntry.cs b/Source/LibationWinForms/GridView/GridEntry.cs index a9a27c3a..6515a677 100644 --- a/Source/LibationWinForms/GridView/GridEntry.cs +++ b/Source/LibationWinForms/GridView/GridEntry.cs @@ -72,6 +72,7 @@ namespace LibationWinForms.GridView // Instantiate comparers for every exposed member object type. private static readonly Dictionary _memberTypeComparers = new() { + { typeof(RemoveStatus), new ObjectComparer() }, { typeof(string), new ObjectComparer() }, { typeof(int), new ObjectComparer() }, { typeof(float), new ObjectComparer() }, diff --git a/Source/LibationWinForms/GridView/LibraryBookEntry.cs b/Source/LibationWinForms/GridView/LibraryBookEntry.cs index 85e6c687..938ae95c 100644 --- a/Source/LibationWinForms/GridView/LibraryBookEntry.cs +++ b/Source/LibationWinForms/GridView/LibraryBookEntry.cs @@ -137,6 +137,7 @@ namespace LibationWinForms.GridView /// Create getters for all member object values by name protected override Dictionary> CreateMemberValueDictionary() => new() { + { nameof(Remove), () => Remove }, { nameof(Title), () => Book.TitleSortable() }, { nameof(Series), () => Book.SeriesSortable() }, { nameof(Length), () => Book.LengthInMinutes }, diff --git a/Source/LibationWinForms/GridView/SeriesEntry.cs b/Source/LibationWinForms/GridView/SeriesEntry.cs index 9ceba47e..e1221009 100644 --- a/Source/LibationWinForms/GridView/SeriesEntry.cs +++ b/Source/LibationWinForms/GridView/SeriesEntry.cs @@ -106,6 +106,7 @@ namespace LibationWinForms.GridView /// Create getters for all member object values by name protected override Dictionary> CreateMemberValueDictionary() => new() { + { nameof(Remove), () => Remove }, { nameof(Title), () => Book.TitleSortable() }, { nameof(Series), () => Book.SeriesSortable() }, { nameof(Length), () => Children.Sum(c => c.LibraryBook.Book.LengthInMinutes) },