ListBox Add Item


Node Information
Adds item to the specified ListBox.
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
ListBox IN ListBox ONE FALSE FALSE
Value IN String ONE FALSE FALSE

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