|
|
|
@ -5,13 +5,12 @@ using System.Diagnostics;
|
|
|
|
|
string Upseudo = "u";
|
|
|
|
|
string Umail = "u";
|
|
|
|
|
string Upassword = "u";
|
|
|
|
|
string nomImag = "u";
|
|
|
|
|
string nomImage = "u";
|
|
|
|
|
string linkimage = "u";
|
|
|
|
|
string position = "u";
|
|
|
|
|
string nomNote = "u";
|
|
|
|
|
string logoPath = "u";
|
|
|
|
|
string NomTag = "u";
|
|
|
|
|
string color = "u";
|
|
|
|
|
string nom = "u";
|
|
|
|
|
string choixNom;
|
|
|
|
|
string choixCouleur;
|
|
|
|
@ -19,10 +18,15 @@ string choixModif;
|
|
|
|
|
string _image = "u";
|
|
|
|
|
string choix = "u";
|
|
|
|
|
string newColor = "u";
|
|
|
|
|
List<string> NewColorList;
|
|
|
|
|
List<string> listCouleurs;
|
|
|
|
|
string color = "u";
|
|
|
|
|
string color2;
|
|
|
|
|
string color3;
|
|
|
|
|
List<string> NewColorList = new List<string> { };
|
|
|
|
|
List<string> listCouleurs = new List<string> { };
|
|
|
|
|
List<Note> _searchedNotes;
|
|
|
|
|
List<Note> NoteListe;
|
|
|
|
|
List<Tags> _searchedTags;
|
|
|
|
|
List<User> UserListe;
|
|
|
|
|
|
|
|
|
|
User user = new User(Upseudo, Umail, Upassword);
|
|
|
|
|
NoteImage image = new NoteImage(nomImage, linkimage, position);
|
|
|
|
@ -80,7 +84,8 @@ while (boucle == 0)
|
|
|
|
|
Upassword = u.GetPassword();
|
|
|
|
|
db.FindEmail(Umail);
|
|
|
|
|
db.ComparePassword(u,Upassword);
|
|
|
|
|
if (db.UserList.Contains(u))
|
|
|
|
|
UserListe = db.GetUserList();
|
|
|
|
|
if (UserListe.Contains(u))
|
|
|
|
|
{
|
|
|
|
|
u.SetIsConnected(true);
|
|
|
|
|
Console.WriteLine("Connecté");
|
|
|
|
@ -115,7 +120,8 @@ while (boucle == 0)
|
|
|
|
|
db.FindEmail(Umail);
|
|
|
|
|
Upassword = u.GetPassword();
|
|
|
|
|
db.ComparePassword(u,Upassword);
|
|
|
|
|
if (db.UserList.Contains(u))
|
|
|
|
|
UserListe = db.GetUserList();
|
|
|
|
|
if (UserListe.Contains(u))
|
|
|
|
|
{
|
|
|
|
|
db.RemoveUser(u);
|
|
|
|
|
Console.WriteLine("Compte supprimé avec succès.");
|
|
|
|
@ -200,6 +206,15 @@ while (boucle == 0)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "16":///Creer un theme
|
|
|
|
|
Console.WriteLine("Choisissez un nom pour votre theme");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
Console.WriteLine("Choisissez trois couleurs");
|
|
|
|
|
color = Console.ReadLine();
|
|
|
|
|
color2 = Console.ReadLine();
|
|
|
|
|
color3 = Console.ReadLine();
|
|
|
|
|
listCouleurs.Add(color);
|
|
|
|
|
listCouleurs.Add(color2);
|
|
|
|
|
listCouleurs.Add(color3);
|
|
|
|
|
Theme th = new Theme(nom, listCouleurs);
|
|
|
|
|
db.AddTheme(th);
|
|
|
|
|
break;
|
|
|
|
@ -215,13 +230,21 @@ while (boucle == 0)
|
|
|
|
|
th = db.GetTheme(nom);
|
|
|
|
|
th.ChangeColor(color, newColor);
|
|
|
|
|
db.ModifyThemeName(th,nom);
|
|
|
|
|
Console.WriteLine("Choisissez trois couleurs");
|
|
|
|
|
color = Console.ReadLine();
|
|
|
|
|
color2 = Console.ReadLine();
|
|
|
|
|
color3 = Console.ReadLine();
|
|
|
|
|
NewColorList.Add(color);
|
|
|
|
|
NewColorList.Add(color2);
|
|
|
|
|
NewColorList.Add(color3);
|
|
|
|
|
db.ModifyThemeColorList(th, NewColorList);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "19":///Rechercher une note
|
|
|
|
|
Console.WriteLine("Cherchez une note");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
u.SearchNoteByName(u.NoteList, nom);
|
|
|
|
|
NoteListe = u.GetNoteList();
|
|
|
|
|
u.SearchNoteByName(nom);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "20":///Recherche note par tag
|
|
|
|
@ -268,7 +291,7 @@ while (boucle == 0)
|
|
|
|
|
n.VerifyPrivilege(u);
|
|
|
|
|
if (true)
|
|
|
|
|
{
|
|
|
|
|
n.SetTextLineList();
|
|
|
|
|
//n.SetTextLineList();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|