zoukankan      html  css  js  c++  java
  • C# AE 符号选择器

    using ESRI.ArcGIS.Display;
    using ESRI.ArcGIS.DisplayUI
    
    private esriTOCControlItem toccItem = esriTOCControlItem.esriTOCControlItemNone;
            private ILayer iLayer = null;
            private IBasicMap iBasicMap = null;
            private void axTOCControl1_OnDoubleClick(object sender, ITOCControlEvents_OnDoubleClickEvent e)
            {
                object unk = null;
                object data = null;
                if (e.button == 1)
                {
                    axTOCControl1.HitTest(e.x, e.y, ref toccItem, ref iBasicMap, ref iLayer, ref unk, ref data);
                    System.Drawing.Point pos = new System.Drawing.Point(e.x, e.y);
                    if (this.toccItem == esriTOCControlItem.esriTOCControlItemLegendClass)
                    {
                        ESRI.ArcGIS.Carto.ILegendClass pLC = new LegendClassClass();
                        ESRI.ArcGIS.Carto.ILegendGroup pLG = new LegendGroupClass();
                        if (unk is ILegendGroup)
                        {
                            pLG = (ILegendGroup) unk;
                        }
                        pLC = pLG.get_Class((int) data);
                        ISymbol pSym;
                        pSym = pLC.Symbol;
                        ESRI.ArcGIS.DisplayUI.ISymbolSelector pSS = new ESRI.ArcGIS.DisplayUI.SymbolSelectorClass();
                        bool bOK = false;
                        pSS.AddSymbol(pSym);
                        bOK = pSS.SelectSymbol(0);
                        if (bOK)
                        {
                            pLC.Symbol = pSS.GetSymbolAt(0);
                        }
                        this.axMapControl1.ActiveView.Refresh();
                        this.axTOCControl1.Refresh();
                    }
                }
            }

    双击axTocControl弹出符号选择器。

  • 相关阅读:
    笨笨的洪水堵截
    青蛙的约会
    扩展欧几里德
    windows上修改路由表
    怎样编写注册表文件
    win7启动文件修复
    word文档中的字号和磅的对应关系
    将Windows 7导航窗格中的收藏夹、库、家庭组、网络全部去掉
    DNS
    UTF-8 GBK GB2312 之间的区别和关系
  • 原文地址:https://www.cnblogs.com/joysky/p/4553800.html
Copyright © 2011-2022 走看看