You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1003 B
51 lines
1003 B
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ToolKit;
|
|
|
|
namespace Wrapper
|
|
{
|
|
public class BookViewModel : BaseViewModel
|
|
{
|
|
|
|
IUserLibraryManager UserLibraryManager;
|
|
|
|
Book Book { get; set; }
|
|
|
|
public BookViewModel(IUserLibraryManager userLibraryManager)
|
|
{
|
|
this.UserLibraryManager = userLibraryManager;
|
|
}
|
|
|
|
|
|
public bool LoadBook(string isbn13)
|
|
{
|
|
var book = UserLibraryManager.GetBookByISBN(isbn13);
|
|
if (book.Result == null) { return false; }
|
|
|
|
Book = book.Result;
|
|
return true;
|
|
}
|
|
|
|
|
|
public string ImageLarge
|
|
{
|
|
get => Book.ImageLarge;
|
|
private set { }
|
|
}
|
|
|
|
|
|
public Status ReadingStatus
|
|
{
|
|
get { return Book.Status; }
|
|
set
|
|
{
|
|
Book.Status = value;
|
|
}
|
|
}
|
|
}
|
|
}
|