protected IVisualNodeComponentContainer GetContainer(IVisualNodeComponent component) { if (component == NameLabel) { return(Name); } return(((IList <IVisualNodeComponentContainer>)Fields)[FieldList.VisualComponentList.IndexOf(component)]); }
public void Evaluate() { foreach (IVisualNodeComponent field in flowOutputs.VisualComponentList) { if (field is INodeField valueField && valueField.DisplayedValue != null && valueField.DisplayedValue.Value.Equals(valueInput.Input)) { FlowOutField = valueField; return; } } FlowOutField = defaultOutput; }
public void Initialize(IVisualNodeComponent component, ConnectorType connectionType) { _connectorType = connectionType; _parentComponent = component; if (connectionType is ConnectorType.Input) { component.GetFlowInput().PropertyChanged += FlowPropertyChanged; } if (connectionType is ConnectorType.Output) { component.GetFlowOutput().PropertyChanged += FlowPropertyChanged; } }
public void Initialize(IVisualNodeComponent component, ConnectorType connectionType) { _parentComponent = component; _connectorType = connectionType; if (component is INodeField field) { field.AnyValueChanged += (o, e) => { if (e as string is INodeField.InputKey && connectionType is ConnectorType.Input) { ExistsChanged?.Invoke(this, new EventArgs()); } if (e as string is INodeField.OutputKey && connectionType is ConnectorType.Output) { ExistsChanged?.Invoke(this, new EventArgs()); } }; } }