Compare commits
No commits in common. 'master' and 'EF2' have entirely different histories.
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 234 KiB |
@ -1,85 +1,168 @@
|
|||||||
# Projet d'Entity FrameWork et Consomation et Développement de services sur League Of Legends
|
# prepaLoL
|
||||||
|
|
||||||
Ce projet est un travail universitaire réalisé durant la deuxième année de BUT à Clermont-Ferrand. Il correspond au travail demandé dans le cadre du cours regroupant Entity Framework et Consommation et Developpement de Services.
|
## Diagramme de classes du modèle
|
||||||
|
```mermaid
|
||||||

|
classDiagram
|
||||||
|
class LargeImage{
|
||||||
Explique ce qu'on a fait et ce qu'on a pas fait et pourquoi on a priorisé ca plutot que d'autre
|
+/Base64 : string
|
||||||
|
}
|
||||||
|
class Champion{
|
||||||
# :zap: Consommation et Développement de services
|
+/Name : string
|
||||||
|
+/Bio : string
|
||||||
Voici l'état des différentes tâches liées à la consommation et au développement de services :
|
+/Icon : string
|
||||||
|
+/Characteristics : Dictionary~string, int~
|
||||||
|
~ AddSkin(skin : Skin) bool
|
||||||
> * :white_check_mark: La mise en place de toutes les opérations CRUD est terminée.
|
~ RemoveSkin(skin: Skin) bool
|
||||||
> * :white_check_mark: Une API RESTful a été mise en place en respectant les règles de routage et en utilisant les bons codes de statut.
|
+ AddSkill(skill: Skill) bool
|
||||||
> * :white_check_mark: La version de l'API a été gérée de manière appropriée.
|
+ RemoveSkill(skill: Skill) bool
|
||||||
> * :white_check_mark: Les logs ont été implémentés.
|
+ AddCharacteristics(someCharacteristics : params Tuple~string, int~[])
|
||||||
> * :construction: Les tests unitaires sont en cours de réalisation.
|
+ RemoveCharacteristics(label : string) bool
|
||||||
> * :construction: La création du client MAUI et sa liaison avec l'API sont en cours de réalisation.
|
+ this~label : string~ : int?
|
||||||
> * :white_check_mark: La liaison avec la base de données est opérationnelle.
|
}
|
||||||
> * :white_check_mark: Le filtrage et la pagination des données ont été implémentés.
|
Champion --> "1" LargeImage : Image
|
||||||
> * :white_check_mark: Le code est de qualité grâce à l'utilisation de SonarQube.
|
class ChampionClass{
|
||||||
> * :white_check_mark: L'API a été dockerisée et hébergée sur CodeFirst.
|
<<enumeration>>
|
||||||
> * :construction: Sécurité
|
Unknown,
|
||||||
|
Assassin,
|
||||||
`Note : Le client MAUI n'a pas été réalisé par manque de temps. Les tests unitaires et la sécurité sont réalisés au fur et à mesure de l'avancement du projet.`
|
Fighter,
|
||||||
|
Mage,
|
||||||
|
Marksman,
|
||||||
---
|
Support,
|
||||||
|
Tank,
|
||||||
|
}
|
||||||
# :zap: Entity Framework :
|
Champion --> "1" ChampionClass : Class
|
||||||
|
class Skin{
|
||||||
Voici l'état des différentes tâches liées à Entity Framework :
|
+/Name : string
|
||||||
|
+/Description : string
|
||||||
> * :white_check_mark: **Exercice 1** : Une base de données a été créée avec une table pour les champions, et des requêtes CRUD ont été implémentées, ainsi que du filtrage et de la pagination. Le client console n'a pas été réalisé pour cet exercice par manque de temps.
|
+/Icon : string
|
||||||
> * :white_check_mark: **Exercice 2** : Des tests unitaires ont été écrits et une base de données a été simulée à l'aide de SQLiteInMemory.
|
+/Price : float
|
||||||
> * :white_check_mark: **Exercice 3** : Entity Framework a été déployé et les tests ont été effectués via Code#0.
|
}
|
||||||
> * :white_check_mark: **Exercice 4**: Les tables pour les runes et les skins ont été implémentées (sans les relations).
|
Skin --> "1" LargeImage : Image
|
||||||
> * :white_check_mark: **Exercice 5** : Une relation OneToMany a été établie entre les champions et les skins.
|
Champion "1" -- "*" Skin
|
||||||
> * :white_check_mark: **Exercice 6** : Une relation ManyToMany a été établie entre les champions, les rune pages et les runes.
|
class Skill{
|
||||||
> * :construction: **Exercice 7** : Le mapping entre le modèle et l'entité a été réalisé pour améliorer la qualité du code.
|
+/Name : string
|
||||||
> * :construction: **Exercice 8** : La mise en place du pattern UnitOfWork n'a pas pu être implémentée par manque de temps.
|
+/Description : string
|
||||||
---
|
}
|
||||||
|
class SkillType{
|
||||||
|
<<enumeration>>
|
||||||
### Diagramme d'architechture :
|
Unknown,
|
||||||
|
Basic,
|
||||||

|
Passive,
|
||||||
|
Ultimate,
|
||||||
|
}
|
||||||
#### Partie Client :
|
Skill --> "1" SkillType : Type
|
||||||
|
Champion --> "*" Skill
|
||||||
La partie client qui n'a pas pu être réalisé dans notre cas, est sensée être constituée du client MAUI et du client Console, qui affichent les ressources et testent l'architecture en utilisant le HTTPDataManager pour effectuer des requêtes à l'API et récupérer des données.
|
class Rune{
|
||||||
|
+/Name : string
|
||||||
#### DataManager :
|
+/Description : string
|
||||||
|
}
|
||||||
Le DataManager utilise l'une des extensions mapper pour convertir les objets DTO en Model, et peut être remplacé par EFDataManager ou StubLib.
|
Rune --> "1" LargeImage : Image
|
||||||
|
class RuneFamily{
|
||||||
#### Partie API :
|
<<enumeration>>
|
||||||
|
Unknown,
|
||||||
La partie API reçoit les requêtes et renvoie les objets en conséquence, en utilisant l'EFDataManager pour accéder aux données stockées en base de données. La fluent API permet de définir précisément les attributs de la base de données.
|
Precision,
|
||||||
|
Domination
|
||||||
#### Entity Framework :
|
}
|
||||||
L'EntityFramework est implémenté avec toutes les classes Entity dérivant du modèle, en utilisant OneToMany et ManyToMany de manière dérivée de celle prévue. Les méthodes CRUD sont implémentées grâce à l'utilisation de l'EFDataManager et le Mapper entre entity et model est requis.
|
Rune --> "1" RuneFamily : Family
|
||||||
|
class Category{
|
||||||
#### Déploiement :
|
<<enumeration>>
|
||||||
Le projet est déployé avec le projet en conteneur, mais le pattern UnitOfWork n'a pas été abordé.
|
Major,
|
||||||
|
Minor1,
|
||||||
# :tada: Comment lancer le projet
|
Minor2,
|
||||||
|
Minor3,
|
||||||
## 1 - Cloner le dépot
|
OtherMinor1,
|
||||||
|
OtherMinor2
|
||||||
Cloner le dépôt Git en utilisant la commande suivante :
|
}
|
||||||
|
class RunePage{
|
||||||
git clone https://codefirst.iut.uca.fr/git/bastien.ollier/LOL.git
|
+/Name : string
|
||||||
|
+/this[category : Category] : Rune?
|
||||||
## 2 - Configurer le démarrage du projet
|
- CheckRunes(newRuneCategory : Category)
|
||||||
|
- CheckFamilies(cat1 : Category, cat2 : Category) bool?
|
||||||
> Configurer le projet de démarrage en cliquant sur "Projet de démarrage" à gauche de la flèche verte, puis en sélectionnant l'option "apiLOL".
|
- UpdateMajorFamily(minor : Category, expectedValue : bool)
|
||||||
|
}
|
||||||
## 3 - Lancement du projet
|
RunePage --> "*" Rune : Dictionary~Category,Rune~
|
||||||
|
```
|
||||||
Le projet est maintenant prêt à être lancé. Vous pouvez commencer à faire des requêtes sur la base de données via l'API.
|
|
||||||
|
## Diagramme de classes des interfaces de gestion de l'accès aux données
|
||||||
|
```mermaid
|
||||||
|
classDiagram
|
||||||
|
direction LR;
|
||||||
|
class IGenericDataManager~T~{
|
||||||
|
<<interface>>
|
||||||
|
GetNbItems() Task~int~
|
||||||
|
GetItems(index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~T~~
|
||||||
|
GetNbItemsByName(substring : string)
|
||||||
|
GetItemsByName(substring : string, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~T~~
|
||||||
|
UpdateItem(oldItem : T, newItem : T) Task~T~~
|
||||||
|
AddItem(item : T) Task~T~
|
||||||
|
DeleteItem(item : T) Task~bool~
|
||||||
|
}
|
||||||
|
class IChampionsManager{
|
||||||
|
<<interface>>
|
||||||
|
GetNbItemsByCharacteristic(charName : string)
|
||||||
|
GetItemsByCharacteristic(charName : string, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Champion?~~
|
||||||
|
GetNbItemsByClass(championClass : ChampionClass)
|
||||||
|
GetItemsByClass(championClass : ChampionClass, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Champion?~~
|
||||||
|
GetNbItemsBySkill(skill : Skill?)
|
||||||
|
GetItemsBySkill(skill : Skill?, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Champion?~~
|
||||||
|
GetNbItemsBySkill(skill : string)
|
||||||
|
GetItemsBySkill(skill : string, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Champion?~~
|
||||||
|
GetNbItemsByRunePage(runePage : RunePage?)
|
||||||
|
GetItemsByRunePage(runePage : RunePage?, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Champion?~~
|
||||||
|
}
|
||||||
|
class ISkinsManager{
|
||||||
|
<<interface>>
|
||||||
|
GetNbItemsByChampion(champion : Champion?)
|
||||||
|
GetItemsByChampion(champion : Champion?, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Skin?~~
|
||||||
|
}
|
||||||
|
class IRunesManager{
|
||||||
|
<<interface>>
|
||||||
|
GetNbItemsByFamily(family : RuneFamily)
|
||||||
|
GetItemsByFamily(family : RuneFamily, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~Rune?~~
|
||||||
|
}
|
||||||
|
class IRunePagesManager{
|
||||||
|
<<interface>>
|
||||||
|
GetNbItemsByRune(rune : Rune?)
|
||||||
|
GetItemsByRune(rune : Rune?, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~RunePage?~~
|
||||||
|
GetNbItemsByChampion(champion : Champion?)
|
||||||
|
GetItemsByChampion(champion : Champion?, index : int, count : int, orderingPropertyName : string?, descending : bool) Task~IEnumerable~RunePage?~~
|
||||||
|
}
|
||||||
|
|
||||||
|
IGenericDataManager~Champion?~ <|.. IChampionsManager : T--Champion?
|
||||||
|
IGenericDataManager~Skin?~ <|.. ISkinsManager : T--Skin?
|
||||||
|
IGenericDataManager~Rune?~ <|.. IRunesManager : T--Rune?
|
||||||
|
IGenericDataManager~RunePage?~ <|.. IRunePagesManager : T--RunePage?
|
||||||
|
class IDataManager{
|
||||||
|
<<interface>>
|
||||||
|
}
|
||||||
|
IChampionsManager <-- IDataManager : ChampionsMgr
|
||||||
|
ISkinsManager <-- IDataManager : SkinsMgr
|
||||||
|
IRunesManager <-- IDataManager : RunesMgr
|
||||||
|
IRunePagesManager <-- IDataManager : RunePagesMgr
|
||||||
|
```
|
||||||
|
|
||||||
|
## Diagramme de classes simplifié du Stub
|
||||||
|
```mermaid
|
||||||
|
classDiagram
|
||||||
|
direction TB;
|
||||||
|
|
||||||
|
IDataManager <|.. StubData
|
||||||
|
|
||||||
|
ChampionsManager ..|> IChampionsManager
|
||||||
|
StubData --> ChampionsManager
|
||||||
|
|
||||||
|
RunesManager ..|> IRunesManager
|
||||||
|
StubData --> RunesManager
|
||||||
|
|
||||||
|
RunePagesManager ..|> IRunePagesManager
|
||||||
|
StubData --> RunePagesManager
|
||||||
|
|
||||||
|
SkinsManager ..|> ISkinsManager
|
||||||
|
StubData --> SkinsManager
|
||||||
|
|
||||||
|
StubData --> RunesManager
|
||||||
|
StubData --> "*" Champion
|
||||||
|
StubData --> "*" Rune
|
||||||
|
StubData --> "*" RunePages
|
||||||
|
StubData --> "*" Skins
|
||||||
|
```
|
@ -1,142 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:vm="clr-namespace:LolApp.ViewModels"
|
|
||||||
xmlns:myviews="clr-namespace:LolApp.ContentViews"
|
|
||||||
xmlns:appvm="clr-namespace:LolApp.ViewModels"
|
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
||||||
x:Class="LolApp.AddChampionPage"
|
|
||||||
Title="AddChampionPage"
|
|
||||||
x:Name="root">
|
|
||||||
<Grid RowDefinitions="Auto,*, Auto" BackgroundColor="{StaticResource Black}">
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Label Text="Nouveau Champion" IsVisible="{Binding IsNew}"
|
|
||||||
Style="{StaticResource title}"/>
|
|
||||||
<Label Text="Modifier le Champion" IsVisible="{Binding IsNew, Converter={StaticResource invertedBoolConverter}}"
|
|
||||||
Style="{StaticResource title}"/>
|
|
||||||
<Grid><Line Stroke="{StaticResource Primary}"
|
|
||||||
X1="0" Y1="0" X2="200" Y2="0"
|
|
||||||
HorizontalOptions="Center"/>
|
|
||||||
</Grid>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
<ScrollView Grid.Row="1">
|
|
||||||
<Grid ColumnDefinitions="*, 3*" RowDefinitions="Auto, Auto, Auto, 162, 162, Auto, Auto, Auto, Auto">
|
|
||||||
<Label Text="Nom :"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Entry Grid.Column="1" Placeholder="Nom du champion" Text="{Binding Champion.Name}"
|
|
||||||
Style="{StaticResource defaultEntry}"
|
|
||||||
IsEnabled="{Binding IsNew}"/>
|
|
||||||
|
|
||||||
<Label Text="Icone :" Grid.Row="1" Style="{StaticResource labelForEntry}"/>
|
|
||||||
<ImageButton Grid.Row="1" Grid.Column="1" HeightRequest="42" WidthRequest="42"
|
|
||||||
Source="{Binding Champion.IconBase64, TargetNullValue='lol.png',
|
|
||||||
Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
BackgroundColor="{StaticResource Secondary}"
|
|
||||||
HorizontalOptions="Start"
|
|
||||||
Margin="6"
|
|
||||||
Command="{Binding PickIconCommand}"/>
|
|
||||||
<Label Text="Image :" Grid.Row="2" Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Grid Grid.Row="2" Grid.Column="1" x:Name="largeImageGrid" Margin="0, 0, 12, 0">
|
|
||||||
<ImageButton WidthRequest="{Binding Width, Source={x:Reference largeImageGrid}}"
|
|
||||||
HeightRequest="150"
|
|
||||||
Source="{Binding Champion.LargeImageBase64, TargetNullValue='lollogo.jpg',
|
|
||||||
Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
BackgroundColor="{StaticResource Secondary}"
|
|
||||||
HorizontalOptions="Start"
|
|
||||||
Margin="6"
|
|
||||||
Command="{Binding PickLargeImageCommand}"/>
|
|
||||||
</Grid>
|
|
||||||
<Label Text="Bio :" Grid.Row="3"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Editor Grid.Column="1" Grid.Row="3"
|
|
||||||
Text="{Binding Champion.Bio}" Style="{StaticResource defaultEditor}"/>
|
|
||||||
<Label Text="Classe :" Grid.Row="4"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<myviews:ChampionClassSelector Grid.Row="4" Grid.Column="1" MaximumWidthRequest="{OnPlatform WinUI=400}"
|
|
||||||
CheckedColor="{StaticResource Primary}"
|
|
||||||
UncheckedColor="{StaticResource Secondary}"
|
|
||||||
SelectedValue="{Binding Champion.ChampionClass, Mode=TwoWay}"/>
|
|
||||||
<Label Text="Caractéristiques :" Grid.Row="5" Grid.RowSpan="2"
|
|
||||||
Style="{StaticResource labelForEntry}" VerticalOptions="Start"/>
|
|
||||||
<Border Stroke="{StaticResource Secondary}" Grid.Row="5" Grid.Column="1" VerticalOptions="FillAndExpand"> <ListView ItemsSource="{Binding Champion.Characteristics}"
|
|
||||||
Margin="6" HeightRequest="100" HorizontalOptions="Fill" VerticalOptions="Fill"
|
|
||||||
BackgroundColor="{StaticResource Black}" SeparatorColor="{StaticResource Secondary}" >
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<ViewCell.ContextActions>
|
|
||||||
<MenuItem Command="{Binding Source={x:Reference root}, Path=BindingContext.RemoveCharacteristicCommand}"
|
|
||||||
CommandParameter="{Binding .}"
|
|
||||||
IsDestructive="True" Text="Delete"/>
|
|
||||||
</ViewCell.ContextActions>
|
|
||||||
<Border Margin="0,4" BackgroundColor="{StaticResource Secondary}">
|
|
||||||
<Border.StrokeShape>
|
|
||||||
<RoundRectangle CornerRadius="10, 10, 0, 10"/>
|
|
||||||
</Border.StrokeShape>
|
|
||||||
<Grid ColumnDefinitions="*, Auto">
|
|
||||||
<Label Text="{Binding Key}" TextColor="{StaticResource Black}"
|
|
||||||
HorizontalOptions="Start" VerticalOptions="Center" Margin="4, 0, 0, 0"/>
|
|
||||||
<Label Text="{Binding Value}" Grid.Column="1" TextColor="{StaticResource Black}"
|
|
||||||
HorizontalOptions="End" VerticalOptions="Center" Margin="0, 0, 4, 0"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
|
||||||
</Border>
|
|
||||||
<Grid Grid.Column="1" Grid.Row="6" ColumnDefinitions="*, 58, Auto">
|
|
||||||
<Entry Style="{StaticResource defaultEntry}" Placeholder="Caractéristique" Text="{Binding NewCharacteristicDescription}"/>
|
|
||||||
<Entry Style="{StaticResource defaultEntry}" Placeholder="Valeur" Grid.Column="1" Text="{Binding NewCharacteristicValue}" Keyboard="Numeric">
|
|
||||||
<Entry.Behaviors>
|
|
||||||
<toolkit:NumericValidationBehavior Flags="ValidateOnValueChanged"
|
|
||||||
MinimumValue="0"
|
|
||||||
MaximumValue="9999999"
|
|
||||||
MaximumDecimalPlaces="0"
|
|
||||||
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
||||||
ValidStyle="{StaticResource defaultEntry}"/>
|
|
||||||
</Entry.Behaviors>
|
|
||||||
</Entry>
|
|
||||||
<Button Grid.Column="2" Margin="4,8" CornerRadius="22"
|
|
||||||
Text="{StaticResource plus}"
|
|
||||||
Command="{Binding AddCharacteristicCommand}"/>
|
|
||||||
</Grid>
|
|
||||||
<Label Style="{StaticResource labelForEntry}" Text="Compétences :" Grid.Row="7" VerticalOptions="Start"/>
|
|
||||||
<Grid Grid.Row="7" Grid.Column="1" ColumnDefinitions="*, Auto">
|
|
||||||
<ListView ItemsSource="{Binding Champion.Skills}" Margin="6"
|
|
||||||
HeightRequest="100" HorizontalOptions="Fill" VerticalOptions="Fill" HasUnevenRows="True"
|
|
||||||
BackgroundColor="{StaticResource Black}" SeparatorColor="{StaticResource Secondary}">
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<Grid RowDefinitions="Auto, Auto, *">
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="Label">
|
|
||||||
<Setter Property="TextColor" Value="{StaticResource Primary}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</Grid.Resources>
|
|
||||||
<Label Text="{Binding Name}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"/>
|
|
||||||
<Label Text="{Binding Type}" Grid.Row="1" VerticalOptions="Center" FontAttributes="Italic" FontSize="Micro"/>
|
|
||||||
<Label Text="{Binding Description}" FontSize="Micro" FontAttributes="Italic"
|
|
||||||
Grid.Row="2"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
|
||||||
<Button Grid.Column="1" Margin="4,8" CornerRadius="22"
|
|
||||||
Text="{StaticResource plus}" VerticalOptions="Start"
|
|
||||||
Command="{Binding AddSkillCommand}"/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</ScrollView>
|
|
||||||
<HorizontalStackLayout Grid.Row="2" HorizontalOptions="Center" Spacing="40" Margin="0, 10, 0, 20">
|
|
||||||
<Button Text="Ajouter" Command="{Binding AddChampionCommand}" IsVisible="{Binding IsNew}"/>
|
|
||||||
<Button Text="Modifier" Command="{Binding EditChampionCommand}" IsVisible="{Binding IsNew, Converter={StaticResource invertedBoolConverter}}"/>
|
|
||||||
<Button Text="Annuler" Command="{Binding CancelCommand}"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</ContentPage>
|
|
@ -1,73 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="LolApp.AddOrEditSkinPage"
|
|
||||||
Title="AddOrEditSkinPage"
|
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
|
||||||
<Grid RowDefinitions="Auto,*, Auto" BackgroundColor="{StaticResource Black}">
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Label Text="Nouveau Skin" IsVisible="{Binding IsNew}"
|
|
||||||
Style="{StaticResource title}"/>
|
|
||||||
<Label Text="Modifier le Skin" IsVisible="{Binding IsNew, Converter={StaticResource invertedBoolConverter}}"
|
|
||||||
Style="{StaticResource title}"/>
|
|
||||||
<Grid><Line Stroke="{StaticResource Primary}"
|
|
||||||
X1="0" Y1="0" X2="200" Y2="0"
|
|
||||||
HorizontalOptions="Center"/>
|
|
||||||
</Grid>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
<ScrollView Grid.Row="1">
|
|
||||||
<Grid ColumnDefinitions="*, 3*" RowDefinitions="Auto, Auto, Auto, Auto, 162">
|
|
||||||
<Label Text="Nom :"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Entry Grid.Column="1" Placeholder="Nom du skin" Text="{Binding Skin.Name}"
|
|
||||||
Style="{StaticResource defaultEntry}"
|
|
||||||
IsEnabled="{Binding IsNew}"/>
|
|
||||||
|
|
||||||
<Label Text="Icone :" Grid.Row="1" Style="{StaticResource labelForEntry}"/>
|
|
||||||
<ImageButton Grid.Row="1" Grid.Column="1" HeightRequest="42" WidthRequest="42"
|
|
||||||
Source="{Binding Skin.IconBase64, TargetNullValue='lol.png',
|
|
||||||
Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
BackgroundColor="{StaticResource Secondary}"
|
|
||||||
HorizontalOptions="Start"
|
|
||||||
Margin="6"
|
|
||||||
Command="{Binding PickIconCommand}"/>
|
|
||||||
<Label Text="Image :" Grid.Row="2" Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Grid Grid.Row="2" Grid.Column="1" x:Name="largeImageGrid" Margin="0, 0, 12, 0">
|
|
||||||
<ImageButton WidthRequest="{Binding Width, Source={x:Reference largeImageGrid}}"
|
|
||||||
HeightRequest="150"
|
|
||||||
Source="{Binding Skin.LargeImageBase64, TargetNullValue='lollogo.jpg',
|
|
||||||
Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
BackgroundColor="{StaticResource Secondary}"
|
|
||||||
HorizontalOptions="Start"
|
|
||||||
Margin="6"
|
|
||||||
Command="{Binding PickLargeImageCommand}"/>
|
|
||||||
</Grid>
|
|
||||||
<Label Text="Prix :" Grid.Row="3"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<HorizontalStackLayout Grid.Column="1" Grid.Row="3" Margin="6">
|
|
||||||
<Image Source="rp.png" HeightRequest="16" WidthRequest="16"/>
|
|
||||||
<Entry Grid.Column="1" Placeholder="Nom du skin" Text="{Binding Skin.Price}"
|
|
||||||
Style="{StaticResource defaultEntry}" Margin="4, 0, 0, 0" HorizontalTextAlignment="Start">
|
|
||||||
<Entry.Behaviors>
|
|
||||||
<toolkit:NumericValidationBehavior Flags="ValidateOnValueChanged"
|
|
||||||
MinimumValue="0"
|
|
||||||
MaximumValue="9999999"
|
|
||||||
MaximumDecimalPlaces="0"
|
|
||||||
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
||||||
ValidStyle="{StaticResource defaultEntry}"/>
|
|
||||||
</Entry.Behaviors>
|
|
||||||
</Entry>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
<Label Text="Description :" Grid.Row="4"
|
|
||||||
Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Editor Grid.Column="1" Grid.Row="4"
|
|
||||||
Text="{Binding Skin.Description}" Style="{StaticResource defaultEditor}"/>
|
|
||||||
</Grid>
|
|
||||||
</ScrollView>
|
|
||||||
<HorizontalStackLayout Grid.Row="2" HorizontalOptions="Center" Spacing="40" Margin="0, 10, 0, 20">
|
|
||||||
<Button Text="Ajouter" Command="{Binding AddSkinCommand}" IsVisible="{Binding IsNew}"/>
|
|
||||||
<Button Text="Modifier" Command="{Binding EditSkinCommand}" IsVisible="{Binding IsNew, Converter={StaticResource invertedBoolConverter}}"/>
|
|
||||||
<Button Text="Annuler" Command="{Binding CancelCommand}"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</Grid>
|
|
||||||
</ContentPage>
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="LolApp.AddSkill"
|
|
||||||
xmlns:appvm="clr-namespace:LolApp.ViewModels"
|
|
||||||
Title="AddSkill">
|
|
||||||
<Grid RowDefinitions="Auto,*, Auto" BackgroundColor="{StaticResource Gray900}">
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Label Text="Nouvelle Compétence"
|
|
||||||
Style="{StaticResource title}"/>
|
|
||||||
<Grid>
|
|
||||||
<Line Stroke="{StaticResource Primary}"
|
|
||||||
X1="0" Y1="0" X2="200" Y2="0"
|
|
||||||
HorizontalOptions="Center"/>
|
|
||||||
</Grid>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
<ScrollView Grid.Row="1">
|
|
||||||
<Grid ColumnDefinitions="*, 3*" RowDefinitions="Auto, Auto, *">
|
|
||||||
<Label Text="Nom :" Style="{StaticResource labelForEntry}"/>
|
|
||||||
<Entry Text="{Binding Name}" Style="{StaticResource defaultEntry}"
|
|
||||||
Grid.Column="1"/>
|
|
||||||
<Label Text="Type :" Style="{StaticResource labelForEntry}" Grid.Row="1"/>
|
|
||||||
<Picker ItemsSource="{Binding AllSkills}" SelectedItem="{Binding SkillType}"
|
|
||||||
Grid.Row="1" Grid.Column="1"
|
|
||||||
Style="{StaticResource defaultPicker}"/>
|
|
||||||
<Label Text="Description :" Style="{StaticResource labelForEntry}" Grid.Row="2"/>
|
|
||||||
<Editor Grid.Row="2" Grid.Column="1" Text="{Binding Description}"
|
|
||||||
Style="{StaticResource defaultEditor}"/>
|
|
||||||
</Grid>
|
|
||||||
</ScrollView>
|
|
||||||
<HorizontalStackLayout Grid.Row="2" HorizontalOptions="Center" Spacing="40" Margin="0, 10, 0, 20">
|
|
||||||
<Button Text="Ajouter" Command="{Binding AddSkillToChampionCommand}"/>
|
|
||||||
<Button Text="Annuler" Command="{Binding CancelCommand}"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</Grid>
|
|
||||||
</ContentPage>
|
|
@ -1,18 +0,0 @@
|
|||||||
<?xml version = "1.0" encoding = "UTF-8" ?>
|
|
||||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:local="clr-namespace:LolApp"
|
|
||||||
x:Class="LolApp.App">
|
|
||||||
<Application.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
|
||||||
<ResourceDictionary Source="Resources/Styles/FontAwesomeGlyphs.xaml" x:Name="Colors" />
|
|
||||||
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
|
|
||||||
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
|
|
||||||
<ResourceDictionary Source="Resources/Styles/MyStyles.xaml" />
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
|
||||||
</ResourceDictionary>
|
|
||||||
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<Shell
|
|
||||||
x:Class="LolApp.AppShell"
|
|
||||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:local="clr-namespace:LolApp"
|
|
||||||
Shell.FlyoutBehavior="Disabled">
|
|
||||||
<TabBar>
|
|
||||||
<ShellContent
|
|
||||||
Title="Home"
|
|
||||||
ContentTemplate="{DataTemplate local:MainPage}"
|
|
||||||
Route="MainPage"
|
|
||||||
Icon="{OnPlatform 'lol.png'}" />
|
|
||||||
<ShellContent
|
|
||||||
Title="Champions"
|
|
||||||
ContentTemplate="{DataTemplate local:ChampionsPage}"
|
|
||||||
Route="Championspage"
|
|
||||||
Icon="{OnPlatform 'sword.png'}" />
|
|
||||||
</TabBar>
|
|
||||||
</Shell>
|
|
||||||
|
|
@ -1,185 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
||||||
x:Class="LolApp.ChampionPage"
|
|
||||||
Title="ChampionPage"
|
|
||||||
x:Name="root"
|
|
||||||
BackgroundColor="Black">
|
|
||||||
<ContentPage.ToolbarItems>
|
|
||||||
<ToolbarItem Text="Modifier" Command="{Binding AppVM.NavigateToEditChampionPageCommand, Source={x:Reference root}}"
|
|
||||||
CommandParameter="{Binding}"/>
|
|
||||||
</ContentPage.ToolbarItems>
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
|
|
||||||
MaximumHeightRequest="{OnPlatform WinUI=300}"
|
|
||||||
HeightRequest="{Binding Width,
|
|
||||||
Source={RelativeSource AncestorType={x:Type ContentPage}},
|
|
||||||
Converter={StaticResource imageRatioConverter},
|
|
||||||
ConverterParameter={StaticResource imageRatio}}">
|
|
||||||
<Image Source="{Binding Image, Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
Aspect="AspectFit"
|
|
||||||
AbsoluteLayout.LayoutBounds="0,0,1,1"
|
|
||||||
AbsoluteLayout.LayoutFlags="All"
|
|
||||||
MaximumHeightRequest="{OnPlatform WinUI=300}"/>
|
|
||||||
</AbsoluteLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<Grid Padding="10" BackgroundColor="{StaticResource Black}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label Text="{Binding Name}" FontAttributes="Bold" TextColor="{StaticResource Primary}"
|
|
||||||
FontSize="Title"/>
|
|
||||||
<VerticalStackLayout Grid.Column="1" HorizontalOptions="Center">
|
|
||||||
<Image Source="{Binding Class, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
HeightRequest="26" WidthRequest="26" x:Name="imgClass" PropertyChanged="imgClass_PropertyChanged">
|
|
||||||
<Image.Behaviors>
|
|
||||||
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"
|
|
||||||
x:Name="tintColor"/>
|
|
||||||
</Image.Behaviors>
|
|
||||||
</Image>
|
|
||||||
<Label Text="{Binding Class}" TextColor="{StaticResource Primary}"
|
|
||||||
FontSize="Micro"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView VerticalScrollBarVisibility="Always" BackgroundColor="Black" >
|
|
||||||
|
|
||||||
<Label Text="{Binding Bio}" TextColor="{StaticResource Primary}" Padding="10" FontAttributes="Italic"/>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<Label Padding="10" Text="Caractéristiques" FontSize="Title" TextColor="{StaticResource Primary}"
|
|
||||||
BackgroundColor="Black"/>
|
|
||||||
|
|
||||||
<Grid MaximumHeightRequest="240">
|
|
||||||
<Grid.Resources>
|
|
||||||
<x:Double x:Key="gridHeight">120</x:Double>
|
|
||||||
<x:Int32 x:Key="nbCellsPerLine">3</x:Int32>
|
|
||||||
</Grid.Resources>
|
|
||||||
<Grid.HeightRequest>
|
|
||||||
<MultiBinding Converter="{StaticResource multiMathExpressionConverter}"
|
|
||||||
ConverterParameter="ceiling(x1/x2)*x0">
|
|
||||||
<Binding Source="{StaticResource gridHeight}"/>
|
|
||||||
<Binding Path="Characteristics.Count"/>
|
|
||||||
<Binding Source="{StaticResource nbCellsPerLine}"/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Grid.HeightRequest>
|
|
||||||
<CollectionView ItemsSource="{Binding Characteristics}"
|
|
||||||
ItemsLayout="VerticalGrid, 3"
|
|
||||||
VerticalScrollBarVisibility="Always">
|
|
||||||
<CollectionView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid Padding="10" HeightRequest="120">
|
|
||||||
<Border Stroke="{StaticResource PrimaryBrush}" StrokeThickness="2" BackgroundColor="{StaticResource Black}">
|
|
||||||
<Grid RowDefinitions="4*,3*">
|
|
||||||
<Label Text="{Binding Key}" HorizontalOptions="Center" TextColor="{StaticResource Primary}"
|
|
||||||
FontSize="Small" FontAttributes="Bold" VerticalOptions="End" HorizontalTextAlignment="Center"
|
|
||||||
Margin="0, 0, 0, 5"/>
|
|
||||||
<Label Grid.Row="1" Text="{Binding Value}" HorizontalOptions="Center" TextColor="{StaticResource Primary}"
|
|
||||||
VerticalOptions="Start" HorizontalTextAlignment="Center"
|
|
||||||
FontSize="Small"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
|
|
||||||
</CollectionView.ItemTemplate>
|
|
||||||
|
|
||||||
</CollectionView>
|
|
||||||
</Grid>
|
|
||||||
<Label Padding="10" Text="Compétences" FontSize="Title" TextColor="{StaticResource Primary}"
|
|
||||||
BackgroundColor="Black"/>
|
|
||||||
<ListView ItemsSource="{Binding Skills}" Margin="10"
|
|
||||||
BackgroundColor="Black" HasUnevenRows="True" VerticalScrollBarVisibility="Always"
|
|
||||||
MaximumHeightRequest="400">
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="Label">
|
|
||||||
<Setter Property="TextColor" Value="{StaticResource Primary}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</Grid.Resources>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Text="{Binding Name}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"/>
|
|
||||||
<Label Text="{Binding Type}" Grid.Column="1" VerticalOptions="Center" FontAttributes="Italic" FontSize="Micro"/>
|
|
||||||
<Label Text="{Binding Description}" FontSize="Micro" FontAttributes="Italic"
|
|
||||||
Grid.ColumnSpan="2" Grid.Row="1"/>
|
|
||||||
</Grid>
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
|
|
||||||
</ListView>
|
|
||||||
<Grid ColumnDefinitions="*, Auto">
|
|
||||||
<Label Padding="10" Text="Skins" FontSize="Title" TextColor="{StaticResource Primary}"
|
|
||||||
BackgroundColor="Black"/>
|
|
||||||
<Button Grid.Column="1" Text="{StaticResource plus}" CornerRadius="22" BackgroundColor="{StaticResource Primary}"
|
|
||||||
TextColor="{StaticResource Black}" FontSize="Header"
|
|
||||||
Command="{Binding AppVM.NavigateToAddNewSkinPageCommand, Source={x:Reference root}}"
|
|
||||||
CommandParameter="{Binding}"
|
|
||||||
VerticalOptions="Center" HorizontalOptions="Center"
|
|
||||||
Margin="6"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
<ListView BindingContext="{Binding AppVM, Source={x:Reference root}}"
|
|
||||||
ItemsSource="{Binding SkinsMgrVM.Skins}" HasUnevenRows="True"
|
|
||||||
BackgroundColor="{StaticResource Black}"
|
|
||||||
x:Name="listSkins">
|
|
||||||
<ListView.Behaviors>
|
|
||||||
<toolkit:EventToCommandBehavior
|
|
||||||
EventName="ItemSelected"
|
|
||||||
Command="{Binding NavigateToSkinDetailsPageCommand}"
|
|
||||||
EventArgsConverter="{StaticResource SelectedItemEventArgsConverter}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</ListView.Behaviors>
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<ViewCell.ContextActions>
|
|
||||||
<MenuItem IsDestructive="True"
|
|
||||||
Text="Supprimer"
|
|
||||||
Command="{Binding BindingContext.SkinsMgrVM.DeleteSkinCommand, Source={x:Reference listSkins}}"
|
|
||||||
CommandParameter="{Binding .}"/>
|
|
||||||
<MenuItem Text="Modifier"
|
|
||||||
Command="{Binding Source={x:Reference listSkins}, Path=BindingContext.NavigateToEditSkinPageCommand}"
|
|
||||||
CommandParameter="{Binding .}"/>
|
|
||||||
</ViewCell.ContextActions>
|
|
||||||
<Border Stroke="{StaticResource Primary}" Padding="8,4" HeightRequest="60" Margin="4"
|
|
||||||
StrokeThickness="3" BackgroundColor="{StaticResource Black}">
|
|
||||||
<Border.StrokeShape>
|
|
||||||
<RoundRectangle CornerRadius="0, 10, 10, 10"/>
|
|
||||||
</Border.StrokeShape>
|
|
||||||
<HorizontalStackLayout VerticalOptions="Center">
|
|
||||||
<Image Source="{Binding Icon, Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
HeightRequest="46" WidthRequest="46"/>
|
|
||||||
<Label Text="{Binding Name}" TextColor="{StaticResource Primary}" FontSize="Small"
|
|
||||||
VerticalOptions="Center" Margin="10,4"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</Border>
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
|
|
||||||
</ListView>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</ContentPage>
|
|
@ -1,196 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
||||||
xmlns:myviews="clr-namespace:LolApp.ContentViews"
|
|
||||||
xmlns:vm="clr-namespace:ViewModels;assembly=ViewModels"
|
|
||||||
xmlns:appvm="clr-namespace:LolApp.ViewModels"
|
|
||||||
x:Class="LolApp.ChampionsPage"
|
|
||||||
Title="Champions"
|
|
||||||
x:Name="root">
|
|
||||||
<ContentPage.ToolbarItems>
|
|
||||||
<ToolbarItem Text="Ajouter" Command="{Binding AppVM.NavigateToAddNewChampionPageCommand}" />
|
|
||||||
</ContentPage.ToolbarItems>
|
|
||||||
<ContentPage.Resources>
|
|
||||||
<ControlTemplate x:Key="searchByStringControl">
|
|
||||||
<Grid Margin="20,4" HeightRequest="{OnPlatform 30, Android=40}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Entry Placeholder="{TemplateBinding PlaceHolder}"
|
|
||||||
Text="{TemplateBinding Text, Mode=TwoWay}"/>
|
|
||||||
<Button Text="{StaticResource magnifying-glass}"
|
|
||||||
FontFamily="FASolid"
|
|
||||||
Grid.Column="1" Margin="4, 0, 0, 0"
|
|
||||||
Command="{TemplateBinding Command}"
|
|
||||||
CommandParameter="{TemplateBinding CommandParameter}"/>
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
|
||||||
|
|
||||||
</ContentPage.Resources>
|
|
||||||
<ContentPage.Behaviors>
|
|
||||||
<toolkit:EventToCommandBehavior
|
|
||||||
EventName = "Loaded"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.LoadChampionsCommand}"/>
|
|
||||||
|
|
||||||
</ContentPage.Behaviors>
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<toolkit:Expander Grid.Row="1">
|
|
||||||
<toolkit:Expander.Header>
|
|
||||||
<HorizontalStackLayout>
|
|
||||||
<Label Text="Chercher par "
|
|
||||||
HorizontalOptions="Center"/>
|
|
||||||
<Label Text="nom" IsVisible="{Binding VM.SearchedName, Converter={StaticResource isStringNotNullOrWhiteSpaceConverter}}"/>
|
|
||||||
<Label Text="compétence" IsVisible="{Binding VM.SearchedSkill, Converter={StaticResource isStringNotNullOrWhiteSpaceConverter}}"/>
|
|
||||||
<Label Text=" "/>
|
|
||||||
<Label Text="{Binding IsExpanded,
|
|
||||||
Source={RelativeSource AncestorType={x:Type toolkit:Expander}},
|
|
||||||
Converter={StaticResource isExpandedToCaretConverter}}"
|
|
||||||
FontFamily="FASolid"
|
|
||||||
VerticalOptions="Center"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</toolkit:Expander.Header>
|
|
||||||
<VerticalStackLayout HorizontalOptions="Fill" BackgroundColor="WhiteSmoke">
|
|
||||||
<myviews:SearchByStringView ControlTemplate="{StaticResource searchByStringControl}"
|
|
||||||
PlaceHolder="Entrez un nom"
|
|
||||||
Text="{Binding VM.SearchedName, Mode=TwoWay}"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.LoadChampionsByNameCommand}"
|
|
||||||
CommandParameter="{Binding VM.SearchedName}"/>
|
|
||||||
<myviews:SearchByStringView ControlTemplate="{StaticResource searchByStringControl}"
|
|
||||||
PlaceHolder="Entrez une compétence"
|
|
||||||
Text="{Binding VM.SearchedSkill, Mode=TwoWay}"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.LoadChampionsBySkillCommand}"
|
|
||||||
CommandParameter="{Binding VM.SearchedSkill}"/>
|
|
||||||
<myviews:SearchByStringView ControlTemplate="{StaticResource searchByStringControl}"
|
|
||||||
PlaceHolder="Entrez une caractéristique"
|
|
||||||
Text="{Binding VM.SearchedCharacteristic, Mode=TwoWay}"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.LoadChampionsByCharacteristicCommand}"
|
|
||||||
CommandParameter="{Binding VM.SearchedCharacteristic}"/>
|
|
||||||
<Label Text="Filtrer par classe :" Margin="20, 4, 0, 0"
|
|
||||||
FontSize="Micro"/>
|
|
||||||
<CollectionView ItemsSource="{x:Static appvm:ChampionClassVM.Classes}" ItemsLayout="VerticalGrid, 3"
|
|
||||||
SelectionMode="Single" HeightRequest="110" x:Name="classesView"
|
|
||||||
SelectionChangedCommand="{Binding AppVM.ChampionsMgrVM.LoadChampionsByClassCommand}"
|
|
||||||
SelectionChangedCommandParameter="{Binding VM.SelectedItem, Source={RelativeSource Self}}"
|
|
||||||
SelectedItem="{Binding VM.SelectedClass, Source={x:Reference root}, Mode=TwoWay}">
|
|
||||||
<CollectionView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid HorizontalOptions="Center" RowDefinitions="*, *" WidthRequest="100" Padding="10, 10, 10, 0"
|
|
||||||
BackgroundColor="{Binding IsSelected, Converter={StaticResource isSelectedToColorConverter}}">
|
|
||||||
<Grid.GestureRecognizers>
|
|
||||||
<TapGestureRecognizer Command="{Binding Source={x:Reference root}, Path=BindingContext.VM.SelectedChampionClassChangedCommand}"
|
|
||||||
CommandParameter="{Binding}" />
|
|
||||||
|
|
||||||
</Grid.GestureRecognizers>
|
|
||||||
<Image Source="{Binding Model, Converter={StaticResource championClassToIconConverter}}" HeightRequest="26" WidthRequest="26"
|
|
||||||
/>
|
|
||||||
<Label Text="{Binding Model}" TextColor="{StaticResource Black}"
|
|
||||||
HorizontalOptions="Center" Grid.Row="1"
|
|
||||||
FontSize="Micro">
|
|
||||||
</Label>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</DataTemplate>
|
|
||||||
|
|
||||||
</CollectionView.ItemTemplate>
|
|
||||||
</CollectionView>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</toolkit:Expander>
|
|
||||||
<ListView Grid.Row="2" CachingStrategy="RecycleElementAndDataTemplate"
|
|
||||||
ItemsSource="{Binding AppVM.ChampionsMgrVM.Champions}"
|
|
||||||
RowHeight="50"
|
|
||||||
SelectedItem="{Binding AppVM.ChampionsMgrVM.SelectedChampion, Mode=TwoWay}">
|
|
||||||
<ListView.Behaviors>
|
|
||||||
<toolkit:EventToCommandBehavior
|
|
||||||
EventName="ItemSelected"
|
|
||||||
Command="{Binding AppVM.NavigateToChampionDetailsPageCommand}"
|
|
||||||
EventArgsConverter="{StaticResource SelectedItemEventArgsConverter}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</ListView.Behaviors>
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<ViewCell.ContextActions>
|
|
||||||
<MenuItem Command="{Binding Source={x:Reference root}, Path=BindingContext.AppVM.ChampionsMgrVM.DeleteChampionCommand}"
|
|
||||||
CommandParameter="{Binding .}"
|
|
||||||
IsDestructive="True" Text="Supprimer"/>
|
|
||||||
<MenuItem Command="{Binding Source={x:Reference root}, Path=BindingContext.AppVM.NavigateToEditChampionPageCommand}"
|
|
||||||
CommandParameter="{Binding .}"
|
|
||||||
IsDestructive="False" Text="Modifier"/>
|
|
||||||
</ViewCell.ContextActions>
|
|
||||||
<Grid Margin="4">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition/>
|
|
||||||
<RowDefinition/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Image Source="{Binding Icon, Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
HeightRequest="40"
|
|
||||||
WidthRequest="40"
|
|
||||||
Grid.RowSpan="2"
|
|
||||||
VerticalOptions="Center"
|
|
||||||
Margin="0, 0, 10, 0"/>
|
|
||||||
<Label Text="{Binding Name}" Grid.Column="1"
|
|
||||||
FontAttributes="Bold"
|
|
||||||
FontSize="{OnPlatform Header, WinUI=Small}"
|
|
||||||
VerticalOptions="Center"/>
|
|
||||||
<Label Text="{Binding Class}" Grid.Row="1" Grid.Column="1"
|
|
||||||
FontAttributes="Italic"
|
|
||||||
FontSize="Caption"
|
|
||||||
VerticalOptions="Center"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
|
||||||
|
|
||||||
<Grid Grid.Row="3" HorizontalOptions="Center" HeightRequest="45"
|
|
||||||
IsVisible="{Binding AppVM.ChampionsMgrVM.NbChampions, Converter={StaticResource intToBoolConverter}}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Button Grid.Column="0" Style="{StaticResource iconButton}"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.PreviousPageCommand}">
|
|
||||||
<Button.ImageSource>
|
|
||||||
<FontImageSource Glyph="{StaticResource angle-left}"
|
|
||||||
FontFamily="FASolid"
|
|
||||||
Size="Title"/>
|
|
||||||
</Button.ImageSource>
|
|
||||||
</Button>
|
|
||||||
<StackLayout Orientation="Horizontal" Grid.Column="1"
|
|
||||||
HorizontalOptions="Center" VerticalOptions="Center">
|
|
||||||
<StackLayout.Resources>
|
|
||||||
<Style BasedOn="{StaticResource defaultLabel}" TargetType="Label">
|
|
||||||
<Setter Property="Margin" Value="2"/>
|
|
||||||
</Style>
|
|
||||||
</StackLayout.Resources>
|
|
||||||
<Label Text="{Binding AppVM.ChampionsMgrVM.Index, Converter={StaticResource plusOneConverter}}" HorizontalOptions="End"/>
|
|
||||||
<Label Text="/"/>
|
|
||||||
<Label Text="{Binding AppVM.ChampionsMgrVM.NbPages}" HorizontalOptions="Start"/>
|
|
||||||
</StackLayout>
|
|
||||||
<Button Grid.Column="2" Style="{StaticResource iconButton}"
|
|
||||||
Command="{Binding AppVM.ChampionsMgrVM.NextPageCommand}">
|
|
||||||
<Button.ImageSource>
|
|
||||||
<FontImageSource Glyph="{StaticResource angle-right}" FontFamily="FASolid"
|
|
||||||
Size="Title"/>
|
|
||||||
</Button.ImageSource>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</ContentPage>
|
|
@ -1,131 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:model="clr-namespace:Model;assembly=Model"
|
|
||||||
x:Class="LolApp.ContentViews.ChampionClassSelector"
|
|
||||||
x:Name="root">
|
|
||||||
|
|
||||||
<ContentView.Resources>
|
|
||||||
<model:ChampionClass x:Key="assassin">Assassin</model:ChampionClass>
|
|
||||||
<model:ChampionClass x:Key="fighter">Fighter</model:ChampionClass>
|
|
||||||
<model:ChampionClass x:Key="mage">Mage</model:ChampionClass>
|
|
||||||
<model:ChampionClass x:Key="marksman">Marksman</model:ChampionClass>
|
|
||||||
<model:ChampionClass x:Key="support">Support</model:ChampionClass>
|
|
||||||
<model:ChampionClass x:Key="tank">Tank</model:ChampionClass>
|
|
||||||
|
|
||||||
<ControlTemplate x:Key="RadioButtonTemplate">
|
|
||||||
<Border Stroke="{StaticResource Transparent}"
|
|
||||||
BackgroundColor="{StaticResource Transparent}"
|
|
||||||
|
|
||||||
HorizontalOptions="Fill"
|
|
||||||
VerticalOptions="Fill"
|
|
||||||
Padding="0">
|
|
||||||
<Border.StrokeShape>
|
|
||||||
<RoundRectangle CornerRadius="40, 40, 0, 40"/>
|
|
||||||
</Border.StrokeShape>
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CheckedStates">
|
|
||||||
<VisualState x:Name="Checked">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="BackgroundColor"
|
|
||||||
Value="{Binding CheckedColor, Source={x:Reference root}}" />
|
|
||||||
<Setter Property="Stroke"
|
|
||||||
Value="{Binding CheckedColor, Source={x:Reference root}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="Unchecked">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="BackgroundColor"
|
|
||||||
Value="{Binding UncheckedColor, Source={x:Reference root}}" />
|
|
||||||
<Setter Property="Stroke"
|
|
||||||
Value="{Binding UncheckedColor, Source={x:Reference root}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</VisualStateManager.VisualStateGroups>
|
|
||||||
<Grid>
|
|
||||||
<ContentPresenter VerticalOptions="Center" HorizontalOptions="Center" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
|
|
||||||
<Style TargetType="RadioButton">
|
|
||||||
<Setter Property="ControlTemplate"
|
|
||||||
Value="{StaticResource RadioButtonTemplate}" />
|
|
||||||
</Style>
|
|
||||||
</ContentView.Resources>
|
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*, *, *" RowDefinitions="*, *"
|
|
||||||
Margin="6" ColumnSpacing="6" RowSpacing="6"
|
|
||||||
RadioButtonGroup.GroupName="championClasses"
|
|
||||||
RadioButtonGroup.SelectedValue="{Binding SelectedValue, Source={x:Reference root}, Mode=TwoWay}">
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="Label">
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Micro, WinUI=12}"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
<RadioButton Value="{Binding Source={StaticResource assassin}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource assassin}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Assassin" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Grid.Column="1"
|
|
||||||
Value="{Binding Source={StaticResource fighter}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource fighter}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Fighter" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Grid.Column="2"
|
|
||||||
Value="{Binding Source={StaticResource mage}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource mage}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Mage" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Grid.Row="1" Grid.Column="0"
|
|
||||||
Value="{Binding Source={StaticResource marksman}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource marksman}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Marksman" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Grid.Row="1" Grid.Column="1"
|
|
||||||
Value="{Binding Source={StaticResource support}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource support}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Support" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Grid.Row="1" Grid.Column="2"
|
|
||||||
Value="{Binding Source={StaticResource tank}}">
|
|
||||||
<RadioButton.Content>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<Image Source="{Binding Source={StaticResource tank}, Converter={StaticResource championClassToIconConverter}}"
|
|
||||||
WidthRequest="26" HeightRequest="26" HorizontalOptions="Center"/>
|
|
||||||
<Label Text="Tank" HorizontalOptions="Center"/>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</RadioButton.Content>
|
|
||||||
</RadioButton>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</ContentView>
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="LolApp.MainPage">
|
|
||||||
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout
|
|
||||||
Spacing="25"
|
|
||||||
Padding="30,0"
|
|
||||||
VerticalOptions="Center">
|
|
||||||
|
|
||||||
<Image
|
|
||||||
Source="lollogo.jpg"
|
|
||||||
SemanticProperties.Description="Cute dot net bot waving hi to you!"
|
|
||||||
HeightRequest="200"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="League of Legends Data"
|
|
||||||
SemanticProperties.HeadingLevel="Level1"
|
|
||||||
FontSize="32"
|
|
||||||
HorizontalOptions="Center"
|
|
||||||
HorizontalTextAlignment="Center"/>
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="Find information about champions, skins and runes"
|
|
||||||
SemanticProperties.HeadingLevel="Level2"
|
|
||||||
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
|
|
||||||
FontSize="18"
|
|
||||||
HorizontalOptions="Center"
|
|
||||||
HorizontalTextAlignment="Center"/>
|
|
||||||
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</ContentPage>
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>UIDeviceFamily</key>
|
|
||||||
<array>
|
|
||||||
<integer>1</integer>
|
|
||||||
<integer>2</integer>
|
|
||||||
</array>
|
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
|
||||||
<array>
|
|
||||||
<string>arm64</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>XSAppIconAssets</key>
|
|
||||||
<string>Assets.xcassets/appicon.appiconset</string>
|
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>New Entry</string>
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
|
||||||
<string>New Entry</string>
|
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
||||||
<string>New Entry</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -1,9 +0,0 @@
|
|||||||
<maui:MauiWinUIApplication
|
|
||||||
x:Class="LolApp.WinUI.App"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:maui="using:Microsoft.Maui"
|
|
||||||
xmlns:local="using:LolApp.WinUI">
|
|
||||||
|
|
||||||
</maui:MauiWinUIApplication>
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Package
|
|
||||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
|
||||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
|
||||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
|
||||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
|
||||||
IgnorableNamespaces="uap rescap">
|
|
||||||
|
|
||||||
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
|
|
||||||
|
|
||||||
<mp:PhoneIdentity PhoneProductId="B9226665-2A86-4F1D-BB62-983AD09442FD" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
|
||||||
|
|
||||||
<Properties>
|
|
||||||
<DisplayName>$placeholder$</DisplayName>
|
|
||||||
<PublisherDisplayName>User Name</PublisherDisplayName>
|
|
||||||
<Logo>$placeholder$.png</Logo>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Dependencies>
|
|
||||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
|
||||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
|
||||||
</Dependencies>
|
|
||||||
|
|
||||||
<Resources>
|
|
||||||
<Resource Language="x-generate" />
|
|
||||||
</Resources>
|
|
||||||
|
|
||||||
<Applications>
|
|
||||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
|
|
||||||
<uap:VisualElements
|
|
||||||
DisplayName="$placeholder$"
|
|
||||||
Description="$placeholder$"
|
|
||||||
Square150x150Logo="$placeholder$.png"
|
|
||||||
Square44x44Logo="$placeholder$.png"
|
|
||||||
BackgroundColor="transparent">
|
|
||||||
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
|
|
||||||
<uap:SplashScreen Image="$placeholder$.png" />
|
|
||||||
</uap:VisualElements>
|
|
||||||
</Application>
|
|
||||||
</Applications>
|
|
||||||
|
|
||||||
<Capabilities>
|
|
||||||
<rescap:Capability Name="runFullTrust" />
|
|
||||||
</Capabilities>
|
|
||||||
|
|
||||||
</Package>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="LolApp.WinUI.app"/>
|
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<windowsSettings>
|
|
||||||
<!-- The combination of below two tags have the following effect:
|
|
||||||
1) Per-Monitor for >= Windows 10 Anniversary Update
|
|
||||||
2) System < Windows 10 Anniversary Update
|
|
||||||
-->
|
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
|
||||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
|
||||||
</windowsSettings>
|
|
||||||
</application>
|
|
||||||
</assembly>
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIDeviceFamily</key>
|
|
||||||
<array>
|
|
||||||
<integer>1</integer>
|
|
||||||
<integer>2</integer>
|
|
||||||
</array>
|
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
|
||||||
<array>
|
|
||||||
<string>arm64</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>XSAppIconAssets</key>
|
|
||||||
<string>Assets.xcassets/appicon.appiconset</string>
|
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>New Entry</string>
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
|
||||||
<string>Pour accéder aux images...</string>
|
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
||||||
<string>Pour accéder aux images...</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 748 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 665 B |
@ -1,17 +0,0 @@
|
|||||||
Any raw assets you want to be deployed with your application can be placed in
|
|
||||||
this directory (and child directories). Deployment of the asset to your application
|
|
||||||
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
|
|
||||||
|
|
||||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
|
||||||
|
|
||||||
These files will be deployed with you package and will be accessible using Essentials:
|
|
||||||
|
|
||||||
async Task LoadMauiAsset()
|
|
||||||
{
|
|
||||||
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
|
|
||||||
using var reader = new StreamReader(stream);
|
|
||||||
|
|
||||||
var contents = reader.ReadToEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 228 KiB |
@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<?xaml-comp compile="true" ?>
|
|
||||||
<ResourceDictionary
|
|
||||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
|
||||||
|
|
||||||
<Color x:Key="Primary">#D2B977</Color>
|
|
||||||
<Color x:Key="Secondary">#F0E7B7</Color>
|
|
||||||
<Color x:Key="Tertiary">#2B0B98</Color>
|
|
||||||
<Color x:Key="White">White</Color>
|
|
||||||
<Color x:Key="Black">Black</Color>
|
|
||||||
<Color x:Key="Gray100">#E1E1E1</Color>
|
|
||||||
<Color x:Key="Gray200">#C8C8C8</Color>
|
|
||||||
<Color x:Key="Gray300">#ACACAC</Color>
|
|
||||||
<Color x:Key="Gray400">#919191</Color>
|
|
||||||
<Color x:Key="Gray500">#6E6E6E</Color>
|
|
||||||
<Color x:Key="Gray600">#404040</Color>
|
|
||||||
<Color x:Key="Gray900">#212121</Color>
|
|
||||||
<Color x:Key="Gray950">#141414</Color>
|
|
||||||
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
|
|
||||||
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
|
|
||||||
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
|
|
||||||
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
|
|
||||||
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
|
|
||||||
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
|
|
||||||
|
|
||||||
<Color x:Key="Yellow100Accent">#F7B548</Color>
|
|
||||||
<Color x:Key="Yellow200Accent">#FFD590</Color>
|
|
||||||
<Color x:Key="Yellow300Accent">#FFE5B9</Color>
|
|
||||||
<Color x:Key="Cyan100Accent">#28C2D1</Color>
|
|
||||||
<Color x:Key="Cyan200Accent">#7BDDEF</Color>
|
|
||||||
<Color x:Key="Cyan300Accent">#C3F2F4</Color>
|
|
||||||
<Color x:Key="Blue100Accent">#3E8EED</Color>
|
|
||||||
<Color x:Key="Blue200Accent">#72ACF1</Color>
|
|
||||||
<Color x:Key="Blue300Accent">#A7CBF6</Color>
|
|
||||||
|
|
||||||
<Color x:Key="Transparent">Transparent</Color>
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
|
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<?xaml-comp compile="true" ?>
|
|
||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
|
||||||
|
|
||||||
<x:String x:Key="angle-left"></x:String>
|
|
||||||
<x:String x:Key="angle-right"></x:String>
|
|
||||||
<x:String x:Key="caret-left"></x:String>
|
|
||||||
<x:String x:Key="caret-down"></x:String>
|
|
||||||
<x:String x:Key="magnifying-glass"></x:String>
|
|
||||||
<x:String x:Key="plus">+</x:String>
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
|
@ -1,102 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<?xaml-comp compile="true" ?>
|
|
||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:conv="clr-namespace:LolApp.Resources.Converters"
|
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
|
||||||
|
|
||||||
<x:Double x:Key="imageRatio">0.59</x:Double>
|
|
||||||
|
|
||||||
<Style TargetType="Button" x:Key="iconButton">
|
|
||||||
<Setter Property="Margin" Value="4"/>
|
|
||||||
<Setter Property="Padding" Value="10"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Label" x:Key="defaultLabel">
|
|
||||||
<Setter Property="HorizontalOptions" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalTextAlignment" Value="Center"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Medium}"/>
|
|
||||||
<Setter Property="Margin" Value="10"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Label" x:Key="title">
|
|
||||||
<Setter Property="HorizontalOptions" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalTextAlignment" Value="Center"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Title}"/>
|
|
||||||
<Setter Property="TextColor" Value="{StaticResource Primary}"/>
|
|
||||||
<Setter Property="Margin" Value="0, 10, 0, 4"/>
|
|
||||||
<Setter Property="FontAttributes" Value="Bold"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Label" x:Key="labelForEntry">
|
|
||||||
<Setter Property="HorizontalOptions" Value="End"/>
|
|
||||||
<Setter Property="VerticalOptions" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalTextAlignment" Value="End"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Small}"/>
|
|
||||||
<Setter Property="Margin" Value="4"/>
|
|
||||||
<Setter Property="TextColor" Value="{StaticResource Primary}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Entry" x:Key="defaultEntry">
|
|
||||||
<Setter Property="BackgroundColor" Value="{StaticResource Secondary}"/>
|
|
||||||
<Setter Property="VerticalOptions" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalOptions" Value="FillAndExpand"/>
|
|
||||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray300}"/>
|
|
||||||
<Setter Property="Margin" Value="6"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Small}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Editor" x:Key="defaultEditor">
|
|
||||||
<Setter Property="BackgroundColor" Value="{StaticResource Secondary}"/>
|
|
||||||
<Setter Property="VerticalOptions" Value="FillAndExpand"/>
|
|
||||||
<Setter Property="HorizontalOptions" Value="FillAndExpand"/>
|
|
||||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray300}"/>
|
|
||||||
<Setter Property="Margin" Value="6"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Small}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Picker" x:Key="defaultPicker">
|
|
||||||
<Setter Property="BackgroundColor" Value="{StaticResource Secondary}"/>
|
|
||||||
<Setter Property="VerticalOptions" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalOptions" Value="FillAndExpand"/>
|
|
||||||
<Setter Property="Margin" Value="6"/>
|
|
||||||
<Setter Property="FontSize" Value="{OnPlatform Small}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="InvalidEntryStyle" TargetType="Entry" BasedOn="{StaticResource defaultEntry}">
|
|
||||||
<Setter Property="TextColor" Value="Red" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<conv:PlusOneConverter x:Key="plusOneConverter"/>
|
|
||||||
<conv:Base64ToImageSourceConverter x:Key="base64ToImageSourceConverter"/>
|
|
||||||
<conv:ImageRatioConverter x:Key="imageRatioConverter"/>
|
|
||||||
<conv:ChampionClassToIconConverter x:Key="championClassToIconConverter"/>
|
|
||||||
<toolkit:SelectedItemEventArgsConverter x:Key="SelectedItemEventArgsConverter" />
|
|
||||||
<toolkit:BoolToObjectConverter TrueObject="{StaticResource caret-down}"
|
|
||||||
FalseObject="{StaticResource caret-left}"
|
|
||||||
DefaultConvertReturnValue="{StaticResource caret-left}"
|
|
||||||
x:Key="isExpandedToCaretConverter"/>
|
|
||||||
<toolkit:IntToBoolConverter x:Key="intToBoolConverter"/>
|
|
||||||
<toolkit:IsStringNotNullOrWhiteSpaceConverter x:Key="isStringNotNullOrWhiteSpaceConverter"
|
|
||||||
DefaultConvertReturnValue="False"/>
|
|
||||||
<toolkit:IsStringNullOrWhiteSpaceConverter x:Key="isStringNullOrWhiteSpaceConverter"/>
|
|
||||||
<toolkit:MultiMathExpressionConverter x:Key="multiMathExpressionConverter" />
|
|
||||||
<toolkit:IsEqualConverter x:Key="isEqualConverter" />
|
|
||||||
<toolkit:MathExpressionConverter x:Key="mathExpressionConverter"/>
|
|
||||||
|
|
||||||
<toolkit:BoolToObjectConverter TrueObject="{StaticResource Primary}"
|
|
||||||
FalseObject="{StaticResource Transparent}"
|
|
||||||
x:Key="isSelectedToColorConverter"/>
|
|
||||||
|
|
||||||
<toolkit:MultiConverter x:Key="selectedIconToColorConverter">
|
|
||||||
<toolkit:IsEqualConverter />
|
|
||||||
<toolkit:BoolToObjectConverter FalseObject="{StaticResource Primary}"
|
|
||||||
TrueObject="{StaticResource Black}"/>
|
|
||||||
</toolkit:MultiConverter>
|
|
||||||
|
|
||||||
<toolkit:IsListNotNullOrEmptyConverter x:Key="isListNotNullOrEmptyConverter"/>
|
|
||||||
<toolkit:IsListNullOrEmptyConverter x:Key="isListNullOrEmptyConverter"/>
|
|
||||||
|
|
||||||
<toolkit:InvertedBoolConverter x:Key="invertedBoolConverter"/>
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
|
@ -1,406 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<?xaml-comp compile="true" ?>
|
|
||||||
<ResourceDictionary
|
|
||||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
|
||||||
|
|
||||||
<Style TargetType="ActivityIndicator">
|
|
||||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="IndicatorView">
|
|
||||||
<Setter Property="IndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}"/>
|
|
||||||
<Setter Property="SelectedIndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray100}}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
|
||||||
<Setter Property="StrokeShape" Value="Rectangle"/>
|
|
||||||
<Setter Property="StrokeThickness" Value="1"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="BoxView">
|
|
||||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Button">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Primary}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
<Setter Property="CornerRadius" Value="8"/>
|
|
||||||
<Setter Property="Padding" Value="14,10"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="CheckBox">
|
|
||||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="DatePicker">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Editor">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Entry">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Frame">
|
|
||||||
<Setter Property="HasShadow" Value="False" />
|
|
||||||
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="CornerRadius" Value="8" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="ImageButton">
|
|
||||||
<Setter Property="Opacity" Value="1" />
|
|
||||||
<Setter Property="BorderColor" Value="Transparent"/>
|
|
||||||
<Setter Property="BorderWidth" Value="0"/>
|
|
||||||
<Setter Property="CornerRadius" Value="0"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="Opacity" Value="0.5" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Label">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
|
||||||
<Setter Property="FontSize" Value="14" />
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="ListView">
|
|
||||||
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
|
||||||
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Picker">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="ProgressBar">
|
|
||||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="RadioButton">
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="RefreshView">
|
|
||||||
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="SearchBar">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
|
||||||
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
|
||||||
<Setter Property="FontSize" Value="14" />
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="SearchHandler">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
|
||||||
<Setter Property="FontSize" Value="14" />
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Shadow">
|
|
||||||
<Setter Property="Radius" Value="15" />
|
|
||||||
<Setter Property="Opacity" Value="0.5" />
|
|
||||||
<Setter Property="Brush" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="Offset" Value="10,10" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Slider">
|
|
||||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
|
||||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
|
||||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
|
||||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="SwipeItem">
|
|
||||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Switch">
|
|
||||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="ThumbColor" Value="{StaticResource White}" />
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="On">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray200}}" />
|
|
||||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="Off">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="TimePicker">
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
|
||||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
|
||||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
|
||||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
||||||
<VisualStateGroupList>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Disabled">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateGroupList>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Page" ApplyToDerivedTypes="True">
|
|
||||||
<Setter Property="Padding" Value="0"/>
|
|
||||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="Shell" ApplyToDerivedTypes="True">
|
|
||||||
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
|
|
||||||
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
|
|
||||||
<Setter Property="Shell.NavBarHasShadow" Value="False" />
|
|
||||||
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
|
||||||
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="NavigationPage">
|
|
||||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="TabbedPage">
|
|
||||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
|
||||||
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
|
||||||
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="LolApp.SkinPage"
|
|
||||||
Title="SkinPage"
|
|
||||||
x:Name="root"
|
|
||||||
BackgroundColor="{StaticResource Black}">
|
|
||||||
<ContentPage.ToolbarItems>
|
|
||||||
<ToolbarItem Text="Modifier" Command="{Binding AppVM.NavigateToEditSkinPageCommand, Source={x:Reference root}}"
|
|
||||||
CommandParameter="{Binding}"/>
|
|
||||||
</ContentPage.ToolbarItems>
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout>
|
|
||||||
<AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
|
|
||||||
MaximumHeightRequest="{OnPlatform WinUI=300}"
|
|
||||||
HeightRequest="{Binding Width,
|
|
||||||
Source={RelativeSource AncestorType={x:Type ContentPage}},
|
|
||||||
Converter={StaticResource imageRatioConverter},
|
|
||||||
ConverterParameter={StaticResource imageRatio}}">
|
|
||||||
<Image Source="{Binding Image, Converter={StaticResource base64ToImageSourceConverter}}"
|
|
||||||
Aspect="AspectFit"
|
|
||||||
AbsoluteLayout.LayoutBounds="0,0,1,1"
|
|
||||||
AbsoluteLayout.LayoutFlags="All"
|
|
||||||
MaximumHeightRequest="{OnPlatform WinUI=300}"/>
|
|
||||||
</AbsoluteLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<Grid Padding="10" BackgroundColor="{StaticResource Black}"
|
|
||||||
ColumnDefinitions="*, Auto">
|
|
||||||
<Label Text="{Binding Name}" FontAttributes="Bold" TextColor="{StaticResource Primary}"
|
|
||||||
FontSize="Title"/>
|
|
||||||
<HorizontalStackLayout Grid.Column="1">
|
|
||||||
<Image Source="rp.png" HeightRequest="16" WidthRequest="16"/>
|
|
||||||
<Label Text="{Binding Price}" TextColor="{StaticResource Primary}"
|
|
||||||
FontSize="Small" VerticalOptions="Center" Margin="4, 0, 0, 0"/>
|
|
||||||
</HorizontalStackLayout>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView VerticalScrollBarVisibility="Always" BackgroundColor="Black" >
|
|
||||||
<Label Text="{Binding Description}" TextColor="{StaticResource Primary}"
|
|
||||||
Margin="10" FontAttributes="Italic"/>
|
|
||||||
</ScrollView>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
</ContentPage>
|
|
@ -0,0 +1,37 @@
|
|||||||
|
using apiLOL;
|
||||||
|
using apiLOL.Controllers;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using StubLib;
|
||||||
|
|
||||||
|
namespace TestUnitaire
|
||||||
|
{
|
||||||
|
public class TestAPILol
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void Test1()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void TestPostChampion()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var data = new StubData();
|
||||||
|
var controller = new ControllerChampions(new StubData());
|
||||||
|
var champDTO = new ChampionDTO("Charles", "Charles est un champion de League of Legends");
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var result = controller.Post(champDTO);
|
||||||
|
data.ChampionsMgr.AddItem(champDTO.ToModel());
|
||||||
|
var nbItem = data.ChampionsMgr.GetNbItems();
|
||||||
|
Task<int> nbItemTask = nbItem;
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.IsType<OkResult>(result);
|
||||||
|
// Verify that the champions is added to the stub
|
||||||
|
Assert.Equal(7, nbItemTask.Result);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="7.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||||
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\apiLOL\apiLOL.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1 @@
|
|||||||
|
global using Xunit;
|