示例#1
0
        protected override void OnDoubleClick()
        {
            if (_polygonGeometry.PointCount > 2)
            {
                TableOfContents tableOfContents = new TableOfContents(ArcGlobe.Globe);

                if (tableOfContents.LayerExists("Globe Graphics"))
                {
                    Layer layer = new Layer(tableOfContents["Globe Graphics"]);

                    layer.RemoveElement(layer.ElementCount - 1);

                    _polygonGeometry.Close();

                    PolygonElement polygonElement = new PolygonElement(_polygonGeometry.Geometry, esriSimpleFillStyle.esriSFSSolid);

                    layer.AddElement(polygonElement.Element, polygonElement.ElementProperties);

                    _polygonGeometry = null;

                    ArcGlobe.Globe.GlobeDisplay.RefreshViewers();
                }
            }
        }
        protected override void OnDoubleClick()
        {
            if (_polygonGeometry.PointCount > 2)
            {
                TableOfContents tableOfContents = new TableOfContents(ArcGlobe.Globe);

                if (tableOfContents.LayerExists("Globe Graphics"))
                {
                    Layer layer = new Layer(tableOfContents["Globe Graphics"]);

                    layer.RemoveElement(layer.ElementCount - 1);

                    _polygonGeometry.Close();

                    PolygonElement polygonElement = new PolygonElement(_polygonGeometry.Geometry, esriSimpleFillStyle.esriSFSSolid);

                    layer.AddElement(polygonElement.Element, polygonElement.ElementProperties);

                    _polygonGeometry = null;

                    ArcGlobe.Globe.GlobeDisplay.RefreshViewers();
                }
            }
        }