Fix sorting and refactor

This commit is contained in:
Michael Bucari-Tovo 2022-07-13 11:48:17 -06:00
parent e33fd6ea1b
commit 3a61c32881
20 changed files with 649 additions and 748 deletions

View file

@ -1,4 +1,5 @@
using DataLayer;
using Avalonia.Media;
using DataLayer;
using Dinah.Core;
using Dinah.Core.DataBinding;
using Dinah.Core.Drawing;
@ -28,39 +29,32 @@ namespace LibationWinForms.AvaloniaUI.ViewModels
[Browsable(false)] public float SeriesIndex { get; protected set; }
[Browsable(false)] public string LongDescription { get; protected set; }
[Browsable(false)] public abstract DateTime DateAdded { get; }
[Browsable(false)] public int ListIndex { get; set; }
[Browsable(false)] protected Book Book => LibraryBook.Book;
#region Model properties exposed to the view
private Avalonia.Media.Imaging.Bitmap _cover;
private string _purchaseDate;
private string _series;
private string _title;
private string _length;
private string _authors;
private string _narrators;
private string _category;
private string _misc;
private string _description;
private string _productRating;
private string _myRating;
public Avalonia.Media.Imaging.Bitmap Cover { get => _cover; protected set { this.RaiseAndSetIfChanged(ref _cover, value); } }
public string PurchaseDate { get => _purchaseDate; protected set { this.RaiseAndSetIfChanged(ref _purchaseDate, value); } }
public string Series { get => _series; protected set { this.RaiseAndSetIfChanged(ref _series, value); } }
public string Title { get => _title; protected set { this.RaiseAndSetIfChanged(ref _title, value); } }
public string Length { get => _length; protected set { this.RaiseAndSetIfChanged(ref _length, value); } }
public string Authors { get => _authors; protected set { this.RaiseAndSetIfChanged(ref _authors, value); } }
public string Narrators { get => _narrators; protected set { this.RaiseAndSetIfChanged(ref _narrators, value); } }
public string Category { get => _category; protected set { this.RaiseAndSetIfChanged(ref _category, value); } }
public string Misc { get => _misc; protected set { this.RaiseAndSetIfChanged(ref _misc, value); } }
public string Description { get => _description; protected set { this.RaiseAndSetIfChanged(ref _description, value); } }
public string ProductRating { get => _productRating; protected set { this.RaiseAndSetIfChanged(ref _productRating, value); } }
public string MyRating { get => _myRating; protected set { this.RaiseAndSetIfChanged(ref _myRating, value); } }
public string PurchaseDate { get; protected set; }
public string Series { get; protected set; }
public string Title { get; protected set; }
public string Length { get; protected set; }
public string Authors { get; protected set; }
public string Narrators { get; protected set; }
public string Category { get; protected set; }
public string Misc { get; protected set; }
public string Description { get; protected set; }
public string ProductRating { get; protected set; }
public string MyRating { get; protected set; }
protected bool? _remove = false;
public abstract bool? Remove { get; set; }
public abstract LiberateButtonStatus2 Liberate { get; }
public abstract BookTags BookTags { get; }
public abstract bool IsSeries { get; }
public abstract bool IsEpisode { get; }
public abstract bool IsBook { get; }
#endregion