|
|
|
@ -73,12 +73,16 @@ while (boucle == 0)
|
|
|
|
|
switch (Console.ReadLine())
|
|
|
|
|
{
|
|
|
|
|
case "1": ///Connexion
|
|
|
|
|
Console.WriteLine("Entrez votre nom.");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
u = db.GetUser(nom);
|
|
|
|
|
db.FindEmail(u.GetEmail);
|
|
|
|
|
db.ComparePassword(u.GetPassword);
|
|
|
|
|
Umail = u.GetEmail();
|
|
|
|
|
Upassword = u.GetPassword();
|
|
|
|
|
db.FindEmail(Umail);
|
|
|
|
|
db.ComparePassword(u,Upassword);
|
|
|
|
|
if (db.UserList.Contains(u))
|
|
|
|
|
{
|
|
|
|
|
u.SetsConnected(true);
|
|
|
|
|
u.SetIsConnected(true);
|
|
|
|
|
Console.WriteLine("Connecté");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -106,9 +110,11 @@ while (boucle == 0)
|
|
|
|
|
case "4":///Supprimer Compte
|
|
|
|
|
Console.WriteLine("Chercher utilisateur");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
u = db.GetUser(Name);
|
|
|
|
|
db.FindEmail(u.GetEmail);
|
|
|
|
|
db.ComparePassword(u.GetPassword);
|
|
|
|
|
u = db.GetUser(nom);
|
|
|
|
|
Umail = u.GetEmail();
|
|
|
|
|
db.FindEmail(Umail);
|
|
|
|
|
Upassword = u.GetPassword();
|
|
|
|
|
db.ComparePassword(u,Upassword);
|
|
|
|
|
if (db.UserList.Contains(u))
|
|
|
|
|
{
|
|
|
|
|
db.RemoveUser(u);
|
|
|
|
@ -187,6 +193,7 @@ while (boucle == 0)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "15":///Supprimer une note des favoris
|
|
|
|
|
Console.WriteLine("Chercher note");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
u.SearchNoteByName(nom);
|
|
|
|
|
u.RemoveFavorite(n);
|
|
|
|
@ -207,7 +214,7 @@ while (boucle == 0)
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
th = db.GetTheme(nom);
|
|
|
|
|
th.ChangeColor(color, newColor);
|
|
|
|
|
db.ModifyThemeName(th, Name);
|
|
|
|
|
db.ModifyThemeName(th,nom);
|
|
|
|
|
db.ModifyThemeColorList(th, NewColorList);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -228,8 +235,10 @@ while (boucle == 0)
|
|
|
|
|
case "22":///Modifier un tag
|
|
|
|
|
Console.WriteLine("Cherchez un tag");
|
|
|
|
|
nom = Console.ReadLine();
|
|
|
|
|
Console.WriteLine("Choisisez une couleur");
|
|
|
|
|
color = Console.ReadLine();
|
|
|
|
|
t.SetName(nom);
|
|
|
|
|
t.SetColor();
|
|
|
|
|
t.SetColor(color);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "23":///Modifier le compte
|
|
|
|
@ -237,15 +246,21 @@ while (boucle == 0)
|
|
|
|
|
choixModif = Console.ReadLine();
|
|
|
|
|
if (choixModif.Equals('0'))
|
|
|
|
|
{
|
|
|
|
|
u.SetUsername();
|
|
|
|
|
Console.WriteLine("Entrez votre nouveau pseudo");
|
|
|
|
|
Upseudo = Console.ReadLine();
|
|
|
|
|
u.SetUsername(Upseudo);
|
|
|
|
|
}
|
|
|
|
|
if (choixModif.Equals('1'))
|
|
|
|
|
{
|
|
|
|
|
u.SetPassword();
|
|
|
|
|
Console.WriteLine("Entrez votre nouveau mot de passe");
|
|
|
|
|
Upassword = Console.ReadLine();
|
|
|
|
|
u.SetPassword(Upassword);
|
|
|
|
|
}
|
|
|
|
|
if (choixModif.Equals('2'))
|
|
|
|
|
{
|
|
|
|
|
u.SetEmail();
|
|
|
|
|
Console.WriteLine("Entrez votre nouvelle adresse mail");
|
|
|
|
|
Umail = Console.ReadLine();
|
|
|
|
|
u.SetEmail(Umail);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|