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.

46 lines
1.1 KiB

using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ToolKit;
namespace Wrapper
{
public class MyLibraryViewModel
{
public RelayCommand<string> LoadData { get; private set; }
IUserLibraryManager UserLibraryManager { get; set; }
public MyLibraryViewModel(IUserLibraryManager userLibraryManager)
{
this.UserLibraryManager = userLibraryManager;
LoadData = new RelayCommand<string>(o => LoadDataFonction());
}
private void LoadDataFonction()
{
nbBooks = UserLibraryManager.GetBooksFromCollection(0,0).Result.Item1;
nbLoans = UserLibraryManager.GetCurrentLoans(0, 0).Result.Item1;
}
public long NbBooks
{
get => nbBooks;
set => nbBooks = value;
}
private long nbBooks;
public long NbLoans
{
get => nbLoans;
set => nbLoans = value;
}
private long nbLoans;
}
}