예제 #1
0
 private void OnCoordinatesFound(PortSearcher searcher, PointLatLng coordinate)
 {
     searchMarker        = new GMarkerGoogle(coordinate, Properties.Resources.green);
     searchMarker.Offset = new System.Drawing.Point(-12, -12);
     markersOverlay.Markers.Add(searchMarker);
     gmap.Position = coordinate;
     searchResultsTypeLabel.Text = "Nearest Ports:";
 }
예제 #2
0
 private void ReloadEverything()
 {
     if (data != null)
     {
         portSearcher = new PortSearcher(data.Ports);
         portSearcher.CoordinateFound += OnCoordinatesFound;
         LoadMarkers();
         searchText = "";
         portsListBox.Items.Clear();
         portsListBox.Items.AddRange(ShownPorts.OrderBy(x => x.Name).ToArray());
         //Console.WriteLine(data.Surveyors);
         surveyorsListBox.Items.Clear();
         UpdateSurveyorInfoTextBoxes();
     }
     else
     {
         MessageBox.Show("Invalid Data Detected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }