|
|
|
@ -1,22 +1,54 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Biblioteque_de_Class
|
|
|
|
|
{
|
|
|
|
|
internal class Note
|
|
|
|
|
public class Note
|
|
|
|
|
{
|
|
|
|
|
public string nom = "Note sans nom";
|
|
|
|
|
public string logoPATH = "PATH TO DEFAULT LOGO";
|
|
|
|
|
public List<Category> tag;
|
|
|
|
|
private string nom = "Note sans nom";
|
|
|
|
|
private string logoPATH = "PATH TO DEFAULT LOGO";
|
|
|
|
|
private List<Category> tag;
|
|
|
|
|
private DateOnly DateCreation { get;}
|
|
|
|
|
public List<Note> ListNote{get; set;}
|
|
|
|
|
public int Capacity { get; private set; }
|
|
|
|
|
|
|
|
|
|
public Note(string Nnom, string llogoPATH, List<Category> basetags)
|
|
|
|
|
private List<string> Favoris;
|
|
|
|
|
|
|
|
|
|
public Note(string Nnom, string llogoPATH, string dateCreation)
|
|
|
|
|
{
|
|
|
|
|
nom = Nnom;
|
|
|
|
|
logoPATH = llogoPATH;
|
|
|
|
|
tag = basetags;
|
|
|
|
|
DateCreation = DateOnly.FromDateTime(DateTime.Now);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void TriDate(Note DateCreation,Note ListNote)
|
|
|
|
|
{
|
|
|
|
|
Note temp;
|
|
|
|
|
Note n1 = ListNote[0];
|
|
|
|
|
Note n2 = ListNote[i];
|
|
|
|
|
int i;
|
|
|
|
|
int TailleList= ListNote.Capacity;
|
|
|
|
|
for (i = 0; i < TailleList; i++)
|
|
|
|
|
{
|
|
|
|
|
if (n1.DateCreation > n2.DateCreation)
|
|
|
|
|
{
|
|
|
|
|
temp = ListNote[n1.DateCreation];
|
|
|
|
|
ListNote[n1.DateCreation] = ListNote[n2.DateCreation];
|
|
|
|
|
ListNote[n2.DateCreation] = temp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
temp = ListNote[n2.DateCreation];
|
|
|
|
|
ListNote[n2.DateCreation] = ListNote[n1.DateCreation];
|
|
|
|
|
ListNote[n1.DateCreation] = temp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|