/// <summary> /// Occurs when this tool is clicked /// </summary> public override void OnClick() { // 新建属性查询对象 identifyDialog = IdentifyDialog.CreateInstance(MainForm.Instance.AxMapCtrl); identifyDialog.Owner = MainForm.Instance; identifyDialog.Show(); }
private void ShowIdentifyDialog() { //新建属性查询对象 identifyDialog = IdentifyDialog.CreateInstance(axMapControl1); identifyDialog.Owner = this; identifyDialog.Show(); }
private void barButtonItem16_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Variable.pMapFrm.mainMapControl.CurrentTool = null; pIdentifyDialog = IdentifyDialog.CreateInstance(Variable.pMapFrm.mainMapControl); pIdentifyDialog.Owner = this; pIdentifyDialog.Show(); }
/// <summary> /// 绘制多边形 /// </summary> /// <param name="pGeom"></param> #endregion m_mapControl鼠标事件 /// <summary> /// 要素识别 /// </summary> /// <param name="activeView"></param> /// <param name="x"></param> /// <param name="y"></param> private void doIdentify(IActiveView activeView, Int32 x, Int32 y) { IMap map = activeView.FocusMap; IdentifyDialog idenfityDialog = new IdentifyDialog(); idenfityDialog.Map = map; // clear the dialog on each mouse click idenfityDialog.ClearLayers(); IScreenDisplay screenDisplay = activeView.ScreenDisplay; IDisplay display = screenDisplay; // implicit cast idenfityDialog.Display = display; IIdentifyDialogProps idenfityDialogProps = (IIdentifyDialogProps)idenfityDialog; // explicit cast IEnumLayer enumLayer = map.Layers; enumLayer.Reset(); ILayer layer = enumLayer.Next(); while (layer != null) { idenfityDialog.AddLayerIdentifyPoint(layer, x, y); layer = enumLayer.Next(); } idenfityDialog.Show(); }