阅读:1693回复:1
扑捉图层可见
用C#开发,在ENGINE9.2的toc的mouseup事件中怎么才能扑捉到图层是否改变可见,即其VISIBLE,以前在9.1的时候可以,到9.2了居然不可以,不知道大家能否提供帮助,想用ilayervisibilitychanged做,可是不知道怎么弄。谢谢。<a href="attachment/2008-4/20084201557594301.rar">2008-4/20084201557594301.rar</a><br>
[此贴子已经被作者于2008-4-20 15:57:11编辑过]
|
|
1楼#
发布于:2008-04-14 15:33
<P>在9.1的时候</P>
<P>private void axTOCControl1_OnMouseUp(object sender, ESRI.ArcGIS.TOCControl.ITOCControlEvents_OnMouseUpEvent e)<BR> {<BR> <BR> ESRI.ArcGIS.TOCControl.esriTOCControlItem item = ESRI.ArcGIS.TOCControl.esriTOCControlItem.esriTOCControlItemNone;<BR> IBasicMap map = null;<BR> object other = null; object index = null;<BR> ILayer pLayer=null;<BR> //int i;</P> <P><BR> mtoc.HitTest(e.x, e.y, ref item, ref map, ref pLayer, ref other, ref index);<BR> if (item == ESRI.ArcGIS.TOCControl.esriTOCControlItem.esriTOCControlItemLayer)<BR> {<BR> //if(this.selMap!=this.mPageLayoutcontrol.ActiveView.FocusMap)<BR> //{<BR> // this.selLyr=null;<BR> // m_mapControl.CustomProperty = selLyr;<BR> // this.mPageLayoutcontrol.CustomProperty=selLyr;<BR> //}<BR> //return;<BR> //this.axTOCControl1.Update();<BR> bool isiv = pLayer.Visible;<BR> System.Windows.Forms.MessageBox.Show(isiv.ToString());</P> <P> }</P> <P> }</P> <P>这个显示是对的,到了9.2就显示不对了。郁闷</P> |
|