private void btnDestination_Click(object sender, RoutedEventArgs e)
{
var saveFileDialog = new Microsoft.Win32.SaveFileDialog();
saveFileDialog.FileName = "Select File to Convert";
Nullable<bool> result = saveFileDialog.ShowDialog();
if (result == true)
{
entDestination.Text = saveFileDialog.FileName.ToLower();
if (!(entDestination.Text.EndsWith(".shp") ||
entDestination.Text.EndsWith(".kml")))
{
entDestination.Text = "Extension Must be SHP or KML";
btnConvert.IsEnabled = false;
}
else
{
if (entSource.Text.EndsWith(".shp") ||
entSource.Text.EndsWith(".kml"))
{
btnConvert.IsEnabled = true;
}
}
}
}