From b67d2b3478568cf5328bda7f1c387fbf0dfd1599 Mon Sep 17 00:00:00 2001 From: Maxence Lanone Date: Wed, 15 Mar 2023 17:55:13 +0100 Subject: [PATCH] :ambulance: application maui --- Sources/DbDatamanager/ChampionManager.cs | 1 + Sources/EntityFrameWorkLib/ChampionEntity.cs | 3 ++- .../EntityFrameWorkLib.csproj | 11 +++++----- Sources/EntityFrameWorkLib/RuneEntity.cs | 22 +++++++++++++++++++ .../ContentViews/ChampionClassSelector.xaml | 14 ++++++------ .../ChampionClassSelector.xaml.cs | 1 + .../ChampionClassToIconConverter.cs | 1 + Sources/LolApp/ViewModels/AddSkillVM.cs | 2 +- Sources/LolApp/ViewModels/ChampionClassVM.cs | 1 + Sources/LolApp/ViewModels/ChampionsPageVM.cs | 2 ++ Sources/Model/Champion.cs | 1 + Sources/Model/Model.csproj | 6 ----- Sources/Model/Rune.cs | 1 + Sources/Model/Skill.cs | 2 +- Sources/Shared/Shared.csproj | 6 +++++ Sources/Shared/enums/ChampionClass.cs | 2 +- Sources/Shared/enums/RuneFamily.cs | 2 +- Sources/Shared/enums/SkillType.cs | 2 +- Sources/StubLib/StubData.Champions.cs | 1 + Sources/StubLib/StubData.Runes.cs | 1 + Sources/Tests/ConsoleDB/ConsoleDB.csproj | 6 ++--- Sources/Tests/ConsoleTests/Program.cs | 1 + .../TestUnitaireLOL/TestUnitaireLOL.csproj | 2 +- Sources/ViewModels/ChampionVM.cs | 1 + Sources/ViewModels/ChampionsMgrVM.cs | 1 + Sources/ViewModels/EditableChampionVM.cs | 1 + Sources/ViewModels/SkillVM.cs | 1 + 27 files changed, 66 insertions(+), 29 deletions(-) create mode 100644 Sources/EntityFrameWorkLib/RuneEntity.cs diff --git a/Sources/DbDatamanager/ChampionManager.cs b/Sources/DbDatamanager/ChampionManager.cs index 5d74e3f..1f97fe9 100644 --- a/Sources/DbDatamanager/ChampionManager.cs +++ b/Sources/DbDatamanager/ChampionManager.cs @@ -1,6 +1,7 @@ using System; using EntityFrameWorkLib; using Model; +using Shared; namespace DbDatamanager { diff --git a/Sources/EntityFrameWorkLib/ChampionEntity.cs b/Sources/EntityFrameWorkLib/ChampionEntity.cs index fde9d2f..d724f42 100644 --- a/Sources/EntityFrameWorkLib/ChampionEntity.cs +++ b/Sources/EntityFrameWorkLib/ChampionEntity.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using Shared; namespace EntityFrameWorkLib { @@ -13,7 +14,7 @@ namespace EntityFrameWorkLib public string Name { get; set; } public string Bio { get; set; } public string Icon { get; set; } - public ChampionClassEntity championClass { get; set; } + public ChampionClass championClass { get; set; } } } diff --git a/Sources/EntityFrameWorkLib/EntityFrameWorkLib.csproj b/Sources/EntityFrameWorkLib/EntityFrameWorkLib.csproj index eb89a7d..185b9c5 100644 --- a/Sources/EntityFrameWorkLib/EntityFrameWorkLib.csproj +++ b/Sources/EntityFrameWorkLib/EntityFrameWorkLib.csproj @@ -12,21 +12,20 @@ - - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/Sources/EntityFrameWorkLib/RuneEntity.cs b/Sources/EntityFrameWorkLib/RuneEntity.cs new file mode 100644 index 0000000..6fca3d2 --- /dev/null +++ b/Sources/EntityFrameWorkLib/RuneEntity.cs @@ -0,0 +1,22 @@ +using System; +using System.ComponentModel.DataAnnotations; + +using Shared; + +namespace EntityFrameWorkLib +{ + public class RuneEntity + { + [Key] + [MaxLength(256)] + public string Name { get; set; } + + [Required] + [MaxLength(500)] + public string Description { get; set; } + + [Required] + public RuneFamily RuneFamily { get; set; } + } +} + diff --git a/Sources/LolApp/ContentViews/ChampionClassSelector.xaml b/Sources/LolApp/ContentViews/ChampionClassSelector.xaml index 6dc66e4..612c20f 100644 --- a/Sources/LolApp/ContentViews/ChampionClassSelector.xaml +++ b/Sources/LolApp/ContentViews/ChampionClassSelector.xaml @@ -1,17 +1,17 @@  - Assassin - Fighter - Mage - Marksman - Support - Tank + Assassin + Fighter + Mage + Marksman + Support + Tank diff --git a/Sources/Model/Model.csproj b/Sources/Model/Model.csproj index 1061ec5..7121f9c 100644 --- a/Sources/Model/Model.csproj +++ b/Sources/Model/Model.csproj @@ -6,12 +6,6 @@ enable - - - - - - diff --git a/Sources/Model/Rune.cs b/Sources/Model/Rune.cs index f63ad1c..8b6cdbb 100644 --- a/Sources/Model/Rune.cs +++ b/Sources/Model/Rune.cs @@ -1,4 +1,5 @@ using System; +using Shared; namespace Model { diff --git a/Sources/Model/Skill.cs b/Sources/Model/Skill.cs index 56d63df..4461984 100644 --- a/Sources/Model/Skill.cs +++ b/Sources/Model/Skill.cs @@ -1,5 +1,5 @@ using System; - +using Shared; namespace Model { public class Skill : IEquatable diff --git a/Sources/Shared/Shared.csproj b/Sources/Shared/Shared.csproj index bafd05b..cdcfd2d 100644 --- a/Sources/Shared/Shared.csproj +++ b/Sources/Shared/Shared.csproj @@ -6,4 +6,10 @@ enable + + + + + + diff --git a/Sources/Shared/enums/ChampionClass.cs b/Sources/Shared/enums/ChampionClass.cs index d169512..249ca02 100644 --- a/Sources/Shared/enums/ChampionClass.cs +++ b/Sources/Shared/enums/ChampionClass.cs @@ -1,5 +1,5 @@ using System; -namespace Model +namespace Shared { public enum ChampionClass { diff --git a/Sources/Shared/enums/RuneFamily.cs b/Sources/Shared/enums/RuneFamily.cs index 07a232c..4928100 100644 --- a/Sources/Shared/enums/RuneFamily.cs +++ b/Sources/Shared/enums/RuneFamily.cs @@ -1,5 +1,5 @@ using System; -namespace Model +namespace Shared { public enum RuneFamily { diff --git a/Sources/Shared/enums/SkillType.cs b/Sources/Shared/enums/SkillType.cs index d7fc8da..bad87d3 100644 --- a/Sources/Shared/enums/SkillType.cs +++ b/Sources/Shared/enums/SkillType.cs @@ -1,5 +1,5 @@ using System; -namespace Model +namespace Shared { public enum SkillType { diff --git a/Sources/StubLib/StubData.Champions.cs b/Sources/StubLib/StubData.Champions.cs index ad19275..8ed1220 100644 --- a/Sources/StubLib/StubData.Champions.cs +++ b/Sources/StubLib/StubData.Champions.cs @@ -1,5 +1,6 @@ using System; using Model; +using Shared; namespace StubLib { diff --git a/Sources/StubLib/StubData.Runes.cs b/Sources/StubLib/StubData.Runes.cs index f0e8802..32fce54 100644 --- a/Sources/StubLib/StubData.Runes.cs +++ b/Sources/StubLib/StubData.Runes.cs @@ -1,5 +1,6 @@ using System; using Model; +using Shared; namespace StubLib { diff --git a/Sources/Tests/ConsoleDB/ConsoleDB.csproj b/Sources/Tests/ConsoleDB/ConsoleDB.csproj index fa2a4bd..f628bc5 100644 --- a/Sources/Tests/ConsoleDB/ConsoleDB.csproj +++ b/Sources/Tests/ConsoleDB/ConsoleDB.csproj @@ -14,9 +14,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Sources/Tests/ConsoleTests/Program.cs b/Sources/Tests/ConsoleTests/Program.cs index 28dc26b..a886d2c 100644 --- a/Sources/Tests/ConsoleTests/Program.cs +++ b/Sources/Tests/ConsoleTests/Program.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Model; using StubLib; using static System.Console; +using Shared; namespace ConsoleTests { diff --git a/Sources/Tests/TestUnitaireLOL/TestUnitaireLOL.csproj b/Sources/Tests/TestUnitaireLOL/TestUnitaireLOL.csproj index cb2bdfc..0fc8bb0 100644 --- a/Sources/Tests/TestUnitaireLOL/TestUnitaireLOL.csproj +++ b/Sources/Tests/TestUnitaireLOL/TestUnitaireLOL.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/Sources/ViewModels/ChampionVM.cs b/Sources/ViewModels/ChampionVM.cs index bdd1e7f..f55d05a 100644 --- a/Sources/ViewModels/ChampionVM.cs +++ b/Sources/ViewModels/ChampionVM.cs @@ -3,6 +3,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using Model; using Microsoft.Maui.Controls; using System.Collections.ObjectModel; +using Shared; namespace ViewModels diff --git a/Sources/ViewModels/ChampionsMgrVM.cs b/Sources/ViewModels/ChampionsMgrVM.cs index 06e5d67..6fb5ae3 100644 --- a/Sources/ViewModels/ChampionsMgrVM.cs +++ b/Sources/ViewModels/ChampionsMgrVM.cs @@ -6,6 +6,7 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.Input; using System.Data.SqlTypes; using System.Reflection; +using Shared; namespace ViewModels; diff --git a/Sources/ViewModels/EditableChampionVM.cs b/Sources/ViewModels/EditableChampionVM.cs index 2db038b..63b5a17 100644 --- a/Sources/ViewModels/EditableChampionVM.cs +++ b/Sources/ViewModels/EditableChampionVM.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Model; +using Shared; namespace ViewModels { diff --git a/Sources/ViewModels/SkillVM.cs b/Sources/ViewModels/SkillVM.cs index c9c2ca1..1c5c9c9 100644 --- a/Sources/ViewModels/SkillVM.cs +++ b/Sources/ViewModels/SkillVM.cs @@ -1,6 +1,7 @@ using System; using CommunityToolkit.Mvvm.ComponentModel; using Model; +using Shared; namespace ViewModels {