private void DropAction(string str, Point mouse) { SmartEvent el = events.EventAt(mouse.X, mouse.Y); switch (dropResult) { case DropResult.INSERT: el.InsertAction(SmartFactory.GetInstance().ActionFactory(str), el.GetInsertActionIndexFromPos(mouse.X, mouse.Y)); break; case DropResult.REPLACE: SmartAction action = (SmartAction)el.GetElementFromPos(mouse.X, mouse.Y); el.ReplaceAction(SmartFactory.GetInstance().ActionFactory(str), action); break; } }