Hi,
to cancel node removal you can use the cancellable NodeRemoving event. Currently there isn't NodeInserting event (we are going to implement it soon), so for the node inserting you can use the NodeInserted event and eventually remove the inserted node if the user clicks on the Cancel button of your message box.