How to fire an "finish operation" event when left click the mouse button during adding shape

Apr 25, 2015 at 6:11 AM
I am imitating the Demo application, MapWinLite, to do some shape adding operation.
I knew that I hold the "ctrl" key together with the left mouse button to finish one shape. Could you tell me how can I fire the event of "finish one shape" by right click mouse button, instead of pressing the ctrl key + left mouse button. Furthermore, how can I start a new shape operation.
I have studied the demo codes but I can't understand.
I don't know how can I fire the event of "_DMapEvents_AfterShapeEditEvent" and operation about undolist.
I wish you can teach me some basic operation or example about using the new shape editing function.

Thank you for your help.
Apr 25, 2015 at 1:29 PM
You should start from reading documentation of ShapeEditor class. In particular to finish shape AxMap.ShapeEditor.SaveChanges should be called. New shape is started automatically on the first mouse click after the previous one was saved or discarded (ShapeEditor.Clear). AfterShapeEditEvent event is fired automatically by ShapeEditor.SaveChanges (as far as I remember). UndoList can be a bit tricky, but MWLite has good samples of its usage (MergeOperation.cs, ExplodeOperation.cs). Trial and error approach is the best way to master it.

Hope it helps,