Exemple #1
0
 private void MapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     if (e.Status == DrawStatus.Completed && !_mapViewModel.IsBusy && !_mapView.IsNavigating)
     {
         _busyView.Hidden = true;
     }
 }
Exemple #2
0
 private void MapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // if drawing is complete, hide the activity indicator
     if (e.Status == DrawStatus.Completed)
     {
         Console.WriteLine("Map view drawing is complete.");
     }
 }
        private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
        {
            if (e.Status == DrawStatus.Completed)
            {
                // Link the action of tapping on the map with the MyMapView_GeoViewTapped method.
                _myMapView.GeoViewTapped += MyMapView_GeoViewTapped;

                // Remove this method from DrawStatusChanged events.
                _myMapView.DrawStatusChanged -= OnDrawStatusChanged;
            }
        }
Exemple #4
0
 /// <summary>
 /// 地图状态改变响应
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     Dispatcher.Invoke(delegate()
     {
         if (e.Status == DrawStatus.InProgress)
         {
         }
         else
         {
         }
     });
 }
 private void OnMapViewDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     BeginInvokeOnMainThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
             _activityIndicator.Hidden = false;
         else
             _activityIndicator.Hidden = true;
     });
 }
Exemple #6
0
        private void GeoView_OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
        {
            // TODO: Accessing the ServiceLocator here is not good practice..
            var mainViewModel = ServiceLocator.Current.GetInstance <MainViewModel>();

            mainViewModel.MapDrawStatus = e.Status;
            if (e.Status == DrawStatus.Completed)
            {
                var mapView      = sender as MapView;
                var mapViewModel = ServiceLocator.Current.GetInstance <MainDataViewModel>().SelectedMapView;
                mapViewModel.ViewScale = (double)mapView?.MapScale;
            }
        }
Exemple #7
0
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Show the activity indicator if the map is drawing.
     if (e.Status == DrawStatus.InProgress)
     {
         ActivityIndicator.Visibility = Visibility.Visible;
         StatusDisplay.Text           = "Drawing...";
     }
     else
     {
         ActivityIndicator.Visibility = Visibility.Collapsed;
         StatusDisplay.Text           = "Finished drawing.";
     }
 }
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     RunOnUiThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             _activityIndicator.SetMessage("Drawing is in progress");
             _activityIndicator.Show();
         }
         else
             _activityIndicator.Hide();
     });
 }
 private void MapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     try
     {
         // if drawing is complete, hide the activity indicator
         if (e.Status == DrawStatus.Completed)
         {
             Console.WriteLine("Map view drawing is complete.");
         }
     }
     catch (Exception ex)
     {
         ErrorHelper.OnError(MethodBase.GetCurrentMethod().DeclaringType.Name, "Error on map view draw status changed", ex);
     }
 }
 private void OnMapViewDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     BeginInvokeOnMainThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             _activityIndicator.Hidden = false;
         }
         else
         {
             _activityIndicator.Hidden = true;
         }
     });
 }
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     Device.BeginInvokeOnMainThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsRunning = true;
         }
         else
         {
             activityIndicator.IsRunning = false;
         }
     });
 }
 private async void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Update the load status information
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsActive = true;
         }
         else
         {
             activityIndicator.IsActive = false;
         }
     });
 }
Exemple #13
0
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     RunOnUiThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             _progressDialog.Show();
         }
         else
         {
             _progressDialog.Hide();
         }
     });
 }
 private async void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Update the load status information
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsActive = true;
         }
         else
         {
             activityIndicator.IsActive = false;
         }
     });
 }
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Update the load status information
     Dispatcher.Invoke(delegate ()
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsEnabled = true;
             activityIndicator.Visibility = System.Windows.Visibility.Visible;
         }
         else
         {
             activityIndicator.IsEnabled = false;
             activityIndicator.Visibility = System.Windows.Visibility.Collapsed;
         }
     });
 }
Exemple #16
0
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     RunOnUiThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             _progressBar.Visibility = Android.Views.ViewStates.Visible;
             _statusLabel.Text       = "Drawing status: In progress";
         }
         else
         {
             _progressBar.Visibility = Android.Views.ViewStates.Invisible;
             _statusLabel.Text       = "Drawing status: Complete";
         }
     });
 }
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Update the load status information
     Dispatcher.Invoke(delegate()
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsEnabled  = true;
             activityIndicator.Visibility = System.Windows.Visibility.Visible;
         }
         else
         {
             activityIndicator.IsEnabled  = false;
             activityIndicator.Visibility = System.Windows.Visibility.Collapsed;
         }
     });
 }
Exemple #18
0
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     // Make sure that the UI changes are done in the UI thread
     Device.BeginInvokeOnMainThread(() =>
     {
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             activityIndicator.IsVisible = true;
             activityIndicator.IsRunning = true;
         }
         else
         {
             activityIndicator.IsRunning = false;
             activityIndicator.IsVisible = false;
         }
     });
 }
Exemple #19
0
 private async void MainMapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     if (e.Status == DrawStatus.Completed)
     {
         _drawTimer.Stop();
         DrawStatusLabel.Text = "Draw Complete";
         UpdateDrawTime();
         _drawTimer.Reset();
     }
     else
     {
         _drawTimer.Start();
         DrawStatusLabel.Text = "Drawing...";
         while (MainMapView.DrawStatus == DrawStatus.InProgress)
         {
             UpdateDrawTime();
             await Task.Delay(1);
         }
     }
 }
 private void MapViewMain_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     if (this.ActivityIndicator != null)
     {
         //// Update the load status information - only necessary if not on UI thread
         //Dispatcher.Invoke(delegate ()
         //{
         // Show the activity indicator if the map is drawing
         if (e.Status == DrawStatus.InProgress)
         {
             this.ActivityIndicator.IsEnabled  = true;
             this.ActivityIndicator.Visibility = System.Windows.Visibility.Visible;
         }
         else
         {
             this.ActivityIndicator.IsEnabled  = false;
             this.ActivityIndicator.Visibility = System.Windows.Visibility.Collapsed;
         }
         //});
     }
 }
 private void MapViewDrawStatusChanged(object sender, DrawStatusChangedEventArgs evt)
 {
     CanExecuteChanged?.Invoke(this, EventArgs.Empty);
 }
Exemple #22
0
 private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
 }
Exemple #23
0
 private void MyMapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
 {
     UpdateStatus(e.Status == DrawStatus.Completed);
 }