private void OptionSelected(SingleSearchResultsPivotPageContext.SearchOption searchOption) { //Report statistics: string optionString = searchOption.ToString(); string optionName = optionString.Substring(optionString.LastIndexOf(".") + 1); WebStats.ReportWebStatEventDetailsAsync("SearchOption", optionName); // Call the callback to start the operation PageContext.OnSearchOptionSelected(selectedResult.ReferenceIndex, searchOption, InputTextBox.Text); // And close the dialog (need to pop the search input page as well) NavigationService.RemoveBackEntry(); NavigationService.GoBack(); }
private void OptionSelected(AlternativeRoutesPageViewModel.OptionSelectedEventArgs.Options selectedOption) { //Report statistics: string optionString = selectedOption.ToString(); string optionName = optionString.Substring(optionString.LastIndexOf(".") + 1); WebStats.ReportWebStatEventDetailsAsync("AlternativeRoutes", optionName); ViewModel.NotifyOptionSelected(selectedOption, (currentItem == null) ? 0 : currentItem.ContextPointer); if (selectedOption != AlternativeRoutesPageViewModel.OptionSelectedEventArgs.Options.Cancel) { NavigateBackHome(); } }
private void DoCallBack(string callbackName) { WebStats.ReportWebStatEventDetailsAsync("Report", callbackName); foreach (WazeMenuItem menuItem in miniMenuItems) { if (menuItem.text == callbackName || menuItem.text == LanguageResources.Instance.Translate(callbackName)) { menuItem.CallCallback(); return; } } throw new NotSupportedException(string.Format("Could not find callback {0}. Total callbacks found: {1}", callbackName, miniMenuItems.Count)); }
public void SearchCompleted(SingleSearchResultsPivotPageContext.SearchOptionSelectedDelegate onSearchOptionSelected, string localSearchProviderLabel, IEnumerable <SingleSearchResultsPivotPageContext.SearchResult> addressResults, IEnumerable <SingleSearchResultsPivotPageContext.SearchResult> localSearchResults) { var searchResultsPageContext = new SingleSearchResultsPivotPageContext { OnSearchOptionSelected = onSearchOptionSelected, LocalSearchProviderLabel = localSearchProviderLabel, AddressResults = new ObservableCollection <SingleSearchResultsPivotPageContext.SearchResult>(addressResults), LocalSearchResults = new ObservableCollection <SingleSearchResultsPivotPageContext.SearchResult>(localSearchResults), }; //Report search results stats WebStats.ReportWebStatEventDetailsAsync("Search Complete", "Address count: " + addressResults.Count() + " Local count: " + localSearchResults.Count()); NavigationService.Navigate <SingleSearchResultsPivotPage>(searchResultsPageContext); }