Exemplo n.º 1
0
 internal ShapeIdentifiedEventArgs(_DMapEvents_ShapeIdentifiedEvent args)
 {
     _args = args;
     if (args == null)
     {
         throw new NullReferenceException("Internal reference is null.");
     }
 }
Exemplo n.º 2
0
        void axMap1_ShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
        {
            var sf = axMap1.get_Shapefile(e.layerHandle);

            if (sf != null)
            {
                using (var form = new AttributesForm(sf, e.shapeIndex, e.layerHandle))
                {
                    form.ShowDialog(MainForm.Instance);
                }
            }
        }
Exemplo n.º 3
0
        private void MapControl_ShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
        {
            Shapefile sf = mapControl.get_Shapefile(e.layerHandle);

            if (sf != null)
            {
                int idFeature = e.shapeIndex;
                // Unselected
                if (listData.SelectedIndices.Count > 0)
                {
                    for (int i = 0; i < listData.SelectedIndices.Count; i++)
                    {
                        listData.Items[listData.SelectedIndices[i]].Selected = false;
                    }
                }
                if (listData.Items.Count > 0)
                {
                    listData.Items[idFeature].Selected = true;
                }
            }
        }
Exemplo n.º 4
0
 private void MapShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
 {
     Invoke(sender, ShapeIdentified, new ShapeIdentifiedEventArgs(e));
 }
Exemplo n.º 5
0
 private void axMap1_ShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
 {
     axMap1.ZoomToShape(e.layerHandle, e.shapeIndex);
 }