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.
38 lines
1.1 KiB
38 lines
1.1 KiB
using Model.Stub;
|
|
using Model;
|
|
using Plugin.Maui.Audio;
|
|
namespace Ohara;
|
|
|
|
public partial class PageInfoPersonnage : ContentPage
|
|
{
|
|
public Manager manager => (App.Current as App).manager;
|
|
public PageInfoPersonnage()
|
|
{
|
|
InitializeComponent();
|
|
if (manager.SelectedItem.EstFavori == true)
|
|
{
|
|
bouttonFav.IsEnabled = false;
|
|
bouttonFav.Text = "Ajouté au favoris";
|
|
retirerFav.IsVisible = true;
|
|
|
|
}
|
|
BindingContext = manager.SelectedItem;
|
|
|
|
}
|
|
|
|
private void AjouterFav_Clicked(object sender, EventArgs e)
|
|
{
|
|
manager.ModifierFavoris(manager.SelectedItem, true);
|
|
bouttonFav.IsEnabled = false;
|
|
bouttonFav.Text = "Ajouté au favoris";
|
|
retirerFav.IsVisible = true;
|
|
}
|
|
|
|
private void RetirerFav_Clicked(object sender, EventArgs e)
|
|
{
|
|
manager.ModifierFavoris(manager.SelectedItem, false);
|
|
bouttonFav.IsEnabled = true;
|
|
bouttonFav.Text = "Ajouter au favoris";
|
|
retirerFav.IsVisible = false;
|
|
}
|
|
} |