Mise a jour des classes note et utilisateur

biblioteque
Liam MONCHANIN 2 years ago
parent d2e20a8f4c
commit 7dcb9b294e

@ -7,32 +7,32 @@ using System.Threading.Tasks;
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
internal class Note public class Note
{ {
private string nom = "Note sans nom"; private string nom = "Note sans nom";
private string logoPATH = "PATH TO DEFAULT LOGO"; private string logoPATH = "PATH TO DEFAULT LOGO";
private List<Category> tag; private List<Category> tag;
private int Favori { get; set; }
private DateOnly DateCreation { get;} private DateOnly DateCreation { get;}
private List<Note> ListNote; public List<Note> ListNote{get; set;}
public int Capacity { get; private set; }
private List<string> Favoris; private List<string> Favoris;
public Note(string Nnom, string llogoPATH, List<Category> basetags, int favori, string dateCreation) public Note(string Nnom, string llogoPATH, string dateCreation)
{ {
nom = Nnom; nom = Nnom;
logoPATH = llogoPATH; logoPATH = llogoPATH;
tag = basetags;
Favori = favori;
DateCreation = DateOnly.FromDateTime(DateTime.Now); DateCreation = DateOnly.FromDateTime(DateTime.Now);
} }
public void TriDate(Note DateCreation) public void TriDate(Note DateCreation,Note ListNote)
{ {
Note temp; Note temp;
Note n1; Note n1 = ListNote[0];
Note n2; Note n2 = ListNote[i];
int i; int i;
for (i = 0; i < tailleMax; i++) int TailleList= ListNote.Capacity;
for (i = 0; i < TailleList; i++)
{ {
if (n1.DateCreation > n2.DateCreation) if (n1.DateCreation > n2.DateCreation)
{ {

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
internal class SetTheme internal class SetTheme : Utilisateur
{ {
private string Theme { get; set; } private string Theme { get; set; }
} }

@ -6,12 +6,12 @@ using System.Threading.Tasks;
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
internal class Tag internal class Tag : Note
{ {
private string Tnom { get; set; } private string Tnom { get; set; }
private string Tcouleur { get; set; } private string Tcouleur { get; set; }
private List<Tag> listTags; private List<Tag> listTags;
private string attributionTag { get; set; }
public Tag(string nom, string couleur) public Tag(string nom, string couleur)
{ {

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
internal class Theme internal class Theme : SetTheme
{ {
private List<string> ListeCouleur; private List<string> ListeCouleur;
private List<string>[] ListeTheme; private List<string>[] ListeTheme;

@ -2,19 +2,19 @@
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
public class Utilisateur public class Utilisateur : Note
{ {
private string Psd { get; set; } private string Psd { get; set; }
private string Mail { get; set; } private string Mail { get; set; }
private string Mdp { get; set; } private string Mdp { get; set; }
private List<Utilisateur> listUtilisateur; private List<Utilisateur> listUtilisateur;
private bool connecté{get; set;}
public Utilisateur(string Upseudo, string Umail, string Upassword) public Utilisateur(string Upseudo, string Umail, string Upassword)
{ {
Psd = Upseudo; Psd = Upseudo;
Mail=Umail; Mail=Umail;
Mdp = Upassword; Mdp = Upassword;
Note.ListNote = new List<Note>();
} }

Loading…
Cancel
Save