Address comments

This commit is contained in:
Michael Bucari-Tovo 2022-05-24 11:15:41 -06:00
parent 43d6ea82cd
commit e26deb9092
6 changed files with 77 additions and 54 deletions

View file

@ -27,6 +27,7 @@ namespace LibationWinForms.GridView
}
public new bool InvokeRequired => base.InvokeRequired;
public abstract DateTime DateAdded { get; }
public abstract float SeriesIndex { get; }
public abstract string ProductRating { get; protected set; }
public abstract string PurchaseDate { get; protected set; }
public abstract string MyRating { get; protected set; }
@ -40,10 +41,21 @@ namespace LibationWinForms.GridView
public abstract string Description { get; protected set; }
public abstract string DisplayTags { get; }
public abstract LiberateButtonStatus Liberate { get; }
public abstract object GetMemberValue(string memberName);
#endregion
#region Sorting
public GridEntry() => _memberValues = CreateMemberValueDictionary();
private Dictionary<string, Func<object>> _memberValues { get; set; }
protected abstract Dictionary<string, Func<object>> CreateMemberValueDictionary();
// These methods are implementation of Dinah.Core.DataBinding.IMemberComparable
// Used by GridEntryBindingList for all sorting
public virtual object GetMemberValue(string memberName) => _memberValues[memberName]();
public IComparer GetMemberComparer(Type memberType) => _memberTypeComparers[memberType];
#endregion
protected void LoadCover()
{
// Get cover art. If it's default, subscribe to PictureCached