private void NodeGraphPanel_NodeCollectionModified(object sender, EC.NodeCollectionModifiedEventArgs e) { if (e.Action == NodeEditorLib.EditorControl.NodeCollectionModifiedEventArgs.ActionType.Removed) { var node = ((GraphNode)e.Item).Node; Graph.RemoveNode(node); node.Dispose(); } }
private void _screen_NodeCollectionModified(object sender, NodeCollectionModifiedEventArgs e) { if (e.Action == NodeCollectionModifiedEventArgs.ActionType.Removed) { foreach (var port in e.Item.InputPorts.ToArray()) { ClearConnections(port); } foreach (var port in e.Item.OutputPorts.ToArray()) { ClearConnections(port); } } NodeCollectionModified?.Invoke(this, e); }