Add Item


Node Information
Adds item to the specified ComboBox.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Add IN RUN MULTIPLE FALSE FALSE
IN ComboBox ONE FALSE FALSE
Value IN String ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.Advanced.ComboBox
{
    [IsNode("Add Item")]
    public class ComboBoxAddItem : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Add");
        Port control = new Port(PortType.IN, typeof(Designer.Advanced.ComboBox), AcceptsLinks.ONE);
        Port val = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Value");
        public ComboBoxAddItem()
        {
            NodeType = KGraph.NodeType.Method;
            Name = "Add Item";
            AddPort(run);
            AddPort(control);
            AddPort(val);
            Information = "Adds item to the specified ComboBox.";
        }
        public override string Code()
        {
            return GetValue(control) + ".WPFControl.Items.Add(" + GetValue(val) + ");";
        }
    }
}