From 07c7f2c88b99c80db2f1738105f658e31781a633 Mon Sep 17 00:00:00 2001 From: Yan Maniez Date: Sat, 13 Apr 2019 02:36:04 +0200 Subject: [PATCH] Test --- .../Views/PlayerCharacterEditorPage.xaml | 27 ++++++++++--------- .../AideDeJeu/Views/StringPickerView.xaml.cs | 22 ++++++++------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/AideDeJeu/AideDeJeu/Views/PlayerCharacterEditorPage.xaml b/AideDeJeu/AideDeJeu/Views/PlayerCharacterEditorPage.xaml index e50e75a4..dbeb96e0 100644 --- a/AideDeJeu/AideDeJeu/Views/PlayerCharacterEditorPage.xaml +++ b/AideDeJeu/AideDeJeu/Views/PlayerCharacterEditorPage.xaml @@ -19,18 +19,6 @@ - - - - - - - - - - - - @@ -59,6 +47,9 @@ + + + @@ -121,6 +112,18 @@ + + + + + + + + + + + + diff --git a/AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs b/AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs index bfeb2ec9..c820b93c 100644 --- a/AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs +++ b/AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs @@ -86,15 +86,19 @@ namespace AideDeJeu.Views } private async Task ExecuteStringPickerCommandAsync(System.Collections.IEnumerable strings) { - var picker = new Views.StringPicker(); - var vm = picker.ViewModel; - vm.Title = Title; - vm.Description = Description; - vm.Items = strings; - await Main.Navigator.Navigation.PushModalAsync(picker, true); - var result = await vm.PickValueAsync(); - await Main.Navigator.Navigation.PopModalAsync(true); - return result; + if (strings != null) + { + var picker = new Views.StringPicker(); + var vm = picker.ViewModel; + vm.Title = Title; + vm.Description = Description; + vm.Items = strings; + await Main.Navigator.Navigation.PushModalAsync(picker, true); + var result = await vm.PickValueAsync(); + await Main.Navigator.Navigation.PopModalAsync(true); + return result; + } + return SelectedItem; } } } \ No newline at end of file