public void OnCreate(object Hook) { EditVertexClass.ClearResource(); if (Hook == null) { return; } try { m_hookHelper = new HookHelperClass(); m_hookHelper.Hook = Hook; if (m_hookHelper.ActiveView == null) { m_hookHelper = null; } } catch { m_hookHelper = null; } if (m_hookHelper == null) { bEnable = false; } else { bEnable = true; } }
public void OnClick() { try { m_Map = m_hookHelper.FocusMap; m_activeView = m_Map as IActiveView; m_EngineEditor = MapManager.EngineEditor; EditVertexClass.ClearResource(); if (m_EngineEditor == null) { return; } if (m_EngineEditor.EditState != esriEngineEditState.esriEngineStateEditing) { return; } IWorkspaceEdit2 pWSEdit = m_EngineEditor.EditWorkspace as IWorkspaceEdit2; if (pWSEdit == null) { return; } Boolean bHasUndo = false; pWSEdit.HasUndos(ref bHasUndo); if (bHasUndo) { pWSEdit.UndoEditOperation(); } m_activeView.Refresh(); } catch (Exception ex) { } }
public void OnClick() { m_Map = m_hookHelper.FocusMap; m_activeView = m_Map as IActiveView; m_EngineEditor = MapManager.EngineEditor; m_EngineEditLayers = MapManager.EngineEditor as IEngineEditLayers; EditVertexClass.ClearResource(); }
public void OnClick() { m_Map = m_hookHelper.FocusMap; m_activeView = m_Map as IActiveView; m_EngineEditor = MapManager.EngineEditor; m_EngineEditLayers = MapManager.EngineEditor as IEngineEditLayers; EditVertexClass.m_activeView = m_activeView; EditVertexClass.m_Map = m_Map; EditVertexClass.ClearResource(); if (m_EngineEditor == null) { return; } if (m_EngineEditor.EditState != esriEngineEditState.esriEngineStateEditing) { return; } if (m_EngineEditLayers == null) { return; } IFeatureLayer pFeatLyr = m_EngineEditLayers.TargetLayer; if (pFeatLyr == null) { return; } IFeatureCursor pFeatCur = MapManager.GetSelectedFeatures(pFeatLyr); if (pFeatCur == null) { MessageBox.Show("请选择要删除节点的要素!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } EditVertexClass.ShowAllVertex(pFeatLyr); ((IActiveViewEvents_Event)m_Map).AfterDraw += new IActiveViewEvents_AfterDrawEventHandler(map_AfterDraw); }