Start SearchBar
continuous-integration/drone/push Build is failing Details

pull/29/head
Matheo HERSAN 2 years ago
parent e0b1ebdb60
commit f6a4fd91b1

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -12,7 +13,7 @@ namespace MangaMap.Model
public IPersistanceManager Persistance { get; set; }
public List<Admin> Admins { get; private set; }
public List<Utilisateur> Utilisateurs { get; private set; }
public List<Oeuvre> Oeuvres { get; private set; }
public ObservableCollection<Oeuvre> Oeuvres { get; private set; }
public Utilisateur UtilisateurActuel { get; set; }
public bool isAdmin { get; set; }
@ -20,7 +21,7 @@ namespace MangaMap.Model
public Manager(IPersistanceManager Pers) {
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
Oeuvres = new List<Oeuvre>();
Oeuvres = new ObservableCollection<Oeuvre>();
UtilisateurActuel = new Utilisateur();
isAdmin = false;
@ -31,7 +32,7 @@ namespace MangaMap.Model
{
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
Oeuvres = new List<Oeuvre>();
Oeuvres = new ObservableCollection<Oeuvre>();
UtilisateurActuel = new Utilisateur();
isAdmin = false;
}

@ -1,6 +1,7 @@
using MangaMap.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
@ -16,7 +17,7 @@ namespace MangaMap.Stub
public string FileName { get; set; } = "SauvegardeDonnees.xml";
public string FilePath { get; set; } = Path.Combine(AppDomain.CurrentDomain.BaseDirectory);
public (List<Oeuvre>, List<Utilisateur>) chargeDonne()
public (ObservableCollection<Oeuvre>, List<Utilisateur>) chargeDonne()
{
var serializer = new DataContractSerializer(typeof(DataToPersist));
DataToPersist data;
@ -36,7 +37,7 @@ namespace MangaMap.Stub
return (data.Oeuvres, data.Utilisateurs);
}
public void sauvegarder(List<Oeuvre> o, List<Utilisateur> u)
public void sauvegarder(ObservableCollection<Oeuvre> o, List<Utilisateur> u)
{
var serializer = new DataContractSerializer(typeof(DataToPersist));

@ -4,13 +4,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
namespace MangaMap.Stub
{
//Cette classe permet de définir ce qui doit être enregistrer par la persistance.
public class DataToPersist
{
public List<Oeuvre> Oeuvres { get; set; } = new List<Oeuvre>();
public ObservableCollection<Oeuvre> Oeuvres { get; set; } = new ObservableCollection<Oeuvre>();
public List<Utilisateur> Utilisateurs { get; set; } = new List<Utilisateur>();
}

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -9,8 +10,8 @@ namespace MangaMap.Stub
{
public interface IPersistanceManager
{
(List<Oeuvre>, List<Utilisateur>) chargeDonne();
(ObservableCollection<Oeuvre>, List<Utilisateur>) chargeDonne();
void sauvegarder(List<Oeuvre> o, List<Utilisateur> u);
void sauvegarder(ObservableCollection<Oeuvre> o, List<Utilisateur> u);
}
}

@ -1,6 +1,7 @@
using MangaMap.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -12,9 +13,9 @@ namespace MangaMap.Stub
//Cette classe sert à faire charger un jeu de données qui n'est pas celui enregistrer dans le fichier sur l'ordinateur.
//Il permet de faire des transistion entre différent moyen de persister.
{
public (List<Oeuvre>, List<Utilisateur>) chargeDonne()
public (ObservableCollection<Oeuvre>, List<Utilisateur>) chargeDonne()
{
List<Oeuvre> l1 = new List<Oeuvre>();
ObservableCollection<Oeuvre> l1 = new ObservableCollection<Oeuvre>();
List<Utilisateur> l2 = new List<Utilisateur>();
Utilisateur u1 = new Utilisateur("t", "Pseudo1", "t", "Jean", "Baptiste", 12);
@ -34,7 +35,7 @@ namespace MangaMap.Stub
return (l1, l2);
}
public void sauvegarder(List<Oeuvre> o, List<Utilisateur> u)
public void sauvegarder(ObservableCollection<Oeuvre> o, List<Utilisateur> u)
{
throw new NotImplementedException();
}

@ -73,7 +73,7 @@
<Grid Margin="20,0,20,20" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" Source="{Binding Affiche}" Style="{StaticResource ImageAnime}" HorizontalOptions="Start" Clicked="AnimeImageClickedList"/>
<Label Grid.Column="1" Text="{Binding Nom}" TextColor="White" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding Note}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding NbEpisodes}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
</DataTemplate>
@ -112,7 +112,7 @@
<Grid Margin="20,0,20,20" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" Source="{Binding Affiche}" Style="{StaticResource ImageAnime}" HorizontalOptions="Start" Clicked="AnimeImageClickedList"/>
<Label Grid.Column="1" Text="{Binding Nom}" TextColor="White" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding Note}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding NbEpisodes}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
</DataTemplate>
@ -151,7 +151,7 @@
<Grid Margin="20,0,20,20" ColumnDefinitions="*,*,300,300">
<ImageButton Grid.Column="0" Source="{Binding Affiche}" Style="{StaticResource ImageAnime}" HorizontalOptions="Start" Clicked="AnimeImageClickedList"/>
<Label Grid.Column="1" Text="{Binding Nom}" TextColor="White" FontSize="Medium" VerticalOptions="Center" Margin="15"/>
<Label Grid.Column="2" Text="4/5" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding Note}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding NbEpisodesVus}" TextColor="White" FontSize="Medium" VerticalOptions="Center" HorizontalOptions="End"/>
</Grid>
</DataTemplate>

@ -6,6 +6,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Windows.Input;
using System.Xml.Linq;
using Microsoft.Maui.Graphics;
public partial class ficheAnime : ContentPage, INotifyPropertyChanged
@ -91,6 +92,7 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged
ImageButton imageButton = new ImageButton
{
Source = "star_full.png",
BackgroundColor = Microsoft.Maui.Graphics.Color.FromHex("1E1E1E"),
WidthRequest = 50,
HeightRequest = 50,
AutomationId = i.ToString(),
@ -108,6 +110,7 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged
ImageButton imageButton = new ImageButton
{
Source = "star_empty.png",
BackgroundColor = Microsoft.Maui.Graphics.Color.FromHex("1E1E1E"),
WidthRequest = 50,
HeightRequest = 50,
AutomationId = i.ToString(),

Loading…
Cancel
Save