Beispiel #1
0
 void FindClosestStation()
 {
     InvokeOnMainThread(() => {
         TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext();
         notificationView.Show(true);
         StationGeolocationUtil.CurrentClosestStation(stations, this, scheduler, new Geolocator());
     });
 }
Beispiel #2
0
 private void FindClosestStation()
 {
     if (stations != null)
     {
         Activity.RunOnUiThread(() => {
             TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext();
             progressDialog          = new ProgressDialog(Activity);
             progressDialog.SetMessage("Buscando estación cercana...");
             progressDialog.Show();
             closestStationButton.Enabled = false;
             progressDialog.SetCanceledOnTouchOutside(false);
             progressDialog.SetCancelable(false);
             StationGeolocationUtil.CurrentClosestStation(stations, this, scheduler, new Geolocator(Activity));
         });
     }
 }