示例#1
0
        // Display a small triangle below the node. This happens all without
        // the node querying its value, so the preview type is set to unknown.
        // A separate query will be made later when user tries to expands the
        // preview bubble.
        internal void DisplayCollapsedPreview()
        {
            if (previewBubble == null)
            {
                previewBubble = new PreviewBubble(this.graphController, this.nodeId);
            }

            previewBubble.SetUnknownPreview();
            previewBubble.Compose();
        }
示例#2
0
        internal void SetPreviewValue(object data)
        {
            if (previewBubble == null)
            {
                if (data == null)
                {
                    return;
                }
                else
                {
                    previewBubble = new PreviewBubble(this.graphController, this.nodeId);
                }
            }

            previewBubble.SetContent(data);
            previewBubble.Compose();
        }
        private bool HandleTogglePreview(GraphCommand command)
        {
            uint bubbleId = (uint)command.GetArgument(0);

            if (bubbleId == uint.MaxValue)
            {
                return(ToggleAllPreviews());
            }

            PreviewBubble previewBubble = bubbleCollection[bubbleId] as PreviewBubble;

            if (previewBubble == null)
            {
                return(false);
            }

            VisualNode node = GetVisualNode(previewBubble.OwnerId);

            if (node == null)
            {
                return(false);
            }

            List <IVisualNode> nodeList = new List <IVisualNode>();

            nodeList.Add(node);

            undoRedoRecorder.BeginGroup();
            undoRedoRecorder.RecordNodeModificationForUndo(nodeList);
            undoRedoRecorder.EndGroup();

            if (node.NodeStates.HasFlag(States.PreviewHidden))
            {
                node.ClearState(States.PreviewHidden);
                CurrentSynchronizer.BeginQueryNodeValue(node.NodeId);
            }
            else
            {
                node.SetNodeState(States.PreviewHidden);
            }

            previewBubble.Collapse(node.NodeStates.HasFlag(States.PreviewHidden));

            return(true);
        }
示例#4
0
        internal void SetPreviewValue(object data)
        {
            if (previewBubble == null)
            {
                if (data == null)
                    return;
                else
                    previewBubble = new PreviewBubble(this.graphController, this.nodeId);
            }

            previewBubble.SetContent(data);
            previewBubble.Compose();
        }
示例#5
0
        // Display a small triangle below the node. This happens all without
        // the node querying its value, so the preview type is set to unknown.
        // A separate query will be made later when user tries to expands the
        // preview bubble.
        internal void DisplayCollapsedPreview()
        {
            if (previewBubble == null)
                previewBubble = new PreviewBubble(this.graphController, this.nodeId);

            previewBubble.SetUnknownPreview();
            previewBubble.Compose();
        }