Пример #1
0
        private void gmap_OnMarkerClick(GMapMarker item, MouseEventArgs e)
        {
            string      lat = item.Position.Lat + "";
            string      lon = item.Position.Lng + "";
            ZonaMilitar zm  = BuscarZona(lat, lon);
            Informacion inf = new Informacion(zm);

            inf.Show();
        }
Пример #2
0
        private void addMarkers()
        {
            GMapOverlay markers = new GMapOverlay("markers");
            ArrayList   datos   = p.Datos;

            for (int i = 0; i < datos.Count; i++)
            {
                ZonaMilitar z   = (ZonaMilitar)datos[i];
                string[]    loc = z.Location.Split('_');
                double      lat = double.Parse(loc[0]);
                double      lon = double.Parse(loc[1]);

                GMapMarker marker = new GMarkerGoogle(new PointLatLng(lat, lon), GMarkerGoogleType.green_pushpin);
                markers.Markers.Add(marker);
            }
            gmap.Overlays.Add(markers);
        }
Пример #3
0
        public Principal()
        {
            datos = new ArrayList();

            String line;

            try
            {
                StreamReader sr = new StreamReader("..\\..\\data.csv");
                while ((line = sr.ReadLine()) != null && !line.Equals(""))
                {
                    String[]    d  = line.Split(',');
                    int         z  = Int32.Parse(d[0]);
                    ZonaMilitar zm = new ZonaMilitar(z, d[1], d[2], d[3], d[4], d[5]);
                    datos.Add(zm);
                }

                sr.Close();
            }catch (Exception e)
            {
            }
        }
Пример #4
0
 public Informacion(ZonaMilitar zm)
 {
     z = zm;
     InitializeComponent();
 }