//Message状态栏 private void axTOCControl1_OnMouseMove(object sender, ITOCControlEvents_OnMouseMoveEvent e) { // 取得鼠标所在工具的索引号 int index = axToolbarControl1.HitTest(e.x, e.y, false); if (index != -1) { // 取得鼠标所在工具的 ToolbarItem IToolbarItem toolbarItem = axToolbarControl1.GetItem(index); // 设置状态栏信息 MessageLabel.Text = toolbarItem.Command.Message; } else { MessageLabel.Text = " 就绪 "; } }
private void axTOCControl_OnMouseMove(object sender, ITOCControlEvents_OnMouseMoveEvent e) { //IBasicMap pMap = new MapClass(); //ILayer pLayer = new FeatureLayerClass(); //object pOther = new object(); //esriTOCControlItem pItem = new esriTOCControlItem(); //object pIndex = new object(); ////实现调整图层顺序功能 //if(e.button == 1) //{ // axTOCControl.HitTest(e.x, e.y, ref pItem, ref pMap, ref pLayer, ref pOther, ref pIndex); //} //if(pItem != esriTOCControlItem.esriTOCControlItemNone) //{ // Icon icon = new Icon( "icon.ico"); // axTOCControl.MouseIcon = icon; // axTOCControl.MousePointer = esriControlsMousePointer.esriPointerCustom; //} }
private void TocCtrl_OnMouseMove(object sender, ITOCControlEvents_OnMouseMoveEvent e) { //throw new NotImplementedException(); }