Passage en List pour les commentaires, ajout du OnPropertyCHange pour le pack et les commentaires et quelques corrections dans le code
continuous-integration/drone/push Build is failing Details

master
Loris OBRY 2 years ago
parent 1d23609474
commit 45dfdb77d6

@ -67,12 +67,21 @@ namespace Model
get => lienImage;
set
{
if (!string.IsNullOrEmpty(lienImage)) lienImage = "notfound";
if (string.IsNullOrEmpty(lienImage)) lienImage = "notfound";
else lienImage = value;
OnPropertyChanged(nameof(LienImage));
}
}
public IEnumerable<IContenu> ContenuList { get; set; }
public List<Commentaire> commentaires;
public List<Commentaire> Commentaires
{
get => commentaires;
set
{
commentaires = value;
OnPropertyChanged(nameof(Commentaires));
}
}
private string lienImage;
public Carte(string nom, string pouvoir, string strategie, int? note, string lienImage, string description)
{
@ -82,7 +91,7 @@ namespace Model
this.strategie = strategie;
this.note = note;
this.lienImage = lienImage;
this.ContenuList = new List<IContenu>();
this.commentaires = new List<Commentaire>();
}
}
}

@ -16,9 +16,25 @@ namespace Model
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public string Nom { get; set; }
public string Description { get; set; }
public string nom;
public string Nom
{
get => nom;
set
{
nom = value;
OnPropertyChanged(nameof(Nom));
}
}
public string description;
public string Description {
get => description;
set
{
nom = value;
OnPropertyChanged(nameof(Description));
}
}
private int? note;
public int? Note
{
@ -36,11 +52,22 @@ namespace Model
OnPropertyChanged(nameof(Note));
}
}
public List<Commentaire> commentaires;
public List<Commentaire> Commentaires
{
get => commentaires;
set
{
commentaires = value;
OnPropertyChanged(nameof(Commentaires));
}
}
public Pack(string nom, string description, int? note)
{
Nom = nom;
Description = description;
Note = note;
this.nom = nom;
this.description = description;
this.note = note;
this.commentaires = new List<Commentaire>();
}
}
}

Loading…
Cancel
Save