Beispiel #1
0
 internal ShapeIdentifiedEventArgs(_DMapEvents_ShapeIdentifiedEvent args)
 {
     _args = args;
     if (args == null)
     {
         throw new NullReferenceException("Internal reference is null.");
     }
 }
Beispiel #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);
                }
            }
        }
Beispiel #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;
                }
            }
        }
Beispiel #4
0
 private void MapShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
 {
     Invoke(sender, ShapeIdentified, new ShapeIdentifiedEventArgs(e));
 }
Beispiel #5
0
 private void axMap1_ShapeIdentified(object sender, _DMapEvents_ShapeIdentifiedEvent e)
 {
     axMap1.ZoomToShape(e.layerHandle, e.shapeIndex);
 }