阅读:2356回复:0
哪位高手替我看一下下面的代码,是关于实现闪烁选择的实体的代码
<P>哪位高手替我看一下下面的代码,是关于实现闪烁选择的实体的代码,当我的程序运行时,就是实现不了闪烁,不知道是怎么会事。希望赐教啊!</P>
<P>private void searchFeature(string sqlfiter, IFeatureLayer pFeatureLayer)<BR>{<BR> IFeatureLayer pFeatLyr;<BR> pFeatLyr = pFeatureLayer;<BR> IQueryFilter pFilter;<BR> pFilter = new QueryFilterClass();<BR> IIdentifyObj pIdObj;<BR> IArray pIDArray;<BR> IFeatureIdentifyObj pFeatIdObj;</P> <P> //设置查询条件<BR> pFilter.WhereClause = sqlfiter;<BR> IFeatureCursor pFeatCursor;<BR> pFeatCursor = pFeatLyr.Search(pFilter, true);<BR> IFeature pFeat;</P> <P> IGraphicsContainer pGraphicsContainer;<BR> IActiveView pAV;<BR> pGraphicsContainer = axMapControl1.Map as IGraphicsContainer;</P> <P> pIDArray = pIdentify.Identify(pEnv);</P> <P> pFeat = pFeatCursor.NextFeature();<BR> while (pFeat == null)<BR> {<BR> pFeat = pFeatCursor.NextFeature();<BR> if (pFeat != null)<BR> {<BR> ISimpleFillSymbol pFillsyl;<BR> pFillsyl = new SimpleFillSymbolClass();<BR> pFillsyl.Color = GetRGBColor(220,0, 0);<BR> object oFillsyl;<BR> oFillsyl = pFillsyl;<BR> IPolygon pPolygon;<BR> pPolygon = pFeat.Shape as IPolygon;<BR> //闪烁实体;<BR> pFeatIdObj = (IFeatureIdentifyObj)pIDArray.get_Element(0);<BR> pIdObj = (IIdentifyObj)pFeatIdObj;<BR> pIdObj.Flash(axMapControl1.ActiveView.ScreenDisplay);<BR> axMapControl1.FlashShape(pPolygon, 15, 20, pFillsyl);<BR> axMapControl1.DrawShape(pPolygon, ref oFillsyl);</P> <P> }<BR> }<BR> </P> <P>}</P> |
|