Skip to content

Instantly share code, notes, and snippets.

@dvhthomas
Created October 5, 2009 02:11
Show Gist options
  • Select an option

  • Save dvhthomas/201763 to your computer and use it in GitHub Desktop.

Select an option

Save dvhthomas/201763 to your computer and use it in GitHub Desktop.
private IEditEvents_Event _editEvents;
private IEditEvents2_Event _editEvents2;...
/// <summary>
/// Wire up the extension to editing events.
/// </summary>
/// <param name="editor">The current editor</param>
private void AttachEditingEvents(IEditor2 editor)
{
if (editor != null)
{
_editEvents = editor as IEditEvents_Event;
_editEvents.OnStartEditing += OnStartEditing;
_editEvents.OnStopEditing += OnStopEditing;
_editEvents2 = editor as IEditEvents2_Event;
_editEvents2.OnSaveEdits += OnSaveEdits;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment