|
using System;
using System.Windows;
using Microsoft.Phone.Controls;
namespace BingMapsDemoV1
{
public partial class PushpinProperties : PhoneApplicationPage
{
public PushpinProperties()
{
InitializeComponent();
}
private void addPin_Click(object sender, RoutedEventArgs e)
{
double longitude;
double latitude;
try
{
longitude = double.Parse(longitudeTB.Text.ToString());
latitude = double.Parse(LatitudeTB.Text.ToString());
SharedInformation.pinLong = longitude;
SharedInformation.pinLat = latitude;
SharedInformation.pinContent = textBox1.Text;
MessageBox.Show("Your Pushpin was successfully set!");
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
}
catch (Exception exc)
{
MessageBox.Show("Please enter a valid location!" + exc.Message);
}
}
private void button2_Click(object sender, RoutedEventArgs e)
{
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.