void HandleAction(SpatialConstraintEditorMenuAction action, GraphContextMenuEvent e) { var mouseScreen = lastMousePosition; if (action == SpatialConstraintEditorMenuAction.CreateRuleNode) { CreateSpatialNodeAtMouse <SCRuleNode>(mouseScreen); } else if (action == SpatialConstraintEditorMenuAction.CreateCommentNode) { CreateCommentNode(mouseScreen); } }
protected override void OnMenuItemClicked(object userdata, GraphContextMenuEvent e) { var action = (SpatialConstraintEditorMenuAction)userdata; HandleAction(action, e); }