public void RefreshList() { ListOfPlaces.Clear(); ReadFile readFile = new ReadFile(); readFile.LoadData(ListOfPlaces); }
public virtual async Task <ListOfPlaces> GetPlaceByIpAddress( string ipAddress, string country = "UK", string currency = "GBP", string locale = "en-GB") { ListOfPlaces result = await HttpHelper.Get <ListOfPlaces>($"{_apiEndpoint}autosuggest/v1.0/{country}/{currency}/{locale}?id={ipAddress}-ip&apiKey={_apiKey}"); return(result); }
public ListOfPlacesViewModels MapListOfPlacesToListOfPlacesViewModel(ListOfPlaces listOfPlaces) { return(new ListOfPlacesViewModels() { Places = listOfPlaces.Places.Select(x => new PlaceViewModel() { PlaceId = x.PlaceId, PlaceName = x.PlaceName }).ToList() }); }
public async Task <ListOfPlacesViewModels> GetPlaceByIpAddress( string ipAddress, string country = "UK", string currency = "GBP", string locale = "en-GB") { ListOfPlaces listOfPlaces = await _skyscannerProvider.GetPlaceByIpAddress(ipAddress, country, currency, locale); ListOfPlacesViewModels listOfPlaceViewModels = _skyscannerMapper.MapListOfPlacesToListOfPlacesViewModel(listOfPlaces); return(listOfPlaceViewModels); }
public async Task <ListOfPlacesViewModels> GetPlaceByIpAddress( string ipAddress, string country = "UK", string currency = "GBP", string locale = "en-GB") { ListOfPlaces listOfPlaces = await FileHelper.GetDataAsync <ListOfPlaces>(FileName.PARENT_FOLDER, FileName.PLACE_IP_80_73_11_139); ListOfPlacesViewModels listOfPlaceViewModels = _skyscannerMapper.MapListOfPlacesToListOfPlacesViewModel(listOfPlaces); return(listOfPlaceViewModels); }
public ActionResult CreateList([FromBody] ListOfPlaces listOfPlaces) { using (var db = new Database()) { var user = db.Users.Where(u => u.Id == listOfPlaces.UserId).FirstOrDefault(); if (user == null) { return(BadRequest("bad user id")); } ListOfPlaces list = new ListOfPlaces() { User = user, ListTitle = listOfPlaces.ListTitle }; db.Lists.Add(list); db.SaveChanges(); return(Ok(list.Id)); } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { Forms.Init(); UIWindow window = new UIWindow(UIScreen.MainScreen.Bounds); Algorithm algorithm = new Algorithm(); GeoPoint originGeo = new GeoPoint(45.523538, -122.623040); GeoPoint endpointGeo = new GeoPoint(45.504796, -122.638593); Task <List <Place> > places = algorithm.Run(originGeo, endpointGeo); ListOfPlaces listOfPlaces = new ListOfPlaces(places.Result); window.RootViewController = listOfPlaces.CreateViewController(); window.MakeKeyAndVisible(); return(true); }
private void ShowMyPlacesButton_Click(object sender, EventArgs e) { ListOfPlaces.Items.Clear(); new Thread(() => { int numberOfPlaces = r_FBLogic.m_LoggedInUser.Checkins.Count; if (numberOfPlaces > 0) { foreach (Checkin checkin in r_FBLogic.m_LoggedInUser.Checkins) { ListOfPlaces.Invoke(new Action(() => ListOfPlaces.Items.Add(checkin.Place.Name))); checkin.ReFetch(DynamicWrapper.eLoadOptions.Full); } } else { ListOfPlaces.Invoke(new Action(() => ListOfPlaces.Items.Add("You havn't checked in yet"))); } }).Start(); }
public void ImportData() { ListOfPlaces.Clear(); ListOfPlaces = ReadFile.ImportData(); }