1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00

Début GTK

This commit is contained in:
Yan Maniez 2018-10-05 23:59:09 +02:00
parent 1cfebe0a85
commit 4a64224417

View file

@ -105,19 +105,22 @@
var blockLinks = links.Distinct().OrderBy(l => l.Key).ToList();
if (blockLinks.Count > 1)
{
//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) { }
// }),
//});
if (Device.RuntimePlatform == Device.GTK)
{
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
{