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.
73 lines
2.0 KiB
73 lines
2.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.ComponentModel;
|
|
using System.Xml.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace MangaMap.Model
|
|
{
|
|
[DataContract]
|
|
public class Oeuvre : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler? PropertyChanged;
|
|
|
|
void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
[DataMember]
|
|
public string Nom { get; private set; }
|
|
[DataMember]
|
|
public List<string> Genre { get; private set; }
|
|
[DataMember]
|
|
public string Type { get; private set; }
|
|
[DataMember]
|
|
public string Description { get; private set; }
|
|
|
|
[DataMember]
|
|
public int Note {
|
|
get => note;
|
|
set
|
|
{
|
|
if (note == value)
|
|
return;
|
|
note = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
private int note;
|
|
|
|
[DataMember]
|
|
public int NbEpisodes { get; private set; }
|
|
[DataMember]
|
|
public string Affiche { get; private set; }
|
|
|
|
public Oeuvre(string nom, List<string> genre, string type, string description, int note, int nbEpisode, string affiche)
|
|
{
|
|
Nom = nom;
|
|
Genre = genre;
|
|
Type = type;
|
|
Description = description;
|
|
Note = note;
|
|
NbEpisodes = nbEpisode;
|
|
Affiche = affiche;
|
|
}
|
|
|
|
public Oeuvre(string nom, string type, string description, int nbEpisode, string affiche)
|
|
{
|
|
Nom = nom;
|
|
Type = type;
|
|
Description = description;
|
|
NbEpisodes = nbEpisode;
|
|
Affiche = affiche;
|
|
}
|
|
|
|
public void AjouterEpisode(int nb)
|
|
{
|
|
NbEpisodes = NbEpisodes + nb;
|
|
}
|
|
}
|
|
} |