diff --git a/notus/Biblioteque_de_Class/Utilisateur.cs b/notus/Biblioteque_de_Class/Utilisateur.cs index 520cd64..2d76578 100644 --- a/notus/Biblioteque_de_Class/Utilisateur.cs +++ b/notus/Biblioteque_de_Class/Utilisateur.cs @@ -21,6 +21,9 @@ namespace Biblioteque_de_Class Mail = Umail; Password = Upassword; NoteList = new List(); + TagList = new List(); + FavList = new List(); + NoteTaged = new Dictionary>(); } public string GetPseudo() { return Pseudo; } @@ -106,11 +109,9 @@ namespace Biblioteque_de_Class /// public void CreateNote(string nom, string LogoPath) { - List NoteList = this.GetNoteList(); - Dictionary> NoteTaged = this.GetNoteTaged(); - foreach (Note note in NoteList) + foreach (Note eachnote in NoteList) { - if (note.GetNom() == nom) + if (eachnote.GetNom() == nom) { throw new Exception("Note already exist"); } @@ -160,8 +161,7 @@ namespace Biblioteque_de_Class /// public void AddOneTagToNoteList(Note note, Tags tagtoadd) { - List ListTags = this.GetTagList(); - if (ListTags.Contains(tagtoadd) == false) { throw new Exception("Tag not found"); } + if (TagList.Contains(tagtoadd) == false) { throw new Exception("Tag not found"); } if(NoteList.Contains(note) == false) { throw new Exception("Note not found"); } else { @@ -174,8 +174,7 @@ namespace Biblioteque_de_Class /// public void SupOneTagToNoteList(Note note, Tags tagtosup) { - List ListTags = this.GetTagList(); - if (ListTags.Contains(tagtosup) == false) { throw new Exception("Tag not found"); } + if (TagList.Contains(tagtosup) == false) { throw new Exception("Tag not found"); } if(NoteList.Contains(note) == false) { throw new Exception("Note not found"); } else {