Exemplo n.º 1
0
        private void Mapa1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
        {
            if (accion == "mover")
            {
                Mapa1.MousePointer = esriControlsMousePointer.esriPointerPan;
                Mapa1.Pan();
            }
            if (accion == "ampliar")
            {
                Mapa1.MousePointer = esriControlsMousePointer.esriPointerZoomIn;
                Mapa1.Extent       = Mapa1.TrackRectangle();
            }
            if (accion == "reducir")
            {
                Mapa1.MousePointer = esriControlsMousePointer.esriPointerPageZoomOut;
                switch (accion)
                {
                case "reducir":
                    IEnvelope zoomout;
                    zoomout = Mapa1.Extent;
                    zoomout.Expand(1.5, 1.5, true);
                    Mapa1.Extent = zoomout;
                    Mapa1.Refresh();
                    break;
                }
            }

            if (accion == "identificacion")
            {
                Mapa1.MousePointer = esriControlsMousePointer.esriPointerIdentify;
            }
        }
Exemplo n.º 2
0
        private void button10_Click(object sender, EventArgs e)
        {
            if (this.chkCliente.Checked == true)
            {
                IMap map = Mapa1.Map;
                IFeatureSelection featSel;
                IFeatureLayer     fLayer;
                fLayer  = Mapa1.get_Layer(1) as IFeatureLayer;
                featSel = fLayer as IFeatureSelection;
                IQueryFilter qFilt = new QueryFilter();
                //qFilt.WhereClause = "idpersona LIKE '%" + crops  + "%'";
                qFilt.WhereClause = "OBJECTID =" + Convert.ToInt32(txtBuscar.Value);
                //qFilt.WhereClause = "idpersona LIKE % "+ crops + "%";
                //qFilt.WhereClause = "idpersona = " + crops ;
                //qFilt.WhereClause = "NOMBRE like '%" + crops + "%'";
                featSel.Clear();


                featSel.SelectFeatures(qFilt, esriSelectionResultEnum.esriSelectionResultNew, false);
                MessageBox.Show(featSel.SelectionSet.Count.ToString() + " Usuario Marcado");
                IRgbColor grn = new RgbColor();
                grn.Red   = 255;
                grn.Green = 0;
                grn.Blue  = 0;
                featSel.SelectionColor = grn;
                Mapa1.Refresh();
            }
            else
            {
                IMap map = Mapa1.Map;
                IFeatureSelection featSel;
                IFeatureLayer     fLayer;
                fLayer  = Mapa1.get_Layer(0) as IFeatureLayer;
                featSel = fLayer as IFeatureSelection;
                IQueryFilter qFilt = new QueryFilter();
                //qFilt.WhereClause = "idpersona LIKE '%" + crops  + "%'";
                qFilt.WhereClause = "OBJECTID =" + Convert.ToInt32(txtBuscar.Value);
                //qFilt.WhereClause = "idpersona LIKE % "+ crops + "%";
                //qFilt.WhereClause = "idpersona = " + crops ;
                //qFilt.WhereClause = "NOMBRE like '%" + crops + "%'";
                featSel.Clear();


                featSel.SelectFeatures(qFilt, esriSelectionResultEnum.esriSelectionResultNew, false);
                MessageBox.Show(featSel.SelectionSet.Count.ToString() + " Usuario Marcado");
                IRgbColor grn = new RgbColor();
                grn.Red   = 255;
                grn.Green = 0;
                grn.Blue  = 0;
                featSel.SelectionColor = grn;
                Mapa1.Refresh();
            }
        }
Exemplo n.º 3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (c < 72)
     {
         Mapa1.Rotation = Mapa1.Rotation - 5;
         Mapa1.Refresh();
         c++;
     }
     else
     {
         c = 0;
         this.timer1.Stop();
     }
 }
Exemplo n.º 4
0
 private void button4_Click(object sender, EventArgs e)
 {
     Mapa1.Rotation = Mapa1.Rotation - 20;
     Mapa1.Refresh();
 }