ArcMapAddinCoordinateConversion.DockableWindowCoordinateConversion.OnSelectionChanged C# (CSharp) Метод

OnSelectionChanged() приватный Метод

private OnSelectionChanged ( ) : void
Результат void
        private void OnSelectionChanged()
        {
            if (ArcMap.Document.FocusMap.SelectionCount > 0)
            {
                for (int i = 0; i < ArcMap.Document.FocusMap.LayerCount; i++ )
                {
                    if(ArcMap.Document.FocusMap.get_Layer(i) is IFeatureLayer)
                    {
                        var fl = ArcMap.Document.FocusMap.get_Layer(i) as IFeatureLayer;

                        var fselection = fl as IFeatureSelection;
                        if (fselection == null)
                            continue;

                        if(fselection.SelectionSet.Count == 1)
                        {
                            ICursor cursor;
                            fselection.SelectionSet.Search(null, false, out cursor);

                            var fc = cursor as IFeatureCursor;
                            var f = fc.NextFeature();

                            if(f != null)
                            {
                                if(f.Shape is IPoint)
                                {
                                    var point = f.Shape as IPoint;
                                    if(point != null)
                                    {
                                        var tempX = point.X;
                                        var tempY = point.Y;

                                        UpdateInputCoordinate(point);
                                    }
                                }
                            }

                        }
                    }
                }
            }
        }