début du C#

pull/1/head
Vianney JOURDY 2 years ago
parent 9a461219e5
commit ed44acf093

@ -82,4 +82,8 @@
</MauiXaml>
</ItemGroup>
<ItemGroup>
<Folder Include="NewFolder\" />
</ItemGroup>
</Project>

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
class Admin
{
public int Id { get; private set; }
public Admin(int id)
{ this.Id = id; }
}
}

@ -0,0 +1,23 @@
using System;
using MangaMap.Model;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
class Liste
{
public string Nom { get; private set; }
public int NbAnime { get; private set; }
public Oeuvre[] AnimeListe { get; private set; }
public Liste(string nom, int nbAnime)
{
Nom = nom;
NbAnime = nbAnime;
AnimeListe = null;
}
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
class Oeuvre
{
public string Nom { get; private set; }
public string[] Genre { get; private set; }
public string Type { get; private set; }
public string Description { get; private set; }
public int Note { get; private set; }
public int NbEpisodes { get; private set; }
public Oeuvre(string nom, string[] genre, string type, string description, int note, int nbEpisode)
{
Nom = nom;
Genre = genre;
Type = type;
Description = description;
Note = note;
NbEpisodes = nbEpisode;
}
public void AjouterEpisode(int nb)
{
NbEpisodes = NbEpisodes + nb;
}
}
}

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
class Personne
{
public string MotDePasse { get; private set; }
public string Email { get; private set; }
public string Pseudo { get; private set; }
/*public Liste[] Listes { get; private set; }*/
public Personne(string mdp, string email, string pseudo)
{
Email = email;
Pseudo = pseudo;
MotDePasse = mdp;
}
public bool MofifierMotDePasse(string MotDePasse)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.MotDePasse = MotDePasse.Trim();
return true;
}
return false;
}
public bool MofifierEmail(string Email)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.Email = Email.Trim();
return true;
}
return false;
}
public bool MofifierPseudo(string Pseudo)
{
string test = "";
test = Console.ReadLine();
if (test == this.MotDePasse)
{
this.Pseudo = Pseudo.Trim();
return true;
}
return false;
}
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MangaMap.Model
{
class Utilisateur
{
public string nom { get; private set; }
public string prenom { get; private set; }
public int age { get; private set; }
public Utilisateur(string nom, string prenom, int age)
{
this.nom = nom;
this.prenom = prenom;
this.age = age;
}
public void SupprimerUtilisateur()
{
this.nom = null;
this.prenom = null;
this.age = 0;
}
}
}
Loading…
Cancel
Save