|
|
|
@ -7,34 +7,32 @@ public partial class homePage : ContentPage
|
|
|
|
|
{
|
|
|
|
|
public Manager my_manager => (App.Current as App).MyManager;
|
|
|
|
|
|
|
|
|
|
private ObservableCollection<Oeuvre> filteredOeuvres = new ObservableCollection<Oeuvre>();
|
|
|
|
|
|
|
|
|
|
public homePage()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
BindingContext = my_manager;
|
|
|
|
|
chargerSerie();
|
|
|
|
|
//chargerSerie();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async void AnimeImageClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//var selectedAnime = (sender as ImageButton)?.BindingContext as Oeuvre;
|
|
|
|
|
//if (selectedAnime != null)
|
|
|
|
|
//{
|
|
|
|
|
// // Naviguez vers la page de la fiche d'anime en passant l'objet sélectionné
|
|
|
|
|
// await Navigation.PushAsync(new ficheAnime(selectedAnime));
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
var button = (ImageButton)sender;
|
|
|
|
|
var selectedAnime = (sender as ImageButton)?.BindingContext as Oeuvre;
|
|
|
|
|
if (selectedAnime != null)
|
|
|
|
|
{
|
|
|
|
|
// Naviguez vers la page de la fiche d'anime en passant l'objet sélectionné
|
|
|
|
|
await Navigation.PushAsync(new ficheAnime(selectedAnime));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*var button = (ImageButton)sender;
|
|
|
|
|
var idAutomation = button.AutomationId;
|
|
|
|
|
|
|
|
|
|
if (int.TryParse(idAutomation, out int id))
|
|
|
|
|
{
|
|
|
|
|
await Navigation.PushAsync(new ficheAnime(my_manager.Oeuvres[id]));
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void chargerSerie()
|
|
|
|
|
/*private void chargerSerie()
|
|
|
|
|
{
|
|
|
|
|
int imagesParLigne = 4;
|
|
|
|
|
int indice = 0;
|
|
|
|
@ -67,11 +65,12 @@ public partial class homePage : ContentPage
|
|
|
|
|
|
|
|
|
|
indice++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
private void OnTextChanged(object sender, TextChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(string.IsNullOrEmpty(e.NewTextValue))
|
|
|
|
|
|
|
|
|
|
if(string.IsNullOrWhiteSpace(e.NewTextValue))
|
|
|
|
|
{
|
|
|
|
|
searchResults.ItemsSource = my_manager.Oeuvres;
|
|
|
|
|
}
|
|
|
|
|