|
|
|
@ -16,6 +16,10 @@ string name;
|
|
|
|
|
string name2;
|
|
|
|
|
int choixModif;
|
|
|
|
|
int choix2 = 0;
|
|
|
|
|
string color;
|
|
|
|
|
string newColor;
|
|
|
|
|
List <string> NewColorList;
|
|
|
|
|
List <string> listCouleurs;
|
|
|
|
|
|
|
|
|
|
NoteImage image = new NoteImage();
|
|
|
|
|
Database db= new Database();
|
|
|
|
@ -64,7 +68,7 @@ while (boucle == 0){
|
|
|
|
|
switch (Console.ReadLine())
|
|
|
|
|
{
|
|
|
|
|
case "1": ///Connexion
|
|
|
|
|
Utilisateur u = db.GetUtilisateur(Name);
|
|
|
|
|
u = db.GetUtilisateur(Name);
|
|
|
|
|
db.TrouverMail(u.Mail);
|
|
|
|
|
db.CorrespondPassword(u.Password);
|
|
|
|
|
if (db.ListUtilisateur.Contains(u))
|
|
|
|
@ -99,7 +103,7 @@ while (boucle == 0){
|
|
|
|
|
case "4":///Supprimer Compte
|
|
|
|
|
Console.WriteLine("Chercher utilisateur");
|
|
|
|
|
Name = Console.ReadLine();
|
|
|
|
|
Utilisateur u = db.GetUtilisateur(Name);
|
|
|
|
|
u = db.GetUtilisateur(Name);
|
|
|
|
|
db.TrouverMail(u.Mail);
|
|
|
|
|
db.CorrespondPassword(u.Password);
|
|
|
|
|
if (db.ListUtilisateur.Contains(u))
|
|
|
|
@ -171,8 +175,7 @@ while (boucle == 0){
|
|
|
|
|
|
|
|
|
|
case "13":///Supprimer un tag definitivement
|
|
|
|
|
Tags t= u.RechercherTags(name);
|
|
|
|
|
n.SuppTag(t);
|
|
|
|
|
db.SupTagBaseData(t);
|
|
|
|
|
u.SupTagToNoteList(note);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "14":///AJouter une note en favori
|
|
|
|
@ -200,7 +203,7 @@ while (boucle == 0){
|
|
|
|
|
Name2 = Console.ReadLine();
|
|
|
|
|
th = db.GetTheme(Name2);
|
|
|
|
|
th.ChangeColor(color,newColor);
|
|
|
|
|
db.ModifierNomTheme(th,NewName);
|
|
|
|
|
db.ModifierNomTheme(th,Name);
|
|
|
|
|
db.ModifierColorListTheme(th,NewColorList);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -220,8 +223,8 @@ while (boucle == 0){
|
|
|
|
|
|
|
|
|
|
case "22":///Modifier un tag
|
|
|
|
|
Console.WriteLine("Cherchez un tag");
|
|
|
|
|
t = Console.ReadLine();
|
|
|
|
|
t.Nom.set();
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
t.Nom.set(nom);
|
|
|
|
|
t.Couleur.set();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -265,7 +268,7 @@ while (boucle == 0){
|
|
|
|
|
case "26":///Modifier les editeurs
|
|
|
|
|
Console.WriteLine("Ajouter editeur ou supprimer editeur ? (0/1)");
|
|
|
|
|
choix2 = Console.ReadLine();
|
|
|
|
|
n.VerifPriviledge(user);
|
|
|
|
|
n.VerifPriviledge(u);
|
|
|
|
|
if (true && choix2 == 0)
|
|
|
|
|
{
|
|
|
|
|
n.AjouterEdit(u, user);
|
|
|
|
|