Commentaire et Icontenu
continuous-integration/drone/push Build is passing Details

master
Loris OBRY 2 years ago
parent fdd3b1c30a
commit 18f1fd95d2

@ -25,6 +25,7 @@ namespace ConsoleApp
*/
Carte C = new Carte("Villageois", "Aucuns", "Doit voter inteligemment", null, "lien", "une carte peu apprécié mais necesaire");
Console.WriteLine(C.Nom);
}
static void DisplayTab(string name, int[] tab)

@ -9,7 +9,7 @@ using System.Runtime.CompilerServices;
namespace Model
{
public class Carte : INotifyPropertyChanged
public class Carte : IContenu, INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
void OnPropertyChanged([CallerMemberName] string ?propertyName = null)
@ -17,8 +17,7 @@ namespace Model
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
private readonly string nom;
public string Nom => nom;
public string Nom { get; set; }
public string Description {
get => description;
set {
@ -76,7 +75,7 @@ namespace Model
private string lienImage;
public Carte(string nom, string pouvoir, string strategie, int? note, string lienImage, string description)
{
this.nom = nom;
this.Nom = nom;
this.description = description;
this.pouvoir = pouvoir;
this.strategie = strategie;

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
internal class Commentaire
{
public string texte { get; set; }
public Utilisateur Proprietaire { get; set; }
public IContenu Contenu { get; set; }
Commentaire(string contenu, Utilisateur Proprietaire)
{
this.Contenu = Contenu;
this.Proprietaire = Proprietaire;
}
}
}

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public interface IContenu
{
public string Nom { get; set; }
public string Description { get; set; }
public int? Note { get; set; }
}
}
Loading…
Cancel
Save