From 09d6642bc2e961751214b274028f335ab292a522 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Dec 2023 15:26:59 +0100 Subject: [PATCH] perf : merge avec le master (commit ef3940f44e), modification de ressources en fonction et ajout de la traduction du culture selector et des pages EditChapter et AddChapter --- Blazor/Blazor/Blazor.csproj | 7 + .../Blazor/Controllers/CultureController.cs | 31 ++++ Blazor/Blazor/Modals/DeleteConfirmation.razor | 6 +- .../Blazor/Modals/DeleteConfirmation.razor.cs | 16 +- Blazor/Blazor/Models/Answer.cs | 16 ++ Blazor/Blazor/Models/PlayerModel.cs | 18 --- Blazor/Blazor/Models/QuestionModel.cs | 15 +- .../Pages/Admins/AddAdministrator.razor | 10 +- .../Pages/Admins/AddAdministrator.razor.cs | 6 +- .../Blazor/Pages/Admins/Administrators.razor | 10 +- .../Pages/Admins/Administrators.razor.cs | 25 +--- .../Pages/Admins/EditAdministrator.razor | 6 +- .../Pages/Admins/EditAdministrator.razor.cs | 6 +- Blazor/Blazor/Pages/Chapters/AddChapter.razor | 6 +- .../Blazor/Pages/Chapters/AddChapter.razor.cs | 6 +- Blazor/Blazor/Pages/Chapters/Chapters.razor | 12 +- .../Blazor/Pages/Chapters/Chapters.razor.cs | 29 +--- .../Blazor/Pages/Chapters/EditChapter.razor | 6 +- .../Pages/Chapters/EditChapter.razor.cs | 6 +- Blazor/Blazor/Pages/Players/AddPlayer.razor | 8 +- .../Blazor/Pages/Players/AddPlayer.razor.cs | 9 +- Blazor/Blazor/Pages/Players/EditPlayer.razor | 8 +- .../Blazor/Pages/Players/EditPlayer.razor.cs | 13 +- Blazor/Blazor/Pages/Players/Players.razor | 10 +- Blazor/Blazor/Pages/Players/Players.razor.cs | 26 +--- .../Blazor/Pages/Questions/AddQuestion.razor | 16 +- .../Pages/Questions/AddQuestion.razor.cs | 5 + .../Blazor/Pages/Questions/EditQuestion.razor | 16 +- .../Pages/Questions/EditQuestion.razor.cs | 4 + Blazor/Blazor/Pages/Questions/Questions.razor | 15 +- .../Blazor/Pages/Questions/Questions.razor.cs | 98 ++++++------- Blazor/Blazor/Pages/_Host.cshtml | 2 +- Blazor/Blazor/Pages/_Layout.cshtml | 2 - Blazor/Blazor/Program.cs | 35 +++++ .../Modals.DeleteConfirmation.en-US.resx | 129 ++++++++++++++++ .../Modals.DeleteConfirmation.fr-FR.resx | 129 ++++++++++++++++ .../Ressources/Modals.DeleteConfirmation.resx | 129 ++++++++++++++++ .../Pages.Admins.AddAdministrator.en-US.resx | 132 +++++++++++++++++ .../Pages.Admins.AddAdministrator.fr-FR.resx | 132 +++++++++++++++++ .../Pages.Admins.AddAdministrator.resx | 132 +++++++++++++++++ .../Pages.Admins.Administrators.en-US.resx | 135 +++++++++++++++++ .../Pages.Admins.Administrators.fr-FR.resx | 135 +++++++++++++++++ .../Pages.Admins.Administrators.resx | 135 +++++++++++++++++ .../Pages.Admins.EditAdministrator.en-US.resx | 129 ++++++++++++++++ .../Pages.Admins.EditAdministrator.fr-FR.resx | 129 ++++++++++++++++ .../Pages.Admins.EditAdministrator.resx | 129 ++++++++++++++++ .../Pages.Chapters.AddChapter.en-US.resx | 129 ++++++++++++++++ .../Pages.Chapters.AddChapter.fr-FR.resx | 129 ++++++++++++++++ .../Ressources/Pages.Chapters.AddChapter.resx | 129 ++++++++++++++++ .../Pages.Chapters.Chapters.en-US.resx | 138 ++++++++++++++++++ .../Pages.Chapters.Chapters.fr-FR.resx | 138 ++++++++++++++++++ .../Ressources/Pages.Chapters.Chapters.resx | 138 ++++++++++++++++++ .../Pages.Chapters.EditChapter.en-US.resx | 129 ++++++++++++++++ .../Pages.Chapters.EditChapter.fr-FR.resx | 129 ++++++++++++++++ .../Pages.Chapters.EditChapter.resx | 129 ++++++++++++++++ .../Pages.Players.AddPlayer.en-US.resx | 132 +++++++++++++++++ .../Pages.Players.AddPlayer.fr-FR.resx | 132 +++++++++++++++++ .../Ressources/Pages.Players.AddPlayer.resx | 132 +++++++++++++++++ .../Pages.Players.EditPlayer.en-US.resx | 132 +++++++++++++++++ .../Pages.Players.EditPlayer.fr-FR.resx | 132 +++++++++++++++++ .../Ressources/Pages.Players.EditPlayer.resx | 132 +++++++++++++++++ .../Pages.Players.Players.en-US.resx | 135 +++++++++++++++++ .../Pages.Players.Players.fr-FR.resx | 135 +++++++++++++++++ .../Ressources/Pages.Players.Players.resx | 135 +++++++++++++++++ .../Pages.Questions.AddQuestion.en-US.resx | 136 +++++++++++++++++ .../Pages.Questions.AddQuestion.fr-FR.resx | 135 +++++++++++++++++ .../Pages.Questions.AddQuestion.resx | 136 +++++++++++++++++ .../Pages.Questions.EditQuestion.en-US.resx | 136 +++++++++++++++++ .../Pages.Questions.EditQuestion.fr-FR.resx | 135 +++++++++++++++++ .../Pages.Questions.EditQuestion.resx | 136 +++++++++++++++++ .../Pages.Questions.Questions.en-US.resx | 138 ++++++++++++++++++ .../Pages.Questions.Questions.fr-FR.resx | 138 ++++++++++++++++++ .../Ressources/Pages.Questions.Questions.resx | 138 ++++++++++++++++++ .../Shared.CultureSelector.en-US.resx | 123 ++++++++++++++++ .../Shared.CultureSelector.fr-FR.resx | 123 ++++++++++++++++ .../Ressources/Shared.CultureSelector.resx | 123 ++++++++++++++++ .../Ressources/Shared.NavMenu.en-US.resx | 138 ++++++++++++++++++ .../Ressources/Shared.NavMenu.fr-FR.resx | 138 ++++++++++++++++++ Blazor/Blazor/Ressources/Shared.NavMenu.resx | 138 ++++++++++++++++++ Blazor/Blazor/Services/DataLocalService.cs | 73 ++++----- Blazor/Blazor/Services/IDataService.cs | 92 ++++++------ Blazor/Blazor/Shared/CultureSelector.razor | 43 ++++++ Blazor/Blazor/Shared/CultureSelector.razor.cs | 11 ++ Blazor/Blazor/Shared/MainLayout.razor | 6 +- Blazor/Blazor/Shared/NavMenu.razor | 28 +--- Blazor/Blazor/Shared/NavMenu.razor.cs | 21 +++ Blazor/Blazor/ViewClasses/Question.cs | 11 +- Blazor/Blazor/wwwroot/Index.html | 9 -- 88 files changed, 6427 insertions(+), 342 deletions(-) create mode 100644 Blazor/Blazor/Controllers/CultureController.cs create mode 100644 Blazor/Blazor/Models/Answer.cs create mode 100644 Blazor/Blazor/Ressources/Modals.DeleteConfirmation.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Modals.DeleteConfirmation.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Modals.DeleteConfirmation.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.Administrators.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.Administrators.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.Administrators.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.Chapters.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.Chapters.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.Chapters.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.AddPlayer.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.AddPlayer.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.AddPlayer.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.EditPlayer.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.EditPlayer.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.EditPlayer.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.Players.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.Players.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Players.Players.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.Questions.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.Questions.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Pages.Questions.Questions.resx create mode 100644 Blazor/Blazor/Ressources/Shared.CultureSelector.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Shared.CultureSelector.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Shared.CultureSelector.resx create mode 100644 Blazor/Blazor/Ressources/Shared.NavMenu.en-US.resx create mode 100644 Blazor/Blazor/Ressources/Shared.NavMenu.fr-FR.resx create mode 100644 Blazor/Blazor/Ressources/Shared.NavMenu.resx create mode 100644 Blazor/Blazor/Shared/CultureSelector.razor create mode 100644 Blazor/Blazor/Shared/CultureSelector.razor.cs create mode 100644 Blazor/Blazor/Shared/NavMenu.razor.cs delete mode 100644 Blazor/Blazor/wwwroot/Index.html diff --git a/Blazor/Blazor/Blazor.csproj b/Blazor/Blazor/Blazor.csproj index aca3f8b..65aac10 100644 --- a/Blazor/Blazor/Blazor.csproj +++ b/Blazor/Blazor/Blazor.csproj @@ -40,6 +40,13 @@ + + Designer + + + Designer + + diff --git a/Blazor/Blazor/Controllers/CultureController.cs b/Blazor/Blazor/Controllers/CultureController.cs new file mode 100644 index 0000000..328c28e --- /dev/null +++ b/Blazor/Blazor/Controllers/CultureController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Localization; +using Microsoft.AspNetCore.Mvc; + +/// +/// The culture controller. +/// +[Route("[controller]/[action]")] +public class CultureController : Controller +{ + /// + /// Sets the culture. + /// + /// The culture. + /// The redirect URI. + /// + /// The action result. + /// + public IActionResult SetCulture(string culture, string redirectUri) + { + if (culture != null) + { + // Define a cookie with the selected culture + this.HttpContext.Response.Cookies.Append( + CookieRequestCultureProvider.DefaultCookieName, + CookieRequestCultureProvider.MakeCookieValue( + new RequestCulture(culture))); + } + + return this.LocalRedirect(redirectUri); + } +} \ No newline at end of file diff --git a/Blazor/Blazor/Modals/DeleteConfirmation.razor b/Blazor/Blazor/Modals/DeleteConfirmation.razor index 3eab751..4c552bf 100644 --- a/Blazor/Blazor/Modals/DeleteConfirmation.razor +++ b/Blazor/Blazor/Modals/DeleteConfirmation.razor @@ -3,10 +3,10 @@

- Are you sure you want to delete ? + @Localizer["Question"] @chapter.Name ?

- + - +
diff --git a/Blazor/Blazor/Modals/DeleteConfirmation.razor.cs b/Blazor/Blazor/Modals/DeleteConfirmation.razor.cs index 0e79b81..dde9ee4 100644 --- a/Blazor/Blazor/Modals/DeleteConfirmation.razor.cs +++ b/Blazor/Blazor/Modals/DeleteConfirmation.razor.cs @@ -3,11 +3,15 @@ using Blazored.Modal.Services; using Blazored.Modal; using Microsoft.AspNetCore.Components; using Blazor.ViewClasses; +using Microsoft.Extensions.Localization; namespace Blazor.Modals { public partial class DeleteConfirmation { + [Inject] + public IStringLocalizer Localizer { get; set; } + [CascadingParameter] public BlazoredModalInstance ModalInstance { get; set; } @@ -17,13 +21,13 @@ namespace Blazor.Modals [Parameter] public int Id { get; set; } - //private Chapter chapter = new Chapter(); + private Chapter chapter = new Chapter(); - //protected override async Task OnInitializedAsync() - //{ - // // Get the chapter - // chapter = await DataService.GetById(Id); - //} + protected override async Task OnInitializedAsync() + { + // Get the chapter + chapter = await DataService.GetById(Id); + } void ConfirmDelete() { diff --git a/Blazor/Blazor/Models/Answer.cs b/Blazor/Blazor/Models/Answer.cs new file mode 100644 index 0000000..4aaed67 --- /dev/null +++ b/Blazor/Blazor/Models/Answer.cs @@ -0,0 +1,16 @@ +namespace Blazor.Models +{ + public class Answer + { + public int Id { get; private set; } + public string Content { get; set; } + public int IdQuestion { get; private set; } + + public Answer(int id, string content, int idQuestion) + { + Id = id; + Content = content; + IdQuestion = idQuestion; + } + } +} diff --git a/Blazor/Blazor/Models/PlayerModel.cs b/Blazor/Blazor/Models/PlayerModel.cs index 43c37a0..fef9ba3 100644 --- a/Blazor/Blazor/Models/PlayerModel.cs +++ b/Blazor/Blazor/Models/PlayerModel.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Cryptography.KeyDerivation; using System.Security.Cryptography; -using System.Text; namespace Blazor.Models; @@ -9,21 +8,4 @@ public class PlayerModel public int Id { get; set; } public string Nickname { get; set; } public string HashedPassword { get; set; } - - public void HashPassword(string password) - { - using (MD5 md5 = MD5.Create()) - { - byte[] inputBytes = Encoding.UTF8.GetBytes(password); - byte[] hashBytes = md5.ComputeHash(inputBytes); - - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < hashBytes.Length; i++) - { - sb.Append(hashBytes[i].ToString("x2")); - } - - HashedPassword = sb.ToString(); - } - } } diff --git a/Blazor/Blazor/Models/QuestionModel.cs b/Blazor/Blazor/Models/QuestionModel.cs index ecdc5df..b4a0b22 100644 --- a/Blazor/Blazor/Models/QuestionModel.cs +++ b/Blazor/Blazor/Models/QuestionModel.cs @@ -2,13 +2,22 @@ public class QuestionModel { - public int Id { get; set; } + public int Id { get; private set; } public string Content { get; set; } - public int IdChapter { get; set; } + public int IdChapter { get; private set; } public int? IdAnswerGood { get; set; } public int Difficulty { get; set; } - public int NbFails { get; set; } + public int NbFails { get; private set; } + public QuestionModel(int id, string content, int idChapter, int difficulty, int nbFails, int? idAnswerGood = null) + { + Id = id; + Content = content; + IdChapter = idChapter; + Difficulty = difficulty; + NbFails = nbFails; + IdAnswerGood = idAnswerGood; + } public void addFails(int nb) { NbFails += nb; } public void removeFails(int nb) { NbFails -= nb; } diff --git a/Blazor/Blazor/Pages/Admins/AddAdministrator.razor b/Blazor/Blazor/Pages/Admins/AddAdministrator.razor index b198619..9f9287e 100644 --- a/Blazor/Blazor/Pages/Admins/AddAdministrator.razor +++ b/Blazor/Blazor/Pages/Admins/AddAdministrator.razor @@ -1,7 +1,7 @@ @page "/addAdministrator" @using Blazor.Models -

AddAdministrator

+

@Localizer["Title"]

@@ -9,17 +9,15 @@

-

-

- +
\ No newline at end of file diff --git a/Blazor/Blazor/Pages/Admins/AddAdministrator.razor.cs b/Blazor/Blazor/Pages/Admins/AddAdministrator.razor.cs index 231e6cc..64a838a 100644 --- a/Blazor/Blazor/Pages/Admins/AddAdministrator.razor.cs +++ b/Blazor/Blazor/Pages/Admins/AddAdministrator.razor.cs @@ -3,11 +3,15 @@ using Microsoft.AspNetCore.Components.Forms; using Microsoft.AspNetCore.Components; using Blazor.Models; using Blazor.Services; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Admins { public partial class AddAdministrator { + [Inject] + public IStringLocalizer Localizer { get; set; } + private AdministratorModel administratorModel = new(); [Inject] @@ -24,7 +28,7 @@ namespace Blazor.Pages.Admins { administratorModel.HashPassword(administratorModel.HashedPassword); - //await DataService.Add(administratorModel); + await DataService.Add(administratorModel); var formData = new List>(); formData.Add(new KeyValuePair("username", administratorModel.Username)); diff --git a/Blazor/Blazor/Pages/Admins/Administrators.razor b/Blazor/Blazor/Pages/Admins/Administrators.razor index 7aeed40..f28b8d7 100644 --- a/Blazor/Blazor/Pages/Admins/Administrators.razor +++ b/Blazor/Blazor/Pages/Admins/Administrators.razor @@ -2,11 +2,11 @@ @using Blazorise.DataGrid @using Blazor.ViewClasses -

Administrators

+

@Localizer["Title"]

- Ajouter + @Localizer["Add"]
- + - Editer - + @Localizer["Edit"] + diff --git a/Blazor/Blazor/Pages/Admins/Administrators.razor.cs b/Blazor/Blazor/Pages/Admins/Administrators.razor.cs index 3eb7cda..c10e3ea 100644 --- a/Blazor/Blazor/Pages/Admins/Administrators.razor.cs +++ b/Blazor/Blazor/Pages/Admins/Administrators.razor.cs @@ -10,11 +10,15 @@ using Blazor.Services; using Blazored.Modal; using Blazored.Modal; using Blazor.Pages.Chapters; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Admins; public partial class Administrators { + [Inject] + public IStringLocalizer Localizer { get; set; } + public List administrators; private int totalItem; @@ -85,29 +89,14 @@ public partial class Administrators parameters.Add(nameof(Administrator.Id), id); var modal = Modal.Show("Delete Confirmation", parameters); - var result = await modal.Result; + var result = modal.Result; - if (result.Cancelled) + if (result.IsCanceled) { return; } - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/delete/administrator/" + id; - - using (var httpClient = new HttpClient()) - { - var response = await httpClient.DeleteAsync(apiUri); - - if (response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - } - else - { - var errorResponse = await response.Content.ReadAsStringAsync(); - } - } - //await DataService.Delete(id); + await DataService.Delete(id); // Reload the page NavigationManager.NavigateTo("administrators", true); diff --git a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor index 3c83798..956d2b0 100644 --- a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor +++ b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor @@ -1,6 +1,6 @@ @page "/editAdministrator/{Id:int}" -

EditAdministrator

+

@Localizer["Title"]

@@ -8,11 +8,11 @@

diff --git a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor.cs b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor.cs index f81845b..9c9a50d 100644 --- a/Blazor/Blazor/Pages/Admins/EditAdministrator.razor.cs +++ b/Blazor/Blazor/Pages/Admins/EditAdministrator.razor.cs @@ -1,11 +1,15 @@ using Blazor.Models; +using Blazor.Pages.Chapters; using Blazor.Services; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Admins { public partial class EditAdministrator { + [Inject] + public IStringLocalizer Localizer { get; set; } [Parameter] public int Id { get; set; } @@ -44,7 +48,7 @@ namespace Blazor.Pages.Admins { administratorModel.HashPassword(administratorModel.HashedPassword); - //await DataService.Update(Id, administratorModel); + await DataService.Update(Id, administratorModel); var formData = new List>(); formData.Add(new KeyValuePair("username", administratorModel.Username)); formData.Add(new KeyValuePair("password", administratorModel.HashedPassword)); diff --git a/Blazor/Blazor/Pages/Chapters/AddChapter.razor b/Blazor/Blazor/Pages/Chapters/AddChapter.razor index 3be1097..de8f04a 100644 --- a/Blazor/Blazor/Pages/Chapters/AddChapter.razor +++ b/Blazor/Blazor/Pages/Chapters/AddChapter.razor @@ -1,7 +1,7 @@ @page "/addChapter" @using Blazor.Models -

Add Chapter

+

@Localizer["Title"]

@@ -10,11 +10,11 @@

- +
\ No newline at end of file diff --git a/Blazor/Blazor/Pages/Chapters/AddChapter.razor.cs b/Blazor/Blazor/Pages/Chapters/AddChapter.razor.cs index be512a2..0e12a28 100644 --- a/Blazor/Blazor/Pages/Chapters/AddChapter.razor.cs +++ b/Blazor/Blazor/Pages/Chapters/AddChapter.razor.cs @@ -1,11 +1,15 @@ using Microsoft.AspNetCore.Components; using Blazor.Models; using Blazor.Services; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Chapters; public partial class AddChapter { + [Inject] + public IStringLocalizer Localizer { get; set; } + private ChapterModel chapterModel = new(); [Inject] @@ -21,7 +25,7 @@ public partial class AddChapter private async void HandleValidSubmit() { - //await DataService.Add(chapterModel); + await DataService.Add(chapterModel); var formData = new List>(); formData.Add(new KeyValuePair("name", chapterModel.Name)); diff --git a/Blazor/Blazor/Pages/Chapters/Chapters.razor b/Blazor/Blazor/Pages/Chapters/Chapters.razor index b91ab74..295afbf 100644 --- a/Blazor/Blazor/Pages/Chapters/Chapters.razor +++ b/Blazor/Blazor/Pages/Chapters/Chapters.razor @@ -2,14 +2,14 @@ @using Blazor.ViewClasses; @using Blazorise.DataGrid @using Blazored.Modal; -

Chapters

+

@Localizer["Title"]

- Ajouter + @Localizer["add button"] - Exporter + @Localizer["Export"]
@@ -22,11 +22,11 @@ ShowPager Responsive> - + - Editer - + @Localizer["Edit"] + diff --git a/Blazor/Blazor/Pages/Chapters/Chapters.razor.cs b/Blazor/Blazor/Pages/Chapters/Chapters.razor.cs index f79c412..dcc219f 100644 --- a/Blazor/Blazor/Pages/Chapters/Chapters.razor.cs +++ b/Blazor/Blazor/Pages/Chapters/Chapters.razor.cs @@ -10,12 +10,14 @@ using ChoETL; using Microsoft.AspNetCore.Components.Forms; using Blazor.Modals; using Blazored.Modal; -using Microsoft.AspNetCore.Mvc.ViewFeatures; -using Blazor.Models; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Chapters; public partial class Chapters { + [Inject] + public IStringLocalizer Localizer { get; set; } + public List chapters; private int totalChapter; @@ -46,31 +48,14 @@ public partial class Chapters parameters.Add(nameof(Chapter.Id), id); var modal = Modal.Show("Delete Confirmation", parameters); - var result = await modal.Result; + var result = modal.Result; - if (result.Cancelled) + if (result.IsCanceled) { return; } - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/delete/chapter/" + id; - - using (var httpClient = new HttpClient()) - { - var response = await httpClient.DeleteAsync(apiUri); - - if (response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - } - else - { - var errorResponse = await response.Content.ReadAsStringAsync(); - } - } - // /api/delete/player/ +chapterid - - //await DataService.Delete(id); + await DataService.Delete(id); // Reload the page NavigationManager.NavigateTo("chapters", true); diff --git a/Blazor/Blazor/Pages/Chapters/EditChapter.razor b/Blazor/Blazor/Pages/Chapters/EditChapter.razor index c1f51ba..febc3b0 100644 --- a/Blazor/Blazor/Pages/Chapters/EditChapter.razor +++ b/Blazor/Blazor/Pages/Chapters/EditChapter.razor @@ -1,6 +1,6 @@ @page "/editChapter/{Id:int}" -

Edit Chapter

+

@Localizer["Title"]

@@ -9,10 +9,10 @@

- +
\ No newline at end of file diff --git a/Blazor/Blazor/Pages/Chapters/EditChapter.razor.cs b/Blazor/Blazor/Pages/Chapters/EditChapter.razor.cs index bb41510..eaebf75 100644 --- a/Blazor/Blazor/Pages/Chapters/EditChapter.razor.cs +++ b/Blazor/Blazor/Pages/Chapters/EditChapter.razor.cs @@ -1,11 +1,15 @@ using Blazor.Models; using Blazor.Services; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Chapters; public partial class EditChapter { + [Inject] + public IStringLocalizer Localizer { get; set; } + [Parameter] public int Id { get; set; } @@ -40,7 +44,7 @@ public partial class EditChapter private async void HandleValidSubmit() { - //await DataService.Update(Id, chapterModel); + await DataService.Update(Id, chapterModel); var formData = new List>(); formData.Add(new KeyValuePair("name", chapterModel.Name)); diff --git a/Blazor/Blazor/Pages/Players/AddPlayer.razor b/Blazor/Blazor/Pages/Players/AddPlayer.razor index c284ddd..5719fb5 100644 --- a/Blazor/Blazor/Pages/Players/AddPlayer.razor +++ b/Blazor/Blazor/Pages/Players/AddPlayer.razor @@ -1,7 +1,7 @@ @page "/addPlayer" @using Blazor.Models -

Add Player

+

@Localizer["Title"]

@@ -9,15 +9,15 @@

- +
\ No newline at end of file diff --git a/Blazor/Blazor/Pages/Players/AddPlayer.razor.cs b/Blazor/Blazor/Pages/Players/AddPlayer.razor.cs index e70efb1..33be20d 100644 --- a/Blazor/Blazor/Pages/Players/AddPlayer.razor.cs +++ b/Blazor/Blazor/Pages/Players/AddPlayer.razor.cs @@ -1,11 +1,15 @@ using Microsoft.AspNetCore.Components; using Blazor.Models; using Blazor.Services; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Players { public partial class AddPlayer { + [Inject] + public IStringLocalizer Localizer { get; set; } + private PlayerModel playerModel = new(); [Inject] @@ -17,10 +21,7 @@ namespace Blazor.Pages.Players private async void HandleValidSubmit() { - playerModel.HashPassword(playerModel.HashedPassword); - - //await DataService.Add(playerModel); - + await DataService.Add(playerModel); var formData = new List>(); formData.Add(new KeyValuePair("nickname", playerModel.Nickname)); formData.Add(new KeyValuePair("password", playerModel.HashedPassword)); diff --git a/Blazor/Blazor/Pages/Players/EditPlayer.razor b/Blazor/Blazor/Pages/Players/EditPlayer.razor index 212a9da..05316f4 100644 --- a/Blazor/Blazor/Pages/Players/EditPlayer.razor +++ b/Blazor/Blazor/Pages/Players/EditPlayer.razor @@ -1,6 +1,6 @@ @page "/editPlayer/{Id:int}" -

Edit Player

+

@Localizer["Title"]

@@ -8,14 +8,14 @@

- +
diff --git a/Blazor/Blazor/Pages/Players/EditPlayer.razor.cs b/Blazor/Blazor/Pages/Players/EditPlayer.razor.cs index 0163cac..b069b94 100644 --- a/Blazor/Blazor/Pages/Players/EditPlayer.razor.cs +++ b/Blazor/Blazor/Pages/Players/EditPlayer.razor.cs @@ -2,11 +2,14 @@ using Blazor.Services; using ChoETL; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Players { public partial class EditPlayer { + [Inject] + public IStringLocalizer Localizer { get; set; } [Parameter] public int Id { get; set; } @@ -30,24 +33,20 @@ namespace Blazor.Pages.Players playerModel = new PlayerModel { Id = player.Id, - Nickname = player.Nickname, - HashedPassword = player.HashedPassword + Nickname = player.Nickname }; } private async void HandleValidSubmit() { - playerModel.HashPassword(playerModel.HashedPassword); - - //await DataService.Update(Id, playerModel); - + await DataService.Update(Id, playerModel); var formData = new List>(); formData.Add(new KeyValuePair("nickname", playerModel.Nickname)); formData.Add(new KeyValuePair("password", playerModel.HashedPassword)); var formContent = new FormUrlEncodedContent(formData); - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/update/player/"+playerModel.Id; + string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/update/"+playerModel.Id; using (var httpClient = new HttpClient()) { diff --git a/Blazor/Blazor/Pages/Players/Players.razor b/Blazor/Blazor/Pages/Players/Players.razor index 04f3667..4343304 100644 --- a/Blazor/Blazor/Pages/Players/Players.razor +++ b/Blazor/Blazor/Pages/Players/Players.razor @@ -2,11 +2,11 @@ @using Blazor.ViewClasses; @using Blazorise.DataGrid @using Blazored.Modal; -

Joueurs

+

@Localizer["Title"]

- Ajouter + @Localizer["Add"]
@@ -18,11 +18,11 @@ ShowPager Responsive> - + - Editer - + @Localizer["Edit"] + diff --git a/Blazor/Blazor/Pages/Players/Players.razor.cs b/Blazor/Blazor/Pages/Players/Players.razor.cs index aa9bc5a..05c07dd 100644 --- a/Blazor/Blazor/Pages/Players/Players.razor.cs +++ b/Blazor/Blazor/Pages/Players/Players.razor.cs @@ -12,11 +12,15 @@ using Blazor.Modals; using Blazored.Modal; using Blazor.Pages.Admins; using Blazor.Pages.Chapters; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Players; public partial class Players { + [Inject] + public IStringLocalizer Localizer { get; set; } + public List players; private int totalPlayer; @@ -46,30 +50,14 @@ public partial class Players parameters.Add(nameof(Player.Id), id); var modal = Modal.Show("Delete Confirmation", parameters); - var result = await modal.Result; + var result = modal.Result; - if (result.Cancelled) + if (result.IsCanceled) { return; } - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/delete/player/" + id; - - using (var httpClient = new HttpClient()) - { - var response = await httpClient.DeleteAsync(apiUri); - - if (response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - } - else - { - var errorResponse = await response.Content.ReadAsStringAsync(); - } - } - - //await DataService.Delete(id); + await DataService.Delete(id); // Reload the page NavigationManager.NavigateTo("Players", true); diff --git a/Blazor/Blazor/Pages/Questions/AddQuestion.razor b/Blazor/Blazor/Pages/Questions/AddQuestion.razor index 88d95f6..a5e84fb 100644 --- a/Blazor/Blazor/Pages/Questions/AddQuestion.razor +++ b/Blazor/Blazor/Pages/Questions/AddQuestion.razor @@ -1,7 +1,7 @@ @page "/addQuestion" @using Blazor.Models -

AddQuestion

+

@Localizer["Title"]

@@ -9,44 +9,44 @@

@* *@

@*

*@ - +
diff --git a/Blazor/Blazor/Pages/Questions/AddQuestion.razor.cs b/Blazor/Blazor/Pages/Questions/AddQuestion.razor.cs index e233d06..d651408 100644 --- a/Blazor/Blazor/Pages/Questions/AddQuestion.razor.cs +++ b/Blazor/Blazor/Pages/Questions/AddQuestion.razor.cs @@ -4,11 +4,16 @@ using Microsoft.AspNetCore.Components; using Blazor.Models; using Blazor.Services; using Blazor.Pages.Admins; +using Blazor.Pages.Players; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Questions { public partial class AddQuestion { + [Inject] + public IStringLocalizer Localizer { get; set; } + private QuestionModel questionModel = new(); [Inject] diff --git a/Blazor/Blazor/Pages/Questions/EditQuestion.razor b/Blazor/Blazor/Pages/Questions/EditQuestion.razor index 5d4a6a6..3e6c496 100644 --- a/Blazor/Blazor/Pages/Questions/EditQuestion.razor +++ b/Blazor/Blazor/Pages/Questions/EditQuestion.razor @@ -1,6 +1,6 @@ @page "/editQuestion/{Id:int}" -

EditQuestion

+

@Localizer["Title"]

@@ -9,31 +9,31 @@

- +
diff --git a/Blazor/Blazor/Pages/Questions/EditQuestion.razor.cs b/Blazor/Blazor/Pages/Questions/EditQuestion.razor.cs index 7c8130d..575cfb9 100644 --- a/Blazor/Blazor/Pages/Questions/EditQuestion.razor.cs +++ b/Blazor/Blazor/Pages/Questions/EditQuestion.razor.cs @@ -1,12 +1,16 @@ using Blazor.Models; using Blazor.Pages.Admins; +using Blazor.Pages.Players; using Blazor.Services; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Questions { public partial class EditQuestion { + [Inject] + public IStringLocalizer Localizer { get; set; } [Parameter] public int Id { get; set; } diff --git a/Blazor/Blazor/Pages/Questions/Questions.razor b/Blazor/Blazor/Pages/Questions/Questions.razor index cedb724..1b663f4 100644 --- a/Blazor/Blazor/Pages/Questions/Questions.razor +++ b/Blazor/Blazor/Pages/Questions/Questions.razor @@ -2,16 +2,12 @@ @using Blazor.ViewClasses; @using Blazorise.DataGrid @using Blazored.Modal; -

Chapters

+

@Localizer["Title"]

- Ajouter + @Localizer["Add"] - - Exporter - -
- + + - Editer - + @Localizer["Edit"] + \ No newline at end of file diff --git a/Blazor/Blazor/Pages/Questions/Questions.razor.cs b/Blazor/Blazor/Pages/Questions/Questions.razor.cs index 60626bc..a842305 100644 --- a/Blazor/Blazor/Pages/Questions/Questions.razor.cs +++ b/Blazor/Blazor/Pages/Questions/Questions.razor.cs @@ -11,12 +11,15 @@ using Microsoft.AspNetCore.Components.Forms; using Blazor.Modals; using Blazored.Modal; using Blazor.Pages.Admins; -using System.Text.RegularExpressions; +using Microsoft.Extensions.Localization; namespace Blazor.Pages.Questions; public partial class Questions { + [Inject] + public IStringLocalizer Localizer { get; set; } + public List questions; private int totalQuestion; @@ -46,30 +49,14 @@ public partial class Questions parameters.Add(nameof(Question.Id), id); var modal = Modal.Show("Delete Confirmation", parameters); - var result = await modal.Result; + var result = modal.Result; - if (result.Cancelled) + if (result.IsCanceled) { return; } - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/delete/question/" + id; - - using (var httpClient = new HttpClient()) - { - var response = await httpClient.DeleteAsync(apiUri); - - if (response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - } - else - { - var errorResponse = await response.Content.ReadAsStringAsync(); - } - } - - //await DataService.Delete(id); + await DataService.Delete(id); // Reload the page NavigationManager.NavigateTo("questions", true); @@ -115,7 +102,7 @@ public partial class Questions private async void Export() { StringBuilder sb = new StringBuilder(); - HttpResponseMessage response = await Http.GetAsync("https://trusting-panini.87-106-126-109.plesk.page/api/questionsExport"); + HttpResponseMessage response = await Http.GetAsync("https://trusting-panini.87-106-126-109.plesk.page/api/chapters"); var json = await response.Content.ReadAsStringAsync(); using (var jsonFile = ChoJSONReader.LoadText(json)) { @@ -132,7 +119,6 @@ public partial class Questions await IJSRuntime.InvokeVoidAsync("downloadFileFromStream", "data.csv", streamRef); } } - private async Task SingleUpload(InputFileChangeEventArgs e) { using (MemoryStream ms = new MemoryStream()) @@ -141,51 +127,53 @@ public partial class Questions var bytes = ms.ToArray(); string s = Encoding.UTF8.GetString(bytes); - s = s.Replace("\r\n", "\n"); - var rows = s.Split('\n'); - rows = rows.Skip(1).ToArray(); - - foreach (var row in rows) - { - var field = row.Split(';'); - var formData = new List>(); - formData.Add(new KeyValuePair("content", field[0])); - formData.Add(new KeyValuePair("answerContent1", field[2])); - formData.Add(new KeyValuePair("answerContent2", field[3])); - formData.Add(new KeyValuePair("answerContent3", field[4])); - formData.Add(new KeyValuePair("answerContent4", field[5])); - formData.Add(new KeyValuePair("idanswergood", field[6])); - - string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/chapters/name/"+field[1]; + char[] invalidChars = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '\r', '\n', ',', ' ' }; + List filteredStrings = new List(); + StringBuilder filteredString = new StringBuilder(); - var response = await Http.GetAsync(apiUri); - - if (response.IsSuccessStatusCode) + foreach (var c in s) + { + if (!invalidChars.Contains(c)) { - var responseBody = await response.Content.ReadAsStringAsync(); - Match match = Regex.Match(responseBody, @"\d+"); - int result = int.Parse(match.Value); - formData.Add(new KeyValuePair("idchapter", result.ToString())); + filteredString.Append(c); } else { - var errorResponse = await response.Content.ReadAsStringAsync(); - formData.Add(new KeyValuePair("idchapter", "Unknown_Chapter_Error")); + if (filteredString.Length > 0) + { + filteredStrings.Add(filteredString.ToString()); + filteredString.Clear(); + } } + } + + if (filteredString.Length > 0) + { + filteredStrings.Add(filteredString.ToString()); + } + foreach (var filteredStr in filteredStrings) + { + var formData = new List>(); + formData.Add(new KeyValuePair("name", filteredStr)); + var formContent = new FormUrlEncodedContent(formData); - apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/add/questions"; - response = await Http.PostAsync(apiUri, formContent); + string apiUri = "https://trusting-panini.87-106-126-109.plesk.page/api/add/chapters"; - if (response.IsSuccessStatusCode) - { - var responseBody = await response.Content.ReadAsStringAsync(); - } - else + using (var httpClient = new HttpClient()) { - var errorResponse = await response.Content.ReadAsStringAsync(); + var response = await httpClient.PostAsync(apiUri, formContent); + + if (response.IsSuccessStatusCode) + { + var responseBody = await response.Content.ReadAsStringAsync(); + } + else + { + var errorResponse = await response.Content.ReadAsStringAsync(); + } } } } diff --git a/Blazor/Blazor/Pages/_Host.cshtml b/Blazor/Blazor/Pages/_Host.cshtml index 158359b..e942420 100644 --- a/Blazor/Blazor/Pages/_Host.cshtml +++ b/Blazor/Blazor/Pages/_Host.cshtml @@ -28,7 +28,7 @@ Reload 🗙 - + diff --git a/Blazor/Blazor/Pages/_Layout.cshtml b/Blazor/Blazor/Pages/_Layout.cshtml index 5e9991a..c993101 100644 --- a/Blazor/Blazor/Pages/_Layout.cshtml +++ b/Blazor/Blazor/Pages/_Layout.cshtml @@ -6,8 +6,6 @@ - - diff --git a/Blazor/Blazor/Program.cs b/Blazor/Blazor/Program.cs index 12120ef..ee5f895 100644 --- a/Blazor/Blazor/Program.cs +++ b/Blazor/Blazor/Program.cs @@ -6,6 +6,9 @@ using Blazorise.Bootstrap; using Blazorise.Icons.FontAwesome; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Localization; +using Microsoft.Extensions.Options; +using System.Globalization; using Blazored.Modal; using Microsoft.Extensions.Logging; @@ -37,6 +40,23 @@ builder.Services.AddBlazoredModal(); builder.Services.AddScoped(); +// Add the controller of the app +builder.Services.AddControllers(); + +// Add the localization to the app and specify the resources path +builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Ressources"; }); + +// Configure the localtization +builder.Services.Configure(options => +{ + // Set the default culture of the web site + options.DefaultRequestCulture = new RequestCulture(new CultureInfo("en-US")); + + // Declare the supported culture + options.SupportedCultures = new List { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; + options.SupportedUICultures = new List { new CultureInfo("en-US"), new CultureInfo("fr-FR") }; +}); + builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging")); var app = builder.Build(); @@ -52,6 +72,21 @@ app.UseStaticFiles(); app.UseRouting(); +// Get the current localization options +var options = ((IApplicationBuilder)app).ApplicationServices.GetService>(); + +if (options?.Value != null) +{ + // use the default localization + app.UseRequestLocalization(options.Value); +} + +// Add the controller to the endpoint +app.UseEndpoints(endpoints => +{ + endpoints.MapControllers(); +}); + app.MapBlazorHub(); app.MapFallbackToPage("/_Host"); diff --git a/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.en-US.resx b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.en-US.resx new file mode 100644 index 0000000..905d73a --- /dev/null +++ b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.en-US.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cancel + + + Delete + + + Are you sure you want to delete + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.fr-FR.resx b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.fr-FR.resx new file mode 100644 index 0000000..f114f36 --- /dev/null +++ b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.fr-FR.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + annuler + + + Supprimer + + + voulez vous vraiment supprimer + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.resx b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.resx new file mode 100644 index 0000000..905d73a --- /dev/null +++ b/Blazor/Blazor/Ressources/Modals.DeleteConfirmation.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cancel + + + Delete + + + Are you sure you want to delete + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.en-US.resx b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.en-US.resx new file mode 100644 index 0000000..f8d833e --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.en-US.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Password + + + Submit + + + Add administrator + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.fr-FR.resx new file mode 100644 index 0000000..e465b26 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.fr-FR.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mot de passe + + + Valider + + + Ajouter un administrateur + + + Nom d'utilisateur + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.resx b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.resx new file mode 100644 index 0000000..f8d833e --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.AddAdministrator.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Password + + + Submit + + + Add administrator + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.Administrators.en-US.resx b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.en-US.resx new file mode 100644 index 0000000..9b4d7f0 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.en-US.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + Delete + + + Edit + + + Administrators + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.Administrators.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.fr-FR.resx new file mode 100644 index 0000000..229d6c1 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.fr-FR.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Ajouter + + + Supprimer + + + Editer + + + Les administrateurs + + + Nom d'utilisateur + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.Administrators.resx b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.resx new file mode 100644 index 0000000..9b4d7f0 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.Administrators.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + Delete + + + Edit + + + Administrators + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.en-US.resx b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.en-US.resx new file mode 100644 index 0000000..6b817dc --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.en-US.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Edit admin + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.fr-FR.resx new file mode 100644 index 0000000..4f05285 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.fr-FR.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mot de passe haché + + + Editer un administrateur + + + nom d'utilisateur + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.resx b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.resx new file mode 100644 index 0000000..6b817dc --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Admins.EditAdministrator.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Edit admin + + + Username + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.en-US.resx b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.en-US.resx new file mode 100644 index 0000000..c0efb54 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.en-US.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name + + + submit + + + Add chapter + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.fr-FR.resx new file mode 100644 index 0000000..e02781c --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.fr-FR.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Nom + + + valider + + + Ajouter un chapitre + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.resx b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.resx new file mode 100644 index 0000000..c0efb54 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.AddChapter.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name + + + submit + + + Add chapter + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.en-US.resx b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.en-US.resx new file mode 100644 index 0000000..1737749 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.en-US.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + add + + + Delete + + + edit + + + Export + + + name + + + Chapters + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.fr-FR.resx new file mode 100644 index 0000000..d3a47d0 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.fr-FR.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ajouter + + + Supprimer + + + éditer + + + Exporter + + + nom + + + Les chapitres + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.resx b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.resx new file mode 100644 index 0000000..1737749 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.Chapters.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + add + + + Delete + + + edit + + + Export + + + name + + + Chapters + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.en-US.resx b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.en-US.resx new file mode 100644 index 0000000..8bf2929 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.en-US.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name + + + Submit + + + Edit chapter + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.fr-FR.resx new file mode 100644 index 0000000..c512fd8 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.fr-FR.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Nom + + + Valider + + + Editer un chapitre + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.resx b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.resx new file mode 100644 index 0000000..8bf2929 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Chapters.EditChapter.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name + + + Submit + + + Edit chapter + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.en-US.resx b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.en-US.resx new file mode 100644 index 0000000..6ad5a72 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.en-US.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Nickname + + + Submit + + + Add player + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.fr-FR.resx new file mode 100644 index 0000000..188f295 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.fr-FR.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mot de passe haché + + + Pseudo + + + Envoyer + + + Ajouter un joueur + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.resx b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.resx new file mode 100644 index 0000000..6ad5a72 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.AddPlayer.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Nickname + + + Submit + + + Add player + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.en-US.resx b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.en-US.resx new file mode 100644 index 0000000..7449dbf --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.en-US.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Nickname + + + Submit + + + Edit player + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.fr-FR.resx new file mode 100644 index 0000000..01e2148 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.fr-FR.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mot de passe haché + + + pseudo + + + Valider + + + éditer un joueur + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.resx b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.resx new file mode 100644 index 0000000..7449dbf --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.EditPlayer.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hashed password + + + Nickname + + + Submit + + + Edit player + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.Players.en-US.resx b/Blazor/Blazor/Ressources/Pages.Players.Players.en-US.resx new file mode 100644 index 0000000..37f5fe4 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.Players.en-US.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + add + + + delete + + + edit + + + Nickname + + + Players + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.Players.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Players.Players.fr-FR.resx new file mode 100644 index 0000000..632e6b8 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.Players.fr-FR.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ajouter + + + supprimer + + + éditer + + + Surnom + + + Les joueurs + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Players.Players.resx b/Blazor/Blazor/Ressources/Pages.Players.Players.resx new file mode 100644 index 0000000..37f5fe4 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Players.Players.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + add + + + delete + + + edit + + + Nickname + + + Players + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.en-US.resx b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.en-US.resx new file mode 100644 index 0000000..f0e1076 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.en-US.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Answer + ne pas oublier l'espace à la fin de "Answer " + + + Chapter + + + Content + + + submit + + + Add question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.fr-FR.resx new file mode 100644 index 0000000..a29071f --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.fr-FR.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Réponse n° + + + Chapitre + + + Contenu + + + valider + + + Ajouter une question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.resx b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.resx new file mode 100644 index 0000000..f0e1076 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.AddQuestion.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Answer + ne pas oublier l'espace à la fin de "Answer " + + + Chapter + + + Content + + + submit + + + Add question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.en-US.resx b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.en-US.resx new file mode 100644 index 0000000..8a079b5 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.en-US.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Answer + ne pas oublier l'espace à la fin de "Answer " + + + Chapter + + + Content + + + Submit + + + edit question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.fr-FR.resx new file mode 100644 index 0000000..7a36558 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.fr-FR.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + réponse n° + + + Chapitre + + + Contenu + + + valider + + + modifier une question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.resx b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.resx new file mode 100644 index 0000000..8a079b5 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.EditQuestion.resx @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Answer + ne pas oublier l'espace à la fin de "Answer " + + + Chapter + + + Content + + + Submit + + + edit question + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.Questions.en-US.resx b/Blazor/Blazor/Ressources/Pages.Questions.Questions.en-US.resx new file mode 100644 index 0000000..b4c6d5d --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.Questions.en-US.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + content + + + delete + + + difficulty + + + edit + + + Questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.Questions.fr-FR.resx b/Blazor/Blazor/Ressources/Pages.Questions.Questions.fr-FR.resx new file mode 100644 index 0000000..cba1d41 --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.Questions.fr-FR.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Ajouter une question + + + Contenu + + + supprimer + + + difficulté + + + éditer + + + Les questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Pages.Questions.Questions.resx b/Blazor/Blazor/Ressources/Pages.Questions.Questions.resx new file mode 100644 index 0000000..b4c6d5d --- /dev/null +++ b/Blazor/Blazor/Ressources/Pages.Questions.Questions.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + content + + + delete + + + difficulty + + + edit + + + Questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.CultureSelector.en-US.resx b/Blazor/Blazor/Ressources/Shared.CultureSelector.en-US.resx new file mode 100644 index 0000000..8dcf793 --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.CultureSelector.en-US.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Select your culture : + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.CultureSelector.fr-FR.resx b/Blazor/Blazor/Ressources/Shared.CultureSelector.fr-FR.resx new file mode 100644 index 0000000..c41247e --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.CultureSelector.fr-FR.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Choisissez la langue : + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.CultureSelector.resx b/Blazor/Blazor/Ressources/Shared.CultureSelector.resx new file mode 100644 index 0000000..8dcf793 --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.CultureSelector.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Select your culture : + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.NavMenu.en-US.resx b/Blazor/Blazor/Ressources/Shared.NavMenu.en-US.resx new file mode 100644 index 0000000..22b9081 --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.NavMenu.en-US.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrators + + + Answers + + + Chapters + + + Home + + + Players + + + Questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.NavMenu.fr-FR.resx b/Blazor/Blazor/Ressources/Shared.NavMenu.fr-FR.resx new file mode 100644 index 0000000..320800e --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.NavMenu.fr-FR.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Les administrateurs + + + Les réponses + + + Les chapitres + + + Page d'accueil + + + Les joueurs + + + Les questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Ressources/Shared.NavMenu.resx b/Blazor/Blazor/Ressources/Shared.NavMenu.resx new file mode 100644 index 0000000..22b9081 --- /dev/null +++ b/Blazor/Blazor/Ressources/Shared.NavMenu.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrators + + + Answers + + + Chapters + + + Home + + + Players + + + Questions + + \ No newline at end of file diff --git a/Blazor/Blazor/Services/DataLocalService.cs b/Blazor/Blazor/Services/DataLocalService.cs index 8f7c491..d8b91cf 100644 --- a/Blazor/Blazor/Services/DataLocalService.cs +++ b/Blazor/Blazor/Services/DataLocalService.cs @@ -2,7 +2,6 @@ using Blazor.ViewClasses; using Blazored.LocalStorage; using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Mvc.ViewFeatures; using static System.Net.WebRequestMethods; namespace Blazor.Services @@ -29,7 +28,7 @@ namespace Blazor.Services public async Task GetById(int id) { // Get the current data - var currentData = _http.GetFromJsonAsync>($"https://trusting-panini.87-106-126-109.plesk.page/api/chapters").Result; + var currentData = await _localStorage.GetItemAsync>("data"); // Get the chapter int the list var chapter = currentData.FirstOrDefault(w => w.Id == id); @@ -136,7 +135,7 @@ namespace Blazor.Services public async Task GetAdminById(int id) { // Get the current data - var currentData = _http.GetFromJsonAsync>($"https://trusting-panini.87-106-126-109.plesk.page/api/administrators").Result; + var currentData = await _localStorage.GetItemAsync>("data"); // Get the admin int the list var admin = currentData.FirstOrDefault(w => w.Id == id); @@ -229,7 +228,7 @@ namespace Blazor.Services public async Task GetQuestionById(int id) { // Get the current data - var currentData = _http.GetFromJsonAsync>($"https://trusting-panini.87-106-126-109.plesk.page/api/questions").Result; + var currentData = await _localStorage.GetItemAsync>("data"); // Get the question int the list var question = currentData.FirstOrDefault(w => w.Id == id); @@ -243,46 +242,48 @@ namespace Blazor.Services return question; } - public async Task Update(int id, QuestionModel model) - { - // Get the current data - var currentData = await _localStorage.GetItemAsync>("data"); + //public async Task Update(int id, QuestionsModel model) + //{ + // // Get the current data + // var currentData = await _localStorage.GetItemAsync>("data"); - // Get the admin int the list - var question = currentData.FirstOrDefault(w => w.Id == id); + // // Get the admin int the list + // var question = currentData.FirstOrDefault(w => w.Id == id); - // Check if admin exist - if (question == null) - { - throw new Exception($"Unable to found the item with ID: {id}"); - } + // // Check if admin exist + // if (question == null) + // { + // throw new Exception($"Unable to found the item with ID: {id}"); + // } - // Modify the content of the adminnistrator - question.Content = model.Content; + // // Modify the content of the adminnistrator + // question.Username = model.Username; + // question.HashedPassword = model.HashedPassword; - // Save the data - await _localStorage.SetItemAsync("data", currentData); - } + // // Save the data + // await _localStorage.SetItemAsync("data", currentData); + //} - public async Task Add(QuestionModel model) - { - // Get the current data - var currentData = await _localStorage.GetItemAsync>("data"); + //public async Task Add(QuestionsModel model) + //{ + // // Get the current data + // var currentData = await _localStorage.GetItemAsync>("data"); - // Simulate the Id - model.Id = currentData.Max(s => s.Id) + 1; + // // Simulate the Id + // model.Id = currentData.Max(s => s.Id) + 1; - // Add the admin to the current data - currentData.Add(new Question - { - Id = model.Id, - Content = model.Content - }); + // // Add the admin to the current data + // currentData.Add(new Question + // { + // Id = model.Id, + // Username = model.Username, + // HashedPassword = model.HashedPassword + // }); - // Save the data - await _localStorage.SetItemAsync("data", currentData); - } + // // Save the data + // await _localStorage.SetItemAsync("data", currentData); + //} public async Task CountQuestion() { @@ -321,7 +322,7 @@ namespace Blazor.Services public async Task GetPlayerById(int id) { // Get the current data - var currentData = _http.GetFromJsonAsync>($"https://trusting-panini.87-106-126-109.plesk.page/api/players").Result; + var currentData = await _localStorage.GetItemAsync>("data"); // Get the player in the list var player = currentData.FirstOrDefault(w => w.Id == id); diff --git a/Blazor/Blazor/Services/IDataService.cs b/Blazor/Blazor/Services/IDataService.cs index 71c6111..b3e93ab 100644 --- a/Blazor/Blazor/Services/IDataService.cs +++ b/Blazor/Blazor/Services/IDataService.cs @@ -1,48 +1,48 @@ -using Blazor.Models; -using Blazor.ViewClasses; - -namespace Blazor.Services -{ - public interface IDataService - { - Task Add(ChapterModel model); - - Task Count(); - - Task> List(int currentPage, int pageSize); - - Task GetById(int id); - - Task Update(int id, ChapterModel model); - - Task Add(AdministratorModel model); - - Task Update(int id, AdministratorModel model); - - Task GetAdminById(int id); - - Task CountAdmin(); - Task> ListAdmin(int currentPage, int pageSize); - - Task Add(QuestionModel model); - - Task Update(int id, QuestionModel model); - - Task GetQuestionById(int id); - - Task CountQuestion(); - Task> ListQuestion(int currentPage, int pageSize); - +using Blazor.Models; +using Blazor.ViewClasses; + +namespace Blazor.Services +{ + public interface IDataService + { + Task Add(ChapterModel model); + + Task Count(); + + Task> List(int currentPage, int pageSize); + + Task GetById(int id); + + Task Update(int id, ChapterModel model); + + Task Add(AdministratorModel model); + + Task Update(int id, AdministratorModel model); + + Task GetAdminById(int id); + + Task CountAdmin(); + Task> ListAdmin(int currentPage, int pageSize); + + //Task Add(QuestionsModel model); + + //Task Update(int id, QuestionsModel model); + + Task GetQuestionById(int id); + + Task CountQuestion(); + Task> ListQuestion(int currentPage, int pageSize); + Task Delete(int id); - Task Add(PlayerModel model); - - Task Update(int id, PlayerModel model); - - Task GetPlayerById(int id); - - Task CountPlayer(); - Task> ListPlayer(int currentPage, int pageSize); - - } -} + Task Add(PlayerModel model); + + Task Update(int id, PlayerModel model); + + Task GetPlayerById(int id); + + Task CountPlayer(); + Task> ListPlayer(int currentPage, int pageSize); + + } +} diff --git a/Blazor/Blazor/Shared/CultureSelector.razor b/Blazor/Blazor/Shared/CultureSelector.razor new file mode 100644 index 0000000..c750a80 --- /dev/null +++ b/Blazor/Blazor/Shared/CultureSelector.razor @@ -0,0 +1,43 @@ +@using System.Globalization +@inject NavigationManager NavigationManager + +

+ +

+ +@code +{ + private CultureInfo[] supportedCultures = new[] + { + new CultureInfo("en-US"), + new CultureInfo("fr-FR") + }; + + private CultureInfo Culture + { + get => CultureInfo.CurrentCulture; + set + { + if (CultureInfo.CurrentUICulture == value) + { + return; + } + + var culture = value.Name.ToLower(CultureInfo.InvariantCulture); + + var uri = new Uri(this.NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped); + var query = $"?culture={Uri.EscapeDataString(culture)}&" + $"redirectUri={Uri.EscapeDataString(uri)}"; + + // Redirect the user to the culture controller to set the cookie + this.NavigationManager.NavigateTo("/Culture/SetCulture" + query, forceLoad: true); + } + } +} \ No newline at end of file diff --git a/Blazor/Blazor/Shared/CultureSelector.razor.cs b/Blazor/Blazor/Shared/CultureSelector.razor.cs new file mode 100644 index 0000000..d4994f1 --- /dev/null +++ b/Blazor/Blazor/Shared/CultureSelector.razor.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; + +namespace Blazor.Shared +{ + public partial class CultureSelector + { + [Inject] + public IStringLocalizer Localizer { get; set; } + } +} diff --git a/Blazor/Blazor/Shared/MainLayout.razor b/Blazor/Blazor/Shared/MainLayout.razor index 39af19b..79792a4 100644 --- a/Blazor/Blazor/Shared/MainLayout.razor +++ b/Blazor/Blazor/Shared/MainLayout.razor @@ -9,11 +9,13 @@
- About +
+ +
@Body
- + \ No newline at end of file diff --git a/Blazor/Blazor/Shared/NavMenu.razor b/Blazor/Blazor/Shared/NavMenu.razor index 08391e1..5889da0 100644 --- a/Blazor/Blazor/Shared/NavMenu.razor +++ b/Blazor/Blazor/Shared/NavMenu.razor @@ -10,40 +10,24 @@ - -@code { - private bool collapseNavMenu = true; - - private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; - - private void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } -} diff --git a/Blazor/Blazor/Shared/NavMenu.razor.cs b/Blazor/Blazor/Shared/NavMenu.razor.cs new file mode 100644 index 0000000..debe906 --- /dev/null +++ b/Blazor/Blazor/Shared/NavMenu.razor.cs @@ -0,0 +1,21 @@ +using Blazor.Pages; +using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; + +namespace Blazor.Shared +{ + public partial class NavMenu + { + [Inject] + public IStringLocalizer Localizer { get; set; } + + private bool collapseNavMenu = true; + + private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; + + private void ToggleNavMenu() + { + collapseNavMenu = !collapseNavMenu; + } + } +} diff --git a/Blazor/Blazor/ViewClasses/Question.cs b/Blazor/Blazor/ViewClasses/Question.cs index 4586917..db4e7bf 100644 --- a/Blazor/Blazor/ViewClasses/Question.cs +++ b/Blazor/Blazor/ViewClasses/Question.cs @@ -2,11 +2,20 @@ public class Question { - public int Id { get; set; } + public int Id { get; private set; } public string Content { get; set; } public int IdChapter { get; set; } public int IdAnswerGood { get; set; } public int Difficulty { get; set; } public int nbFails { get; set; } + public Question(int id, string content, int idChapter, int idAnswerGood, int difficulty, int nbFails = 0) + { + Id = id; + Content = content; + IdChapter = idChapter; + IdAnswerGood = idAnswerGood; + Difficulty = difficulty; + this.nbFails = nbFails; + } } diff --git a/Blazor/Blazor/wwwroot/Index.html b/Blazor/Blazor/wwwroot/Index.html deleted file mode 100644 index a72ec50..0000000 --- a/Blazor/Blazor/wwwroot/Index.html +++ /dev/null @@ -1,9 +0,0 @@ -@page "/" - -Index - -

Hello, world!

- -Welcome to your new app. - - \ No newline at end of file