From 89a6555b50b2ad9bf3614a1f13301cbfcab9f3bf Mon Sep 17 00:00:00 2001 From: Matheo THIERRY Date: Fri, 28 Apr 2023 12:02:28 +0200 Subject: [PATCH] =?UTF-8?q?MODIF=20and=20ADD=20=C3=A9volution=20possible?= =?UTF-8?q?=20uml=20et=20debut=20de=20dev=20pour=20le=20code=20voir=20si?= =?UTF-8?q?=20nouvelle=20branche=20pour=20fonctionnalit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Uml_NotusApp.mdj | 308 +++++----------------- notus/Biblioteque_de_Class/Database.cs | 14 + notus/Biblioteque_de_Class/Note.cs | 2 + notus/Biblioteque_de_Class/Tags.cs | 40 +++ notus/Biblioteque_de_Class/Theme.cs | 41 +++ notus/Biblioteque_de_Class/Utilisateur.cs | 5 +- notus/Notus_Console/Notus_Console.csproj | 4 + notus/Notus_Console/Program.cs | 113 +++++++- 8 files changed, 279 insertions(+), 248 deletions(-) create mode 100644 notus/Biblioteque_de_Class/Database.cs create mode 100644 notus/Biblioteque_de_Class/Tags.cs create mode 100644 notus/Biblioteque_de_Class/Theme.cs diff --git a/Uml_NotusApp.mdj b/Uml_NotusApp.mdj index 5c7f1bd..f4dffe9 100644 --- a/Uml_NotusApp.mdj +++ b/Uml_NotusApp.mdj @@ -1369,182 +1369,6 @@ "$ref": "AAAAAAGHszUGkmJeE1Y=" } }, - { - "_type": "UMLClassView", - "_id": "AAAAAAGHs1tJIWWFFvw=", - "_parent": { - "$ref": "AAAAAAFF+qBtyKM79qY=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "subViews": [ - { - "_type": "UMLNameCompartmentView", - "_id": "AAAAAAGHs1tJIWWGGNU=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "subViews": [ - { - "_type": "LabelView", - "_id": "AAAAAAGHs1tJIWWHR+I=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWGGNU=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 784, - "top": 192, - "height": 13 - }, - { - "_type": "LabelView", - "_id": "AAAAAAGHs1tJIWWIG8o=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWGGNU=" - }, - "font": "Arial;13;1", - "left": 901, - "top": 791, - "width": 153.537109375, - "height": 13, - "text": "SetTheme" - }, - { - "_type": "LabelView", - "_id": "AAAAAAGHs1tJIWWJptc=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWGGNU=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 784, - "top": 192, - "width": 73.67724609375, - "height": 13, - "text": "(from Model)" - }, - { - "_type": "LabelView", - "_id": "AAAAAAGHs1tJIWWKk58=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWGGNU=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 784, - "top": 192, - "height": 13, - "horizontalAlignment": 1 - } - ], - "font": "Arial;13;0", - "left": 896, - "top": 784, - "width": 163.537109375, - "height": 25, - "stereotypeLabel": { - "$ref": "AAAAAAGHs1tJIWWHR+I=" - }, - "nameLabel": { - "$ref": "AAAAAAGHs1tJIWWIG8o=" - }, - "namespaceLabel": { - "$ref": "AAAAAAGHs1tJIWWJptc=" - }, - "propertyLabel": { - "$ref": "AAAAAAGHs1tJIWWKk58=" - } - }, - { - "_type": "UMLAttributeCompartmentView", - "_id": "AAAAAAGHs1tJIWWLFZc=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "font": "Arial;13;0", - "left": 896, - "top": 809, - "width": 163.537109375, - "height": 10 - }, - { - "_type": "UMLOperationCompartmentView", - "_id": "AAAAAAGHs1tJIWWMSO8=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "font": "Arial;13;0", - "left": 896, - "top": 819, - "width": 163.537109375, - "height": 10 - }, - { - "_type": "UMLReceptionCompartmentView", - "_id": "AAAAAAGHs1tJIWWN4/0=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 392, - "top": 96, - "width": 10, - "height": 10 - }, - { - "_type": "UMLTemplateParameterCompartmentView", - "_id": "AAAAAAGHs1tJIWWOOTo=", - "_parent": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" - }, - "model": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 392, - "top": 96, - "width": 10, - "height": 10 - } - ], - "font": "Arial;13;0", - "containerChangeable": true, - "left": 896, - "top": 784, - "width": 163.537109375, - "height": 105, - "nameCompartment": { - "$ref": "AAAAAAGHs1tJIWWGGNU=" - }, - "attributeCompartment": { - "$ref": "AAAAAAGHs1tJIWWLFZc=" - }, - "operationCompartment": { - "$ref": "AAAAAAGHs1tJIWWMSO8=" - }, - "receptionCompartment": { - "$ref": "AAAAAAGHs1tJIWWN4/0=" - }, - "templateParameterCompartment": { - "$ref": "AAAAAAGHs1tJIWWOOTo=" - } - }, { "_type": "UMLClassView", "_id": "AAAAAAGHs2HK42c8byg=", @@ -1573,8 +1397,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1440, - "top": 400, + "left": 272, + "top": 432, "height": 13 }, { @@ -1584,8 +1408,8 @@ "$ref": "AAAAAAGHs2HK42c9P1Y=" }, "font": "Arial;13;1", - "left": 1253, - "top": 791, + "left": 669, + "top": 807, "width": 160.4052734375, "height": 13, "text": "Theme" @@ -1598,8 +1422,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1440, - "top": 400, + "left": 272, + "top": 432, "width": 73.67724609375, "height": 13, "text": "(from Model)" @@ -1612,15 +1436,15 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1440, - "top": 400, + "left": 272, + "top": 432, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 1248, - "top": 784, + "left": 664, + "top": 800, "width": 170.4052734375, "height": 25, "stereotypeLabel": { @@ -1656,8 +1480,8 @@ "$ref": "AAAAAAGHs2HpZ2dkozw=" }, "font": "Arial;13;0", - "left": 1253, - "top": 814, + "left": 669, + "top": 830, "width": 160.4052734375, "height": 13, "text": "-listeCouleur: list ", @@ -1665,8 +1489,8 @@ } ], "font": "Arial;13;0", - "left": 1248, - "top": 809, + "left": 664, + "top": 825, "width": 170.4052734375, "height": 23 }, @@ -1680,8 +1504,8 @@ "$ref": "AAAAAAGHs2HK4mc6StU=" }, "font": "Arial;13;0", - "left": 1248, - "top": 832, + "left": 664, + "top": 848, "width": 170.4052734375, "height": 10 }, @@ -1696,8 +1520,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 720, - "top": 200, + "left": 136, + "top": 216, "width": 10, "height": 10 }, @@ -1712,16 +1536,16 @@ }, "visible": false, "font": "Arial;13;0", - "left": 720, - "top": 200, + "left": 136, + "top": 216, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 1248, - "top": 784, + "left": 664, + "top": 800, "width": 170.4052734375, "height": 105, "nameCompartment": { @@ -1761,8 +1585,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 993, - "top": 744, + "left": 704, + "top": 692, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -1782,8 +1606,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 1008, - "top": 744, + "left": 708, + "top": 706, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -1803,8 +1627,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 964, - "top": 743, + "left": 695, + "top": 663, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -1824,8 +1648,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 994, - "top": 737, + "left": 865, + "top": 647, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -1845,8 +1669,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1007, - "top": 740, + "left": 867, + "top": 660, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -1866,8 +1690,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 966, - "top": 732, + "left": 862, + "top": 619, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -1886,12 +1710,12 @@ "$ref": "AAAAAAGHwVHBhV+9K5M=" }, "font": "Arial;13;0", - "left": 984, - "top": 760, + "left": 535, + "top": 704, "width": 48.0517578125, "height": 13, - "alpha": -1.0552473341080453, - "distance": 34.48187929913333, + "alpha": 0.2432285905158279, + "distance": 52.839379254491625, "hostEdge": { "$ref": "AAAAAAGHwVHBhl+/C6c=" }, @@ -1908,7 +1732,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1007, + "left": 547, "top": 749, "height": 13, "alpha": -0.7853981633974483, @@ -1927,8 +1751,8 @@ "$ref": "AAAAAAGHwVHBhV+9K5M=" }, "font": "Arial;13;0", - "left": 945, - "top": 759, + "left": 513, + "top": 703, "width": 21.68359375, "height": 13, "alpha": -5.348897275791532, @@ -1973,13 +1797,13 @@ ], "font": "Arial;13;0", "head": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" + "$ref": "AAAAAAGHsxATrmDNnOM=" }, "tail": { "$ref": "AAAAAAGHszJKAGG0NQ0=" }, "lineStyle": 1, - "points": "980:717;978:783", + "points": "887:632;513:736", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGHwVHBhl/Apoc=" @@ -3597,8 +3421,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1153, - "top": 815, + "left": 592, + "top": 785, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -3618,8 +3442,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 1153, - "top": 800, + "left": 596, + "top": 771, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -3639,8 +3463,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1153, - "top": 845, + "left": 583, + "top": 814, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -3660,8 +3484,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1085, - "top": 815, + "left": 542, + "top": 771, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -3681,8 +3505,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1088, - "top": 801, + "left": 547, + "top": 759, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -3702,8 +3526,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1081, - "top": 842, + "left": 530, + "top": 796, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -3722,8 +3546,8 @@ "$ref": "AAAAAAGHwXrkljsW6h4=" }, "font": "Arial;13;0", - "left": 1168, - "top": 815, + "left": 589, + "top": 796, "width": 71.169921875, "height": 13, "alpha": -0.30805284668983113, @@ -3744,8 +3568,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1218, - "top": 801, + "left": 643, + "top": 787, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -3763,9 +3587,9 @@ "$ref": "AAAAAAGHwXrkljsW6h4=" }, "font": "Arial;13;0", - "left": 1223, - "top": 842, - "width": 5.05908203125, + "left": 635, + "top": 828, + "width": 6.5, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -3808,10 +3632,10 @@ "$ref": "AAAAAAGHs2HK42c8byg=" }, "tail": { - "$ref": "AAAAAAGHs1tJIWWFFvw=" + "$ref": "AAAAAAGHsxATrmDNnOM=" }, "lineStyle": 1, - "points": "1060:836;1247:836", + "points": "513:785;663:828", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGHwXrkljsZ58k=" @@ -4289,7 +4113,7 @@ }, "name": "Theme", "reference": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" + "$ref": "AAAAAAGHsxATrWDLbqE=" }, "visibility": "private", "navigable": "navigable", @@ -4738,7 +4562,7 @@ "$ref": "AAAAAAGHwXrkljsUu9c=" }, "reference": { - "$ref": "AAAAAAGHs1tJIWWDEBQ=" + "$ref": "AAAAAAGHsxATrWDLbqE=" }, "navigable": false }, diff --git a/notus/Biblioteque_de_Class/Database.cs b/notus/Biblioteque_de_Class/Database.cs new file mode 100644 index 0000000..3b58a96 --- /dev/null +++ b/notus/Biblioteque_de_Class/Database.cs @@ -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 Database + { + List listDefaultLogo; + + } +} diff --git a/notus/Biblioteque_de_Class/Note.cs b/notus/Biblioteque_de_Class/Note.cs index 3530a5c..ec7224e 100644 --- a/notus/Biblioteque_de_Class/Note.cs +++ b/notus/Biblioteque_de_Class/Note.cs @@ -39,5 +39,7 @@ namespace Biblioteque_de_Class return null; } + public override string ToString() => $"note -> nom : {Nom}\nlogoPATH : {LogoPATH}\nhow many line : {listeLigneTexte.Count()}"; + } } diff --git a/notus/Biblioteque_de_Class/Tags.cs b/notus/Biblioteque_de_Class/Tags.cs new file mode 100644 index 0000000..af4924f --- /dev/null +++ b/notus/Biblioteque_de_Class/Tags.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Biblioteque_de_Class +{ + internal class Tags + { + public string Nom { get; set; } + public string Couleur { get; set; } + public Tags(string nom, string couleur) + { + Nom = nom; + Couleur = couleur; + } + + public void ChangerNom(string nom) + { + Nom = nom; + } + public void ChangerCouleur(string couleur) + { + Couleur = couleur; + } + + public Tags? RechercherTags(List listtags,string rechercher) + { + foreach (Tags tag in listtags) + { + if (tag.Nom == Nom) + { + return tag; + } + } + return null; + } + } +} diff --git a/notus/Biblioteque_de_Class/Theme.cs b/notus/Biblioteque_de_Class/Theme.cs new file mode 100644 index 0000000..03af24c --- /dev/null +++ b/notus/Biblioteque_de_Class/Theme.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Biblioteque_de_Class +{ + internal class Theme + { + public string Nom { get; set; } + List ListCouleur; + + public Theme(string nom, List listCouleur) + { + Nom = nom; + ListCouleur = listCouleur; + } + + public List GetColorList() + { + return ListCouleur; + } + + public void ChangeColor(string color, string newColor) + { + int longueur = 0; + for (longueur = ListCouleur.Count; longueur != 0; longueur-- ) + { + if (ListCouleur[longueur] == color) + { + ListCouleur[longueur] = newColor; + } + } + + } + + public override string ToString() => $"nom : {Nom}\n"; + + } +} diff --git a/notus/Biblioteque_de_Class/Utilisateur.cs b/notus/Biblioteque_de_Class/Utilisateur.cs index 1aa6cea..37a33a7 100644 --- a/notus/Biblioteque_de_Class/Utilisateur.cs +++ b/notus/Biblioteque_de_Class/Utilisateur.cs @@ -15,10 +15,7 @@ NoteList = new List(); } - public override string ToString() - { - return $"pseudo : {Psd}\nmail : {Mail}\npassword : {Mdp}\nNote possédé : { NoteList.Count}"; - } + public override string ToString() => $"pseudo : {Psd}\nmail : {Mail}\npassword : {Mdp}\nNote possédé : {NoteList.Count}"; } } \ No newline at end of file diff --git a/notus/Notus_Console/Notus_Console.csproj b/notus/Notus_Console/Notus_Console.csproj index d439800..75d1b7d 100644 --- a/notus/Notus_Console/Notus_Console.csproj +++ b/notus/Notus_Console/Notus_Console.csproj @@ -7,4 +7,8 @@ enable + + + + diff --git a/notus/Notus_Console/Program.cs b/notus/Notus_Console/Program.cs index 83fa4f4..32b8e8a 100644 --- a/notus/Notus_Console/Program.cs +++ b/notus/Notus_Console/Program.cs @@ -1,2 +1,111 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); +using Biblioteque_de_Class; + +int boucle = 0; +while (boucle == 0){ + int choix = 0; + Console.WriteLine("|--------------------------------------|"); + Console.WriteLine("| |"); + Console.WriteLine("| Menu pour lister les fonctionnalités |"); + Console.WriteLine("| |"); + Console.WriteLine("|--------------------------------------|--------|"); + Console.WriteLine("| |"); + Console.WriteLine("| 1/se connecter |"); + Console.WriteLine("| 2/se déconnecter |"); + Console.WriteLine("| 3/créer un compte |"); + Console.WriteLine("| 4/supprimer un compte |"); + Console.WriteLine("| 5/créer note |"); + Console.WriteLine("| 6/supprimer note |"); + Console.WriteLine("| 7/créer tag |"); + Console.WriteLine("| 8/supprimer tag |"); + Console.WriteLine("| 9/ajouter image |"); + Console.WriteLine("| 10/supprimer image |"); + Console.WriteLine("| 11/déplacer image |"); + Console.WriteLine("| 12/ajouter qql à la note |"); + Console.WriteLine("| 13/supprimer qql à la note |"); + Console.WriteLine("| 14/ajouter des couleurs |"); + Console.WriteLine("| 15/créer un thème |"); + Console.WriteLine("| 16/supprimer un thème |"); + Console.WriteLine("| 17/modifier un thème |"); + Console.WriteLine("| 18/rechercher une note |"); + Console.WriteLine("| 19/rechercher une note avec tags |"); + Console.WriteLine("| 19/rechercher une note avec date |"); + Console.WriteLine("| 20/modifier tags |"); + Console.WriteLine("| 21/modifier compte |"); + Console.WriteLine("| 22/modifier note |"); + Console.WriteLine("| |"); + Console.WriteLine("|-----------------------------------------------|"); + switch (Console.ReadLine()) + { + case "1": + + break; + case "2": + + break; + case "3": + + break; + case "4": + + break; + case "5": + + break; + case "6": + + break; + case "7": + + break; + case "8": + + break; + case "9": + + break; + case "10": + + break; + case "11": + + break; + case "12": + + break; + case "13": + + break; + case "14": + + break; + case "15": + + break; + case "16": + + break; + case "17": + + break; + case "18": + + break; + case "19": + + break; + case "20": + + break; + case "21": + + break; + case "22": + + break; + default: + Console.WriteLine("< Veuillez rentrer une des options proposées à l'ecran ! >"); + break; + } + + +} \ No newline at end of file