tri variables
continuous-integration/drone/push Build is failing Details

pull/19/head
Liam MONCHANIN 2 years ago
parent 40c88de727
commit 0f995e1684

@ -2,39 +2,34 @@
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics; using System.Diagnostics;
string Upseudo;
Console.WriteLine("Coucou"); string Umail;
string Upseudo = "u"; string Upassword;
string Umail = "u"; string nomImag;
string Upassword = "u"; string linkimage;
string Name = "u"; string position;
string Name2 = "u"; string nomNote;
string nom = "u"; string logoPath;
string nom2 = "u"; string NomTag;
string logoPath = "u"; string color;
string choixNom = "u"; string nom;
string choixCouleur = "u"; string choixNom;
string pos = "u"; string choixCouleur;
string _image = "u";
string name2 = "u";
string choixModif; string choixModif;
string choix2; string _image;
string color = "u"; string choix;
string couleur = "u"; string newColor;
string newColor = "u";
string position = "u";
string linkimage = "u";
List<string> NewColorList; List<string> NewColorList;
List<string> listCouleurs; List<string> listCouleurs;
List<Note> _searchedNotes; List<Note> _searchedNotes;
List<Tags> _searchedTags; List<Tags> _searchedTags;
User user = new User(Upseudo, Umail, Upassword); User user = new User(Upseudo, Umail, Upassword);
NoteImage image = new NoteImage(nom2, linkimage, position); NoteImage image = new NoteImage(nomImage, linkimage, position);
Database db = new Database(); Database db = new Database();
User u = new User(Upseudo, Umail, Upassword); User u = new User(Upseudo, Umail, Upassword);
Note n = new Note(nom, logoPath, u); Note n = new Note(nomNote, logoPath, u);
Tags t = new Tags(nom, couleur); Tags t = new Tags(NomTag, color);
int boucle = 0; int boucle = 0;
while (boucle == 0) while (boucle == 0)
@ -78,7 +73,7 @@ while (boucle == 0)
switch (Console.ReadLine()) switch (Console.ReadLine())
{ {
case "1": ///Connexion case "1": ///Connexion
u = db.GetUser(Name); u = db.GetUser(nom);
db.FindEmail(u.GetEmail); db.FindEmail(u.GetEmail);
db.ComparePassword(u.GetPassword); db.ComparePassword(u.GetPassword);
if (db.UserList.Contains(u)) if (db.UserList.Contains(u))
@ -110,7 +105,7 @@ while (boucle == 0)
break; break;
case "4":///Supprimer Compte case "4":///Supprimer Compte
Console.WriteLine("Chercher utilisateur"); Console.WriteLine("Chercher utilisateur");
Name = Console.ReadLine(); nom = Console.ReadLine();
u = db.GetUser(Name); u = db.GetUser(Name);
db.FindEmail(u.GetEmail); db.FindEmail(u.GetEmail);
db.ComparePassword(u.GetPassword); db.ComparePassword(u.GetPassword);
@ -147,8 +142,8 @@ while (boucle == 0)
case "8":///Ajouter un tag a une note case "8":///Ajouter un tag a une note
Console.WriteLine("Cherchez une note"); Console.WriteLine("Cherchez une note");
name2 = Console.ReadLine(); nom = Console.ReadLine();
_searchedNotes = u.SearchNoteByName(name2); _searchedNotes = u.SearchNoteByName(nom);
Console.WriteLine("Cherchez un tag"); Console.WriteLine("Cherchez un tag");
nom = Console.ReadLine(); nom = Console.ReadLine();
_searchedTags = u.SearchTagByName(nom); ///A voir pour faire correctement _searchedTags = u.SearchTagByName(nom); ///A voir pour faire correctement
@ -159,8 +154,8 @@ while (boucle == 0)
case "9":///Supprimer un tag a une note case "9":///Supprimer un tag a une note
Console.WriteLine("Cherchez une note"); Console.WriteLine("Cherchez une note");
name2 = Console.ReadLine(); nom = Console.ReadLine();
_searchedNotes = u.SearchNoteByName(name2); _searchedNotes = u.SearchNoteByName(nom);
Console.WriteLine("Cherchez un tag"); Console.WriteLine("Cherchez un tag");
nom = Console.ReadLine(); nom = Console.ReadLine();
_searchedTags = u.SearchTagByName(nom); ///A voir pour faire correctement _searchedTags = u.SearchTagByName(nom); ///A voir pour faire correctement
@ -170,7 +165,7 @@ while (boucle == 0)
break; break;
case "10":///Ajouter une image case "10":///Ajouter une image
n.AddImage(_image, pos); n.AddImage(_image, position);
break; break;
case "11":///Supprimer une image case "11":///Supprimer une image
@ -178,7 +173,7 @@ while (boucle == 0)
break; break;
case "12":///Deplacer une image case "12":///Deplacer une image
//n.DeplacerImage(image); image.SetPosition(position);
break; break;
case "13":///Supprimer un tag definitivement case "13":///Supprimer un tag definitivement
@ -209,8 +204,8 @@ while (boucle == 0)
case "18":///Modifier un theme case "18":///Modifier un theme
Console.WriteLine("Cherchez un theme a modifier"); Console.WriteLine("Cherchez un theme a modifier");
Name2 = Console.ReadLine(); nom = Console.ReadLine();
th = db.GetTheme(Name2); th = db.GetTheme(nom);
th.ChangeColor(color, newColor); th.ChangeColor(color, newColor);
db.ModifyThemeName(th, Name); db.ModifyThemeName(th, Name);
db.ModifyThemeColorList(th, NewColorList); db.ModifyThemeColorList(th, NewColorList);
@ -280,12 +275,12 @@ while (boucle == 0)
n.VerifyPrivilege(u); n.VerifyPrivilege(u);
if (true && choix2.Equals('0')) if (true && choix2.Equals('0'))
{ {
user = db.GetUser(Name); user = db.GetUser(nom);
n.AddEditor(u, user); n.AddEditor(u, user);
} }
if (true && choix2.Equals('1')) if (true && choix2.Equals('1'))
{ {
user = db.GetUser(Name); user = db.GetUser(nom);
n.RemoveEditor(u, user); n.RemoveEditor(u, user);
} }
break; break;
@ -294,7 +289,7 @@ while (boucle == 0)
n.VerifyPrivilege(u); n.VerifyPrivilege(u);
if (true) if (true)
{ {
user = db.GetUser(Name); user = db.GetUser(nom);
n.RemoveCollaborator(u, user); n.RemoveCollaborator(u, user);
} }
break; break;

Loading…
Cancel
Save