Пример #1
0
        async public void OnSearch(object sender, EventArgs e)
        {
            IsIndicator.IsEnabled = true;
            IsIndicator.IsVisible = true;
            IsIndicator.IsRunning = true;

            var result = await ViewModel.OnButtonSearched(customMap, SearchFor.Text);


            if (result == "Not found")
            {
                SearchFor.Focus();

                await DisplayAlert(TextResources.SearchNotFound_Title,
                                   TextResources.SearchNotFound_Message,
                                   TextResources.TryAgain);
            }

            else if (result == "No space nearby")
            {
                SearchFor.Focus();

                await DisplayAlert(TextResources.SearchSpaceNearby_Title,
                                   TextResources.SearchSpaceNearby_Message,
                                   TextResources.TryAgain);
            }

            IsIndicator.IsEnabled = false;
            IsIndicator.IsVisible = false;
            IsIndicator.IsRunning = false;
        }
Пример #2
0
        async public void OnSearch(object sender, EventArgs e)
        {
            var result = await ViewModel.OnButtonSearched(customMap, SearchFor.Text);


            if (result == "Not found")
            {
                SearchFor.Focus();

                await DisplayAlert(TextResources.SearchNotFound_Title,
                                   TextResources.SearchNotFound_Message,
                                   TextResources.TryAgain);
            }

            else if (result == "No space nearby")
            {
                SearchFor.Focus();

                await DisplayAlert(TextResources.SearchSpaceNearby_Title,
                                   TextResources.SearchSpaceNearby_Message,
                                   TextResources.TryAgain);
            }
        }