ajout de class pour image dans note

vSonar_test
Matheo THIERRY 2 years ago
parent 0515e68687
commit 1750c3be92

@ -22,9 +22,8 @@ namespace Biblioteque_de_Class
} }
private DateOnly DateCreation { get;} private DateOnly DateCreation { get;}
private DateOnly DateModif { get; set; } private DateOnly DateModif { get; set; }
private List<String> listeImage; private List<NoteImage> listeImage;
private List<String> listeLigneTexte; private List<String> listeLigneTexte;
private List<String> listePosiImage;
private List<Utilisateur> cooperateurs; private List<Utilisateur> cooperateurs;
private List<Utilisateur> editeurs; private List<Utilisateur> editeurs;
private Utilisateur owner; private Utilisateur owner;
@ -64,12 +63,20 @@ namespace Biblioteque_de_Class
else { return false; } else { return false; }
} }
public void AjouterImage(string image) public void AjouterImage(string linkImage, string position)
{ {
foreach (NoteImage image in listeImage)
{
if (image.GetLinkImage() == linkImage)
{
name = listeImage.Count();
}
}
} }
public void SuppImage(string image) public void SuppImage(string image)
{ {
/// il faut une nouvelle structure pour pouvoir stocker les images
} }
/// <summary> /// <summary>

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
internal class NoteImage
{
private string Nom { get; set; }
private string LinkImage { get; set; }
private string Position { get; set; }
public NoteImage(string nom, string linkimage, string position)
{
Nom = nom;
LinkImage = linkimage;
Position = position;
}
public string GetNom() { return Nom; }
public string GetLinkImage() { return LinkImage; }
public string GetPosition() { return Position; }
public override string ToString() => $"image -> nom : {Nom}\nlink : {LinkImage}";
}
}
Loading…
Cancel
Save