ajouter favoris fonctionnel
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6ea4177079
commit
bf1fb8db82
@ -1,15 +1,27 @@
|
||||
using Model.Stub;
|
||||
using Model;
|
||||
using Plugin.Maui.Audio;
|
||||
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class PageInfoPersonnage : ContentPage
|
||||
{
|
||||
public PageInfoPersonnage(Personnage perso)
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public PageInfoPersonnage()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = perso;
|
||||
if (manager.SelectedItem.EstFavori == true)
|
||||
{
|
||||
bouttonFav.IsEnabled = false;
|
||||
bouttonFav.Text = "Ajouté au favoris";
|
||||
}
|
||||
BindingContext = manager.SelectedItem;
|
||||
|
||||
}
|
||||
|
||||
private void AjouterFav_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
manager.AddFavoris(manager.SelectedItem);
|
||||
bouttonFav.IsEnabled = false;
|
||||
bouttonFav.Text = "Ajouté au favoris";
|
||||
}
|
||||
}
|
Loading…
Reference in new issue