dp2007
路人甲
路人甲
  • 注册日期2011-05-08
  • 发帖数1
  • QQ
  • 铜币106枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2182回复:0

哪位高手替我看一下下面的代码,是关于实现闪烁选择的实体的代码

楼主#
更多 发布于:2011-05-13 15:21
<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>
喜欢0 评分0
游客

返回顶部