Beispiel #1
0
 private void lnkGoogleAPI_Elevation_Check_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         Position position = new Position(45.815363432981M, 9.08027529716492M);
         decimal elevation = position.QueryElevation(this.tbxGoogleAPI_Elevation.Text.Trim());
         if (elevation < 50M || elevation > 500M)
         {
             throw new Exception(i18n.Retrieved_elevation_wrong);
         }
     }
     catch (Exception x)
     {
         MessageBox.Show(x.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     MessageBox.Show(i18n.This_Google_Elevation_API_Key_good, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
 }