private void existingBTN_Click(object sender, EventArgs e) { CoordinatePoint nw = null; CoordinatePoint se = null; double alt = 0; if (FindGpsBounds(ref nw, ref se, ref alt)) { double minLat = se.Latitude.Value; double maxLat = nw.Latitude.Value; double minLong = nw.Longitude.Value; double maxLong = se.Longitude.Value; List <string> paths = CheckForExistingLakeImagery(ref minLat, ref maxLat, ref minLong, ref maxLong); if (paths.Count > 0) { ExistingImageSelect eis = new ExistingImageSelect(paths); eis.ShowDialog(); if (eis.SelectedPath != "") { FileInfo fi = new FileInfo(eis.SelectedPath); string name = fi.Name; DecodeImageFileName(name, out minLat, out maxLat, out minLong, out maxLong); Lake l = _race.Lake; l.South = minLat; l.North = maxLat; l.West = minLong; l.East = maxLong; l.Save(); lakeResizer.Lake = l; } } else { MessageBox.Show("No Suitable Cached Images Found"); } } else { MessageBox.Show("Could not determine a region for the gps data, make sure at least one boat had gps data."); } }
private void existingBTN_Click(object sender, EventArgs e) { CoordinatePoint nw=null; CoordinatePoint se=null; double alt=0; if (FindGpsBounds(ref nw, ref se, ref alt)) { double minLat = se.Latitude.Value; double maxLat = nw.Latitude.Value; double minLong = nw.Longitude.Value; double maxLong = se.Longitude.Value; List<string> paths = CheckForExistingLakeImagery(ref minLat, ref maxLat, ref minLong, ref maxLong); if (paths.Count > 0) { ExistingImageSelect eis = new ExistingImageSelect(paths); eis.ShowDialog(); if (eis.SelectedPath != "") { FileInfo fi = new FileInfo(eis.SelectedPath); string name = fi.Name; DecodeImageFileName(name, out minLat, out maxLat, out minLong, out maxLong); Lake l = _race.Lake; l.South = minLat; l.North = maxLat; l.West = minLong; l.East = maxLong; l.Save(); lakeResizer.Lake = l; } } else { MessageBox.Show("No Suitable Cached Images Found"); } } else { MessageBox.Show("Could not determine a region for the gps data, make sure at least one boat had gps data."); } }