Exemple #1
0
        private async void Start_GetLocation()
        {
            ApplicationBar.IsMenuEnabled = false;
            pivotControl.Margin          = new Thickness(-15, 17, 0, 0);

            if (!isUpdating)
            {
                spinnerSP.Visibility = Visibility.Visible;
                SpinningAnimation.Begin();
            }

            position = await App.GetLocation(Dispatcher, isUpdating);

            if (position != null)
            {
                SystemTray.ProgressIndicator.IsVisible = false;

                SpinningAnimation.Stop();
                spinnerSP.Visibility = Visibility.Collapsed;

                SearchRange();
            }
            else
            {
                Dispatcher.BeginInvoke(() => { lastRB = null; });

                RB_Enabler(true, false);
            }

            ApplicationBar.IsMenuEnabled = true;
            pivotControl.Margin          = new Thickness(-15, 0, 0, 0);
        }
Exemple #2
0
        private void FinalizaDisplay()
        {
            if (listaRotas.ItemsSource != null)
            {
                SystemTray.ProgressIndicator.IsVisible = false;
                SpinningAnimation.Stop();
                spinnerSP.Visibility = Visibility.Collapsed;

                spTitle.Margin = new Thickness(0, 17, 0, 15);

                myMap.SetView(position.Coordinate.ToGeoCoordinate(), 17);

                name.Text     = nome;
                distance.Text = string.Format("{0:0.00} km", (double)route.LengthInMeters / 1000);

                ToVisible(true, Header, listaRotas, btCenter);

                ApplicationBar.IsVisible = true;
            }

            PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;
        }