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.
Ohara_MAUI/Sources/Model/FruitDuDemon.cs

65 lines
2.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Model
{
[DataContract(Name = "fruitdudemon")]
public class FruitDuDemon : ObjetOhara
{
[DataMember (Name = "nomromanise")]
public string NomRomanise { get; set; }
[DataMember(Name = "type")]
public string Type { get; set; }
[DataMember(Name = "premierchap")]
public int PremierChap { get; set; }
[DataMember(Name = "premierep")]
public int PremierEp { get; set; }
[DataMember(Name = "description")]
public string Description { get; set; }
[DataMember(Name = "forces")]
public string Forces { get; set; }
[DataMember(Name = "faiblesses")]
public string Faiblesses { get; set; }
[DataMember(Name = "utilisateur",EmitDefaultValue = false)]
public List<Personnage> Utilisateur { get; set; }= new List<Personnage>();
public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses, string image = "baseimage.png") : base(nom,image)
{
NomRomanise = nomRomanise;
Type = type;
if (premierEp < 0)
{
PremierEp = 0;
}
else
{
PremierEp = premierEp;
}
if (premierChap < 0)
{
premierChap = 0;
}
else
{
PremierChap = premierChap;
}
Description = description;
Forces = forces;
Faiblesses = faiblesses;
}
public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses,string image, List<Personnage> utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses, image)
{
Utilisateur = utilisateur;
}
}
}