mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Liens directs activés ( merci XF 3.2 ;-) )
This commit is contained in:
parent
3142b468b8
commit
a8fa48cafe
4 changed files with 3518 additions and 3041 deletions
6484
AideDeJeu/AideDeJeu.Android/Resources/Resource.designer.cs
generated
6484
AideDeJeu/AideDeJeu.Android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load diff
|
|
@ -103,48 +103,55 @@
|
|||
if (links.Any())
|
||||
{
|
||||
var blockLinks = links.Distinct().OrderBy(l => l.Key).ToList();
|
||||
view.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
if (blockLinks.Count > 1)
|
||||
{
|
||||
Command = new Command(async () =>
|
||||
//view.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
//{
|
||||
// Command = new Command(async () =>
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// var result = await Application.Current.MainPage.DisplayActionSheet("Ouvrir le lien", "Annuler", null, blockLinks.Select(x => x.Key).ToArray());
|
||||
// var link = blockLinks.FirstOrDefault(x => x.Key == result);
|
||||
// NavigateToLinkCommand?.Execute(link.Value);
|
||||
// }
|
||||
// catch (Exception) { }
|
||||
// }),
|
||||
//});
|
||||
}
|
||||
else
|
||||
{
|
||||
view.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
{
|
||||
try
|
||||
Command = new Command(() =>
|
||||
{
|
||||
if (blockLinks.Count > 1)
|
||||
try
|
||||
{
|
||||
var result = await Application.Current.MainPage.DisplayActionSheet("Ouvrir le lien", "Annuler", null, blockLinks.Select(x => x.Key).ToArray());
|
||||
var link = blockLinks.FirstOrDefault(x => x.Key == result);
|
||||
//await NavigateToLink(link.Value);
|
||||
NavigateToLinkCommand?.Execute(link.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
//await NavigateToLink(blockLinks.First().Value);
|
||||
NavigateToLinkCommand?.Execute(blockLinks.First().Value);
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}),
|
||||
});
|
||||
|
||||
catch (Exception) { }
|
||||
}),
|
||||
});
|
||||
}
|
||||
links = new List<KeyValuePair<string, string>>();
|
||||
}
|
||||
}
|
||||
|
||||
private void AttachLink(Span span, KeyValuePair<string, string> link)
|
||||
{
|
||||
//span.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
//{
|
||||
// Command = new Command(async () =>
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// await NavigateToLink(link.Value);
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// }
|
||||
// }),
|
||||
//});
|
||||
span.GestureRecognizers.Add(new TapGestureRecognizer
|
||||
{
|
||||
Command = new Command(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
NavigateToLinkCommand?.Execute(link.Value);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
#region Rendering blocks
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@
|
|||
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
|
||||
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" UWP="400" Android="50" />
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" WinPhone="400" Android="50" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.HeightRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" UWP="10" Android="50" />
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" WinPhone="10" Android="50" />
|
||||
</ActivityIndicator.HeightRequest>
|
||||
</ActivityIndicator>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
|
||||
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" UWP="400" Android="50" />
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" WinPhone="400" Android="50" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.HeightRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" UWP="10" Android="50" />
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="50" WinPhone="10" Android="50" />
|
||||
</ActivityIndicator.HeightRequest>
|
||||
</ActivityIndicator>
|
||||
</Grid>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue