private void CmdMoveMap_Execute(object obj)
        {
            var pos = ResolveLocation.Resolve(false);

            if (pos != null)
            {
                BmpPlanner.SetView(new Location(pos[0], pos[1]), 10);
            }
        }
        internal static double[] Resolve(bool gpsDataNotFound)
        {
            var wdw = new ResolveLocation();

            if (!gpsDataNotFound)
            {
                wdw.LblTitle.Content = "Look for a location to zoom in".ToUpper();
                wdw.LblText.Content  = "Type the name of a city or state";
            }

            wdw.ShowDialog();

            var result = wdw.ResolvedLocation;

            wdw.Close();

            return(result);
        }
        private void CmdAnalizeNow_Execute(object obj)
        {
            var filePath = DialogTools.ShowFolderPickerDialog("Select the images folder");

            if (!string.IsNullOrEmpty(filePath))
            {
                var wdw = new AnalyzeImages()
                {
                    FilePath = filePath,
                    Owner    = this
                };
                wdw.ShowDialog();

                var missingLocations = wdw.DetectedFires.Where((f) => f.Longitude == 0 && f.Latitude == 0);
                if (missingLocations.Any())
                {
                    var imageLocation = ResolveLocation.Resolve(true);
                    if (imageLocation != null)
                    {
                        foreach (var l in missingLocations)
                        {
                            l.Latitude  = imageLocation[0];
                            l.Longitude = imageLocation[1];
                        }
                    }
                }

                var flight = new Flight(wdw.DetectedFires, wdw.CoveredArea, filePath, new MapModel(BmpPlanner));
                Flights.Add(flight);
                NotifyPropertyChanged("Flights");

                AreasOfInterest.AddToAnalizedArea(flight);
                AreasOfInterest.NotifyAllPropertyChanged("AnalizedAreaPercentage");
                NotifyPropertyChanged("AreasOfInterest");

                wdw.Close();
                RenderMap();
            }
        }