You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
using System.Runtime.CompilerServices;
|
|
|
|
namespace Biblioteque_de_Class
|
|
{
|
|
public class Utilisateur
|
|
{
|
|
private string Psd { get; set; }
|
|
private string Mail { get; set; }
|
|
private string Mdp { get; set; }
|
|
private List<Utilisateur> listUtilisateur;
|
|
|
|
public Utilisateur(string Upseudo, string Umail, string Upassword)
|
|
{
|
|
Psd = Upseudo;
|
|
Mail=Umail;
|
|
Mdp = Upassword;
|
|
Note.ListNote = new List<Note>();
|
|
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"pseudo : {Psd}\nmail : {Mail}\npassword : {Mdp}\nNote possédé : { Note.ListNote.Count}";
|
|
}
|
|
|
|
public int SeConnecter(string pseudo,string mail,string password)
|
|
{
|
|
if (pseudo == this.Psd && mail == this.Mail && password == this.Mdp)
|
|
return 0;
|
|
if (pseudo != this.Psd && mail == this.Mail && password == this.Mdp)
|
|
return 1;
|
|
if (pseudo == this.Psd && mail != this.Mail && password == this.Mdp)
|
|
return 2;
|
|
if (pseudo == this.Psd && mail == this.Mail && password != this.Mdp)
|
|
return 3;
|
|
return 0;
|
|
}
|
|
}
|
|
} |