예제 #1
0
        public void SelectNode(NodeConfiguration selectedNode)
        {
            NodeConfiguration originalSelectedNode = SelectedNode;

            NodeSelectingEventArgs nodeSelectingEventArgs = new NodeSelectingEventArgs(originalSelectedNode, selectedNode);
            NodeSelecting(this, nodeSelectingEventArgs);
            if (nodeSelectingEventArgs.IsCancelled) {
                return;
            }

            if (selectedNode is ActionNodeConfiguration) {
                propertiesContainer.Child = new NodePropertiesEditors.ActionNodePropertiesEditor((ActionNodeConfiguration)selectedNode, this);
            } else if (selectedNode is CbrNodeConfiguration) {
                propertiesContainer.Child = new NodePropertiesEditors.CbrNodePropertiesEditor((CbrNodeConfiguration)selectedNode, this);
            } else if (selectedNode is TerminatorNodeConfiguration) {
                propertiesContainer.Child = new NodePropertiesEditors.TerminatorNodePropertiesEditor((TerminatorNodeConfiguration)selectedNode, this);
            } else if (selectedNode is EntryNodeConfiguration) {
                propertiesContainer.Child = new NodePropertiesEditors.EntryNodePropertiesEditor((EntryNodeConfiguration)selectedNode, this);
            } else {
                propertiesContainer.Child = null;
            }

            SelectedNode = selectedNode;
            NodeSelectedEventArgs nodeSelectedEventArgs = new NodeSelectedEventArgs(originalSelectedNode, selectedNode);
            NodeSelected(this, nodeSelectedEventArgs);
        }
예제 #2
0
        private void SelectNode(object sender, NodeSelectingEventArgs e)
        {
            e.IsCancelled = true;
            uiSelect.IsChecked = false;
            selectionManger.NodeSelecting -= SelectNode;

            selectionManger.MessageflowGraphPresenter.HighlightNodes();
            targetSetter(e.NewSelectedNode);
            selectionManger.MessageflowGraphPresenter.RaiseGraphChanged();
            selectionManger.MessageflowGraphPresenter.HighlightNodes(source, targetGetter());
            ThreadUtils.InvokeLater(TimeSpan.FromSeconds(0.5), delegate {
                selectionManger.MessageflowGraphPresenter.HighlightNodes();
            });
        }