biblioteque #9

Open
matheo.thierry wants to merge 5 commits from biblioteque into master

File diff suppressed because it is too large Load Diff

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
internal class BaseData
{
private List<string> DefautLogo { get; set; }
}
}

@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biblioteque_de_Class", "Biblioteque_de_Class.csproj", "{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notus_Console", "..\Notus_Console\Notus_Console.csproj", "{F48CF8AB-163E-4D63-B210-BDA22BE5251D}"
ProjectSection(ProjectDependencies) = postProject
{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B} = {CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC2FF847-9D3A-44F7-8672-C70A4FE87C5B}.Release|Any CPU.Build.0 = Release|Any CPU
{F48CF8AB-163E-4D63-B210-BDA22BE5251D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F48CF8AB-163E-4D63-B210-BDA22BE5251D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F48CF8AB-163E-4D63-B210-BDA22BE5251D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F48CF8AB-163E-4D63-B210-BDA22BE5251D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0AA9469C-FA7B-4AF1-9C90-056193DA2415}
EndGlobalSection
EndGlobal

@ -8,6 +8,11 @@ namespace Biblioteque_de_Class
{ {
internal class Category internal class Category
{ {
public string nom { get; set; } public string Cnom { get; set; }
Category(string nom)
{
Cnom = nom;
}
} }
} }

@ -1,22 +1,54 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Biblioteque_de_Class namespace Biblioteque_de_Class
{ {
internal class Note public class Note
{ {
public string nom = "Note sans nom"; private string nom = "Note sans nom";
public string logoPATH = "PATH TO DEFAULT LOGO"; private string logoPATH = "PATH TO DEFAULT LOGO";
public List<Category> tag; private List<Category> tag;
private DateOnly DateCreation { get;}
public List<Note> ListNote{get; set;}
public int Capacity { get; private set; }
public Note(string Nnom, string llogoPATH, List<Category> basetags) private List<string> Favoris;
public Note(string Nnom, string llogoPATH, string dateCreation)
{ {
nom = Nnom; nom = Nnom;
logoPATH = llogoPATH; logoPATH = llogoPATH;
tag = basetags; DateCreation = DateOnly.FromDateTime(DateTime.Now);
}
public void TriDate(Note DateCreation,Note ListNote)
{
Note temp;
Note n1 = ListNote[0];
Note n2 = ListNote[i];
int i;
int TailleList= ListNote.Capacity;
for (i = 0; i < TailleList; i++)
{
if (n1.DateCreation > n2.DateCreation)
{
temp = ListNote[n1.DateCreation];
ListNote[n1.DateCreation] = ListNote[n2.DateCreation];
ListNote[n2.DateCreation] = temp;
}
else
{
temp = ListNote[n2.DateCreation];
ListNote[n2.DateCreation] = ListNote[n1.DateCreation];
ListNote[n1.DateCreation] = temp;
}
}
} }
} }
} }

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
internal class SetTheme : Utilisateur
{
private string Theme { get; set; }
}
}

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
internal class Tag : Note
{
private string Tnom { get; set; }
private string Tcouleur { get; set; }
private List<Tag> listTags;
private string attributionTag { get; set; }
public Tag(string nom, string couleur)
{
Tnom = nom;
Tcouleur = couleur;
}
public int RechercherTag(Tag nom)
{
}
}
}

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Biblioteque_de_Class
{
internal class Theme : SetTheme
{
private List<string> ListeCouleur;
private List<string>[] ListeTheme;
}
}

@ -1,24 +1,39 @@
namespace Biblioteque_de_Class using System.Runtime.CompilerServices;
namespace Biblioteque_de_Class
{ {
public class Utilisateur public class Utilisateur : Note
{ {
private string Psd { get; set; } private string Psd { get; set; }
private string Mail { get; set; } private string Mail { get; set; }
private string Mdp { get; set; } private string Mdp { get; set; }
private List<Note> NoteList; private List<Utilisateur> listUtilisateur;
private bool connecté{get; set;}
public Utilisateur(string Upseudo, string Umail, string Upassword) public Utilisateur(string Upseudo, string Umail, string Upassword)
{ {
Psd = Upseudo; Psd = Upseudo;
Mail=Umail; Mail=Umail;
Mdp = Upassword; Mdp = Upassword;
NoteList = new List<Note>();
} }
public override string ToString() public override string ToString()
{ {
return $"pseudo : {Psd}\nmail : {Mail}\npassword : {Mdp}\nNote possédé : { NoteList.Count}"; 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;
}
} }
} }

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,3 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Loading…
Cancel
Save