MODIF et ajout d'une part des fonctions

vSonar_test
Matheo THIERRY 2 years ago
parent aad8148fc8
commit 6536bef530

@ -10,5 +10,13 @@ namespace Biblioteque_de_Class
{
public string Nom { get; set; }
public string LinkLogo { get; set; }
public Logo(string nom, string linklogo)
{
Nom = nom;
LinkLogo = linklogo;
}
public override string ToString() => $"logo -> nom : {Nom}\nlink : {LinkLogo}";
}
}

@ -34,47 +34,47 @@ namespace Biblioteque_de_Class
owner = uOwner;
}
/// public Note RechercherNote(List<Note> listeNote, string nom)
/// {
/// List<Note> newListNote = new List<Note>();
/// foreach (Note note in listeNote)
/// {
/// if (note.Nom == nom)
/// {
///
/// }
/// }
/// return newListNote;
/// }
public override string ToString() => $"note -> nom : {Nom}\nlogoPATH : {LogoPATH}\nhow many line : {listeLigneTexte.Count()}";
public void AjouterTag(List<Tags> listNote, string name) {
foreach(Tags tag in listNote)
{
if(tag.Nom == name)
{
atributionTag.Add(tag);
}
foreach(Tags tag in listNote){
if(tag.Nom == name) { atributionTag.Add(tag); }
}
throw new Exception("no tag find with this name");
}
public void SupTag(string name)
{
foreach(Tags tag in atributionTag)
{
if(tag.Nom == name)
{
atributionTag.Remove(tag);
}
public void SupTag(string name){
foreach(Tags tag in atributionTag){
if(tag.Nom == name) { atributionTag.Remove(tag); }
}
throw new Exception("no tag find with this name");
}
public bool VerifOwner(Utilisateur user) {
return ;
if (user == owner) { return true; }
else { return false; }
}
public void AjouterCoop(Utilisateur user) {
if (VerifOwner(user)) { cooperateurs.Add(user); }
else { throw new Exception("user is not owner"); }
}
public void SupCoop(Utilisateur user) {
if (VerifOwner(user)) { cooperateurs.Remove(user); }
else { throw new Exception("user is not owner"); }
}
public void AjouterEdit(Utilisateur user) {
if (VerifOwner(user)) { editeurs.Add(user); }
else { throw new Exception("user is not owner"); }
}
public void SupEdit(Utilisateur user) {
if (VerifOwner(user)) { editeurs.Remove(user); }
else { throw new Exception("user is not owner"); }
}
}
}

@ -25,17 +25,6 @@ namespace Biblioteque_de_Class
Couleur = couleur;
}
///public Tags? RechercherTags(List<Tags> listtags,string rechercher)
///{
/// foreach (Tags tag in listtags)
/// {
/// if (tag.Nom == Nom)
/// {
/// return tag;
/// }
/// }
/// return null;
///}
public override string ToString() => $"tag -> nom : {Nom}\ncouleur : {Couleur}";
}
}

@ -17,6 +17,8 @@ namespace Biblioteque_de_Class
ListCouleur = listCouleur;
}
public override string ToString() => $"nom : {Nom}\n";
public List<string> GetColorList()
{
return ListCouleur;
@ -32,10 +34,6 @@ namespace Biblioteque_de_Class
ListCouleur[longueur] = newColor;
}
}
}
public override string ToString() => $"nom : {Nom}\n";
}
}

Loading…
Cancel
Save