zoukankan      html  css  js  c++  java
  • ActiveMapViewChanged和选择变化

    /Subscribe to event
    ArcGIS.Desktop.Framework.Events.ActivePaneChangedEvent.Subscribe(OnActivePaneChanged);

    private void OnActivePaneChanged(PaneEventArgs obj)
    {
       if (obj.IncomingPane != null)
       {
          System.Diagnostics.Debug.WriteLine($"Debug Message. GetTypeName: {obj.IncomingPane.GetType().Name}");
           
       }
    }
    ===========================

    private SubscriptionToken eventToken = null;

    private void SetupEvents()
    {
    eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent);
    }
    private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs obj)
    {
    //do work on the selection
    }

    =========================调用方法===

    private SubscriptionToken eventToken = null;

    private void SetupEvents()
    {
    eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent);
    }
    private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs obj)
    {
    //do work on the selection
    MessageBox.Show("变化"+obj.Selection.Count.ToString());
    }
    protected async override void OnClick()
    {


    SetupEvents();


    }

     
  • 相关阅读:
    七月份文章收藏
    五月份文章收藏
    二月份文章收藏
    一月份文章收藏
    nmap数据流
    memcached未授权
    Redis未授权漏洞利用方式
    requests sslerror
    欢迎来到Curl的世界
    Dig命令解析结果
  • 原文地址:https://www.cnblogs.com/gisoracle/p/12622505.html
Copyright © 2011-2022 走看看