private void NextButtonClicked(object sender, EventArgs e) { var filter = (TherapistFilter)BindingContext; var therapists = App.Instance.AppState.TherapistCollection.AllTherapists.Where(t => filter.Allows(t)); var filteredTherapistPage = new FilteredTherapistPage(filter, therapists); App.Instance.PushPage(filteredTherapistPage); }
private async void SearchButtonClicked(object sender, EventArgs e) { var filter = (TherapistFilter)BindingContext; var therapistCollection = App.Instance.AppState.TherapistCollection; var languageFile = App.Instance.AppState.LanguageFile; if (filter.UserLocation == null || filter.UserLocation == GPSLocation.Zero) { var accepted = await DisplayAlert(languageFile.GetString("nolocationtitle"), languageFile.GetString("nolocationmessage"), languageFile.GetString("nolocationaccept"), languageFile.GetString("nolocationcancel")); if (!accepted) { return; } } var filteredTherapists = therapistCollection.AllTherapists.Where(t => filter.Allows(t)); var filteredTherapistPage = new FilteredTherapistPage(filter, filteredTherapists); App.Instance.PushPage(filteredTherapistPage); }