IGraphicsContainerEvents Interface

如何监听 element事件?

如,当我们在Mapcontrol上添加、删除、更新了一个Element后,如何捕捉到这个事件?
   1,首先定义全局变量: IGraphicsContainerEvents_Event pGraphicsContainerEvent;
   2,在Form1_Load中给该变量赋值: pGraphicsContainerEvent = this.axMapControl1.ActiveView.FocusMap.BasicGraphicsLayer as IGraphicsContainerEvents_Event;
   3,添加事件处理
pGraphicsContainerEvent.ElementAdded += new IGraphicsContainerEvents_ElementAddedEventHandler(ElementAddedMethod);
 
           pGraphicsContainerEvent.ElementDeleted +=new IGraphicsContainerEvents_ElementDeletedEventHandler(ElementDeletedMethod);
 
            pGraphicsContainerEvent.ElementUpdated += new IGraphicsContainerEvents_ElementUpdatedEventHandler( ElementUpdatedMethod);
4,定义事件:
  private void ElementAddedMethod(IElement i)
        {
            System.Windows.Forms.MessageBox.Show("Element Added");
            axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
        }
        private void ElementDeletedMethod(IElement i)
        {
            System.Windows.Forms.MessageBox.Show("Element Deleted");
            axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
        }
        private void ElementUpdatedMethod(IElement i)
        {
            System.Windows.Forms.MessageBox.Show("Element Updated");
            axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
        }
http://blog.sina.com.cn/s/blog_90b91bf10100yks1.html
 
 
 
 
  AllPropertiesMethods Description
AllElementsDeleted Occurs when all the elements are deleted.
ElementAdded Occurs when the element is added.
ElementDeleted Occurs when the element is deleted.
ElementsAdded Occurs when the elements are added.
ElementUpdated Occurs when the element is updated.

 

arcgis engine 监听element的添加、更新和删除事件(使用IGraphicsContainerEvents)的更多相关文章

  1. arcgis engine 监听element的添加、更新和删除事件(使用IMovePointFeedback)

    VB代码: 复制进程序稍作修改变量名和事件逻辑即可使用. Members   AllPropertiesMethodsInheritedNon-inherited Description Displa ...

  2. 如何监听Element组件<el-input>标签的回车事件

    一.现象 表单提交时需要处理输入框的回车事件,一般的原生input标签可以用@keyup.enter="onSubmit"(tips:onSubmit为定义的方法) 二.解决 1. ...

  3. ArcGIS Engine效率探究——要素的添加和删除、属性的读取和更新

    ArcGIS Engine效率探究——要素的添加和删除.属性的读取和更新 来自:http://blog.csdn.net/freewaywalker/article/details/23703863 ...

  4. [转] ArcGIS engine中气泡标注的添加、修改

    小生 原文 ArcGIS engine中气泡标注的添加.修改! 你微微地笑着,不同我说什么话.而我觉得,为了这个,我已等待得久了.                                   ...

  5. Android 另类方法监听软键盘的弹出收起事件

    http://www.cnblogs.com/csonezp/p/5065624.html 最近做的项目碰到个问题,a界面是fragment+recyclerview,b界面带个edittext,并且 ...

  6. Canal 实战 | 第一篇:SpringBoot 整合 Canal + RabbitMQ 实现监听 MySQL 数据库同步更新 Redis 缓存

    一. Canal 简介 canal [kə'næl],译意为水道/管道/沟渠,主要用途是基于 MySQL 数据库增量日志解析,提供增量数据订阅和消费 早期阿里巴巴因为杭州和美国双机房部署,存在跨机房同 ...

  7. vue watch 监听element upload组件上传成功返回的url列表

    因为 on-success 上传成功返回的是一个异步的结果....如果父组件需要这个结果的话 必须用watch 监听 然后里面建立一个 save()方法 save方法里面再调用接口 传需要的上传之后的 ...

  8. angular指令监听ng-repeat渲染完成后执行自定义事件方法

    今天工作中遇到需要用到ng-repeat遍历渲染完后执行某个操作,angular本身并没有提供监听ng-repeat渲染完成的指令,所以需要自己创建自定义指令. 在ng-repeat模板实例内部会暴露 ...

  9. 监听文本框输入oninput和onpropertychange事件

    前端页面开发的很多情况下都需要实时监听文本框输入,比如腾讯微博编写140字的微博时输入框动态显示还可以输入的字数.过去一般都使用onchange/onkeyup/onkeypress/onkeydow ...

随机推荐

  1. MongoDB入门安装

    一.基础信息 系统环境:Linux MongoDB最新版下载:https://codeload.github.com/mongodb/mongo/zip/r3.2.0 二.安装过程 1.将MongoD ...

  2. linux中通配符和常用特殊符号

    1 通配符   2 特殊符号 3 参考文档 鸟哥的私房菜 http://vbird.dic.ksu.edu.tw/linux_basic/0320bash_4.php#settings_wildcar ...

  3. 浏览器请求页面时Etag和cache的区别

    etag:简单的说就是服务器收到客户端的请求后,根据返回的内容计算出来一个etag值,返回给客户端,当客户端下次再请求相同路径的时候会带上之前的etag值,服务器端会根据这次请求应该返回的内容计算出新 ...

  4. 【小白的CFD之旅】02 江小白

    虽然已经是9月份了,但是西南地区的湿热天气依然将小白热成了狗.独自一个人来到这号称天府之国的西南城市,小白却一点都没感受到这天府之国的友好.毒辣的阳光像利剑一样照射到身上,让人感觉如在蒸笼中一样.从炎 ...

  5. FineReport根据点击次数奇偶性排序之字符型

    上一篇文章我们提到了字段为数据型的数据列排序方法,采用的是根据点击次数奇偶性来排序,那如果是字段为字符型,又该如何实现呢? 这里提供的解决思路是通过超级链接来实现升序降序两张模板之间的相互调用,每点击 ...

  6. Neutron 理解 (7): Neutron 是如何实现负载均衡器虚拟化的 [LBaaS V1 in Juno]

    学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...

  7. Python学习记录day6

    title: Python学习记录day6 tags: python author: Chinge Yang date: 2016-12-03 --- Python学习记录day6 @(学习)[pyt ...

  8. 【2016-11-6】【坚持学习】【Day21】【子窗口关闭时,同步关闭它的主窗口(方法二)】

    根据上文,在子窗口设置一个委托.然后在子窗口关闭事件,执行委托实例,然后在主窗口增加监听委托的方法.... 想想,本事关闭事件就是一个特殊的委托.那么干嘛还要特意去声明一个新的呢?多此一举. 于是有下 ...

  9. CH Round #72 奇数码问题[逆序对 观察]

    描述 你一定玩过八数码游戏,它实际上是在一个3*3的网格中进行的,1个空格和1~8这8个数字恰好不重不漏地分布在这3*3的网格中. 例如:5 2 81 3 _4 6 7 在游戏过程中,可以把空格与其上 ...

  10. SpringFrameWork 上下文工具类

    //Servlet上下文ServletContext application = event.getServletContext(); //Spring应用上下文ApplicationContext ...