ComboBox Remove Item


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

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

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