mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 14:35:45 +00:00
Petit refactor
This commit is contained in:
parent
458df38f64
commit
73f730c09a
4 changed files with 26 additions and 20 deletions
|
|
@ -13,12 +13,8 @@ namespace AideDeJeu.ViewModels
|
|||
public AboutViewModel()
|
||||
{
|
||||
Title = "À propos de ...";
|
||||
|
||||
OpenWebCommand = new Command<string>((param) => Device.OpenUri(new Uri(param)));
|
||||
}
|
||||
|
||||
public ICommand OpenWebCommand { get; }
|
||||
|
||||
public string Version {
|
||||
get
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,6 +40,15 @@ namespace AideDeJeu.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
private ICommand _OpenWebCommand = null;
|
||||
public ICommand OpenWebCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return _OpenWebCommand ?? (_OpenWebCommand = new Command<string>((param) => Device.OpenUri(new Uri(param))));
|
||||
}
|
||||
}
|
||||
|
||||
public async Task GotoAboutPageAsync()
|
||||
{
|
||||
//await Navigation.PushAsync(new Views.AboutPage(), true);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="AideDeJeu.Views.AboutPage"
|
||||
xmlns:vm="clr-namespace:AideDeJeu.ViewModels"
|
||||
Title="{Binding Title}">
|
||||
Title="{Binding Title}"
|
||||
x:DataType="vm:AboutViewModel">
|
||||
<ContentPage.BindingContext>
|
||||
<vm:AboutViewModel />
|
||||
</ContentPage.BindingContext>
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://github.com/Nioux/AideDeJeu" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://github.com/Nioux/AideDeJeu" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -54,7 +55,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="http://game-icons.net" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="http://game-icons.net" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -66,7 +67,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://www.dafont.com/fr/" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://www.dafont.com/fr/" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -78,7 +79,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=5626" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=5626" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -90,7 +91,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=12619" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=12619" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -102,7 +103,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=7400&tid=304699#msg304699" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://www.black-book-editions.fr/forums.php?topic_id=7400&tid=304699#msg304699" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -116,7 +117,7 @@
|
|||
<Label.GestureRecognizers>
|
||||
<OnPlatform x:TypeArguments="TapGestureRecognizer">
|
||||
<On Platform="Android, UWP">
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://fr.tipeee.com/nioux" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://fr.tipeee.com/nioux" />
|
||||
</On>
|
||||
</OnPlatform>
|
||||
</Label.GestureRecognizers>
|
||||
|
|
@ -130,7 +131,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="http://www.black-book-editions.fr/" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="http://www.black-book-editions.fr/" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
@ -150,7 +151,7 @@
|
|||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://heros-et-dragons.fr/" />
|
||||
<TapGestureRecognizer Command="{Binding Main.Navigator.OpenWebCommand}" CommandParameter="https://heros-et-dragons.fr/" />
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
|
|
|
|||
|
|
@ -108,18 +108,18 @@
|
|||
<ImageButton Source="spell_book.png" Command="{Binding Main.Navigator.LibraryCommand, Mode=OneTime}" />
|
||||
</Grid>
|
||||
</Frame>
|
||||
<!--<Frame>
|
||||
<Frame>
|
||||
<Grid>
|
||||
<Label Text="Favoris" />
|
||||
<ImageButton Source="stars_stack.png" Command="{Binding Main.Navigator.BookmarksCommand}" />
|
||||
<Label Text="Favoris" FontFamily="{StaticResource LinuxLibertineCapitals}" />
|
||||
<ImageButton Source="stars_stack.png" Command="{Binding Main.Navigator.BookmarksCommand, Mode=OneTime}" />
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Frame>
|
||||
<Grid>
|
||||
<Label Text="Recherche" />
|
||||
<ImageButton Source="crystal_ball.png" Command="{Binding Main.Navigator.DeepSearchCommand}" />
|
||||
<Label Text="Recherche" FontFamily="{StaticResource LinuxLibertineCapitals}" />
|
||||
<ImageButton Source="crystal_ball.png" Command="{Binding Main.Navigator.DeepSearchCommand, Mode=OneTime}" />
|
||||
</Grid>
|
||||
</Frame>-->
|
||||
</Frame>
|
||||
<Frame>
|
||||
<Grid>
|
||||
<Label Text="A propos de..." FontFamily="{StaticResource LinuxLibertineCapitals}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue