//TOCControl控件的鼠标单击事件
        public void m_tocControl_OnMouseDown(object sender, ITOCControlEvents_OnMouseDownEvent e)
        {
            esriTOCControlItem item  = esriTOCControlItem.esriTOCControlItemNone;
            IBasicMap          map   = null;
            ILayer             layer = null;
            object             other = null;
            object             index = null;

            //判断所选菜单的类型
            m_tocControl.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);

            if (e.button == 1)
            {
                if (item == esriTOCControlItem.esriTOCControlItemLegendClass)
                {
                    try
                    {
                        ESRI.ArcGIS.Carto.ILegendClass pLC = new LegendClassClass();
                        ESRI.ArcGIS.Carto.ILegendGroup pLG = new LegendGroupClass();
                        if (other is ILegendGroup)
                        {
                            pLG = (ILegendGroup)other;
                        }
                        pLC = pLG.get_Class((int)index);
                        ISymbol pSym;
                        pSym = pLC.Symbol;


                        ISymbolSelector pSS = new SymbolSelectorClass();

                        bool bOK = false;
                        pSS.AddSymbol(pSym);
                        bOK = pSS.SelectSymbol(0);
                        if (bOK)
                        {
                            pLC.Symbol = pSS.GetSymbolAt(0);
                        }
                        this.m_mapControl.ActiveView.Refresh();
                        this.m_tocControl.Refresh();
                    }
                    catch (Exception exce)
                    { }
                }
            }
            if (e.button == 2)
            {
                //设置CustomProperty为layer (用于自定义的Layer命令)
                m_mapControl.CustomProperty = layer;
                //弹出右键菜单
                if (item == esriTOCControlItem.esriTOCControlItemMap)
                {
                    m_menuMap.PopupMenu(e.x, e.y, m_tocControl.hWnd);
                }
                if (item == esriTOCControlItem.esriTOCControlItemLayer)
                {
                    #region

                    /*                 this.LoadMenu(layer);
                     * m_menuLayer.PopupMenu(e.x, e.y, m_tocControl.hWnd);
                     * m_menuLayer.RemoveAll();      */
                    #endregion
                    m_CurrentLayer = layer;
                    m_pGeoFeaLayer = m_CurrentLayer as IGeoFeatureLayer;
                    this.ChangeItemText();
                    Rectangle rect = new Rectangle();
                    rect = m_tocControl.RectangleToScreen(rect);
                    m_contextMemuLayer.Show(e.x + rect.Left, e.y + rect.Top);
                }
            }
        }