public void DisconnectView(BaseConnectionView edgeView) { BasePortView inputPortView = edgeView.input as BasePortView; BaseNodeView inputNodeView = inputPortView.node as BaseNodeView; if (inputPortView != null) { inputPortView.Disconnect(edgeView); } inputPortView.Disconnect(edgeView); BasePortView outputPortView = edgeView.output as BasePortView; BaseNodeView outputNodeView = outputPortView.node as BaseNodeView; if (outputPortView != null) { outputPortView.Disconnect(edgeView); } outputPortView.Disconnect(edgeView); inputNodeView.RefreshPorts(); outputNodeView.RefreshPorts(); RemoveElement(edgeView); }
public virtual void Disconnect(BaseConnectionView connection) { base.Disconnect(connection); if (connection is BaseConnectionView connectionView) { ConnectionViews.Remove(connectionView.Model); } }
public virtual void Connect(BaseConnectionView connection) { base.Connect(connection); if (connection is BaseConnectionView connectionView) { ConnectionViews[connectionView.Model] = connectionView; } }