private void FlashGeometry(IGeometry geometry, int flashCount, int interval)
        {
            IScreenDisplay display = m_activeView.ScreenDisplay;
            ISymbol        symbol  = CreateSimpleSymbol(geometry.GeometryType);

            display.StartDrawing(0, (short)esriScreenCache.esriNoScreenCache);
            display.SetSymbol(symbol);

            for (int i = 0; i < flashCount; i++)
            {
                switch (geometry.GeometryType)
                {
                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint:
                    display.DrawPoint(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryMultipoint:
                    display.DrawMultipoint(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline:
                    display.DrawPolyline(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon:
                    display.DrawPolygon(geometry);
                    break;

                default:
                    break;
                }
                System.Threading.Thread.Sleep(interval);
            }
            display.FinishDrawing();
        }
예제 #2
0
        private void DrawSymbol(ISymbol symbol, IGeometry geometry)
        {
            IScreenDisplay pDisplay = m_activeView.ScreenDisplay;

            pDisplay.StartDrawing(0, (short)esriScreenCache.esriNoScreenCache);
            pDisplay.SetSymbol(symbol);
            for (int i = 0; i < 10; i++)
            {
                switch (geometry.GeometryType)
                {
                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint:
                    pDisplay.DrawPoint(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryMultipoint:
                    pDisplay.DrawMultipoint(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline:
                    pDisplay.DrawPolyline(geometry);
                    break;

                case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon:
                    pDisplay.DrawPolygon(geometry);
                    break;

                default:
                    break;
                }
                System.Threading.Thread.Sleep(100);
            }
            //m_mapControl.FlashShape(geometry, 5, 300, symbol);
            pDisplay.FinishDrawing();
        }