Example #1
0
        private SelectedNodesCollection GetSelectedNodesCollection()
        {
            var viewModelNodes = NodeControls.Select(q => q.ViewModelNode);
            var relationships  = SelectorControl.GetRelationships();

            return(new SelectedNodesCollection(viewModelNodes, relationships));
        }
Example #2
0
        private void OnCloneClicked(object sender, EventArgs eventArgs)
        {
            var nodes         = NodeControls.Select(q => q.ViewModelNode).ToList();
            var relationships = new List <Relationship>();

            foreach (var relationship in SelectorControl.GetRelationships())
            {
                if (nodes.Any(n => n.Id == relationship.From) || nodes.Any(n => n.Id == relationship.To))
                {
                    relationships.Add(relationship);
                }
            }
            Clear();
            IoC.GetInstance <ISuperGraphNodeFactory>().CloneNodes(nodes, relationships);
        }