Example #1
0
 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)
     {
     }
 }