private void Button_gridbut_Click(object sender, RoutedEventArgs e) { if (sender == LaunchButton) { try { ExploremapsShowPlaceTask showPlace = new ExploremapsShowPlaceTask(); showPlace.Location = new GeoCoordinate(Double.Parse(LatitudeBox.Text),Double.Parse(LongittudeBox.Text)); showPlace.Zoom = (Double)zoomSlider.Value; showPlace.Title = StringBox.Text; showPlace.Show(); } catch (Exception erno) { MessageBox.Show("Error message: " + erno.Message); } } else if (sender == getGeoButton) { NavigationService.Navigate(new Uri("/LocationSelectorPage.xaml?target=Location", UriKind.Relative)); } }
private void btnExploremapsShowPlaceTask_Click(object sender, RoutedEventArgs e) { try { ExploremapsShowPlaceTask showPlace = new ExploremapsShowPlaceTask(); showPlace.Location = new GeoCoordinate(LatitudSevilla, LongitudSevilla); showPlace.Zoom = zoom; showPlace.Title = "Sevilla"; showPlace.Show(); } catch (Exception ex) { MessageBox.Show("Error message: " + ex.Message); } }