public async Task <IEnumerable <WifiHotspot> > GetWifiHotspots(string postalCodeFilter)
        {
            await Task.Delay(1000).ConfigureAwait(false);

            var list    = new List <WifiHotspot> ();
            var address = new Address {
                City          = "Paris",
                PostalCode    = "75011",
                Street        = "Rue de la fontaine au roi",
                WifiHotspotId = 12
            };
            var coordinates = new Coordinates {
                WifiHotspotId = 12,
                Latitude      = 12,
                Longitude     = 12
            };

            for (int i = 1; i <= 10; i++)
            {
                var wifiHotspot = new WifiHotspot {
                    Address     = address,
                    Coordinates = coordinates,
                    Name        = $"Borne {i}",
                    SiteId      = $"Site {i}"
                };
                list.Add(wifiHotspot);
            }
            return(list);
        }
Exemple #2
0
 private void InitModel()
 {
     _wifiHotspot = new WifiHotspot
     {
         Address     = new Address(),
         Coordinates = new Coordinates()
     };
 }
Exemple #3
0
 public void UpdateData(WifiHotspot model)
 {
     NameLabel.Text       = model.Name;
     AddressLabel.Text    = model.Address.Street;
     PostalCodeLabel.Text = model.Address.PostalCode;
     DistanceLabel.Text   = "";
     Model = model;
 }
 public void Start(WifiHotspot wifiHotspot = null)
 {
     if (wifiHotspot != null)
     {
         _hotspots = new List <WifiHotspot> {
             wifiHotspot
         };
     }
     else
     {
         _hotspots = UnitOfWork.GetAllWifiHotspots();
     }
 }
Exemple #5
0
        private void SetupAnnotation(WifiHotspot wifiHotspot)
        {
            var coords     = new CLLocationCoordinate2D(wifiHotspot.Coordinates.Latitude, wifiHotspot.Coordinates.Longitude);
            var annotation = new WifiHotspotMapAnnotation(coords,
                                                          wifiHotspot.Name,
                                                          wifiHotspot.Address.Street);

            if (!MapView.Annotations.Any())
            {
                SetupMap(coords);
            }
            MapView.AddAnnotation(annotation);
        }
Exemple #6
0
 public async Task AddWifiHotspot(WifiHotspot wifiHotspot)
 {
     try{
         if (ApiClient.IsLocal)
         {
             var record   = WifiHotspotMapper.MapBack(wifiHotspot);
             var response = await ApiClient.PostAsync <object, Record>("", record);
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine($"error : {e.Message}");
     }
 }
 public Task AddWifiHotspot(WifiHotspot wifiHotspot)
 {
     throw new NotImplementedException();
 }
 public WifiHotspotItemViewModel(WifiHotspot wifiHotspot)
 {
     WifiHotspot = wifiHotspot;
 }
Exemple #9
0
 public HotspotsMapPage(WifiHotspot wifiHotspot = null)
 {
     InitializeComponent();
     BindingContext = ViewModel;
     WifiHotspot    = wifiHotspot;
 }
Exemple #10
0
 public void ShowMapFor(WifiHotspot wifiHotspot)
 {
     Navigation.PushAsync(new HotspotsMapPage(wifiHotspot));
 }