コード例 #1
0
        void HandleAction(SpatialConstraintEditorMenuAction action, GraphContextMenuEvent e)
        {
            var mouseScreen = lastMousePosition;

            if (action == SpatialConstraintEditorMenuAction.CreateRuleNode)
            {
                CreateSpatialNodeAtMouse <SCRuleNode>(mouseScreen);
            }
            else if (action == SpatialConstraintEditorMenuAction.CreateCommentNode)
            {
                CreateCommentNode(mouseScreen);
            }
        }
コード例 #2
0
        protected override void OnMenuItemClicked(object userdata, GraphContextMenuEvent e)
        {
            var action = (SpatialConstraintEditorMenuAction)userdata;

            HandleAction(action, e);
        }