Beispiel #1
0
 public static void OpenGeoLocations(FactLocation location, IProgress <string> outputText)
 {
     try
     {
         GeocodeLocations geoLocations = null;
         foreach (Form f in Application.OpenForms)
         {
             if (f is GeocodeLocations)
             {
                 f.BringToFront();
                 f.Focus();
                 geoLocations = (GeocodeLocations)f;
                 break;
             }
         }
         if (geoLocations == null)
         {
             geoLocations = new GeocodeLocations(outputText);
             geoLocations.Show();
         }
         // we now have opened form
         geoLocations.SelectLocation(location);
     }
     catch (Exception) { }
 }
Beispiel #2
0
 public void StartGeocoding()
 {
     if (!ft.Geocoding) // don't geocode if another geocode session in progress
     {
         GeocodeLocations geo = new GeocodeLocations();
         MainForm.DisposeDuplicateForms(geo);
         geo.Show();
         geo.StartGoogleGeoCoding(false);
         geo.BringToFront();
         geo.Focus();
     }
 }
Beispiel #3
0
 public void StartGeocoding(IProgress <string> outputText)
 {
     try
     {
         if (!ft.Geocoding) // don't geocode if another geocode session in progress
         {
             GeocodeLocations geo = new GeocodeLocations(outputText);
             MainForm.DisposeDuplicateForms(geo);
             geo.Show();
             geo.StartGoogleGeoCoding(false);
             geo.BringToFront();
             geo.Focus();
         }
     }
     catch (Exception e)
     {
         UIHelpers.ShowMessage($"A problem occurred starting geocoding the error was:\n{e.Message}");
     }
 }