private void SeleccionarPunto(int x, int y)
        {
            double px = 0, py = 0;

            MapWin.View.PixelToProj(x, y, ref px, ref py);

            direccion           = new Direccion();
            direccion.Ubicacion = new PointD(px, py);

            PostgresDataAccess.DataAccess da = new PostgresDataAccess.DataAccess();
            direccion.Geoz = da.ObtenerGeoz(direccion.Ubicacion.Value.ToString());
            // dibujar
            if (PlugData.DrDireccion.HasValue)
            {
                MapWin.View.Draw.ClearDrawing(PlugData.DrDireccion.Value);
            }
            PlugData.DrDireccion = MapWin.View.Draw.NewDrawing(MapWinGIS.tkDrawReferenceList.dlSpatiallyReferencedList);
            MapWin.View.Draw.DrawCircle(px, py, 20, Color.Red, true);
            // deshabilitar
            Botones[4].Pressed     = false;
            MapWin.View.MapCursor  = _prevCursor;
            MapWin.View.CursorMode = _prevMode;
            // generar expediente
            PlugData.Direccion = direccion;
            Forms.Expediente2 expediente2 = new Forms.Expediente2();
            expediente2.ShowDialog();
        }
예제 #2
0
        private void btnMostrar_Click(object sender, EventArgs e)
        {
            if (comboBox2.SelectedIndex != -1)
            {
                PlugData.ZoomToPoint(Pis[comboBox2.SelectedIndex].Ubicacion);
                PlugData.MapWin.View.Draw.ClearDrawing(PlugData.DrPuntoInteres);
                PlugData.DrPuntoInteres = PlugData.MapWin.View.Draw.NewDrawing(MapWinGIS.tkDrawReferenceList.dlSpatiallyReferencedList);
                PlugData.MapWin.View.Draw.DrawCircle(Pis[comboBox2.SelectedIndex].Ubicacion.X, Pis[comboBox2.SelectedIndex].Ubicacion.Y, 10, Color.Green, true);

                Forms.Expediente2 exp2 = new Expediente2(Pis[comboBox2.SelectedIndex].Ubicacion.ToString());
                exp2.ShowDialog();
            }
        }