public void SearchByStop(string stopNumber, SearchByStop_Callback callback) { operationTracker.WaitForOperation("SearchByStop", string.Format("Searching for stop {0}...", stopNumber)); busServiceModel.SearchForStops_Completed += new SearchByStopCompleted(callback, busServiceModel, this).SearchByStop_Completed; locationTracker.RunWhenLocationKnown(delegate(GeoCoordinate location) { busServiceModel.SearchForStops(location, stopNumber); }); }
public SearchByStopCompleted(SearchByStop_Callback callback, IBusServiceModel busServiceModel, MainPageVM viewModel) { this.callback = callback; this.busServiceModel = busServiceModel; this.viewModel = viewModel; }