ListView FindItemWithText


Node Information
Finds ListViewItem with the specified text in the ListView.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
ListView IN ListView ONE FALSE FALSE
Text IN String ONE FALSE FALSE
ListViewItem OUT Object MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListView
{
    [IsNode("Find Item With Text")]
    public class ListViewFindItemWithText : Node
    {
        Port get = new Port(PortType.OUT, typeof(object), AcceptsLinks.MULTIPLE, "ListViewItem");
        Port itemText = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Text");
        Port control = new Port(PortType.IN, typeof(Korduene.Designer.Standard.ListView), AcceptsLinks.ONE, "ListView");
        public string Text
        {
            set { itemText.Value = value.ToString(); }
            get { return GetRuntimeValue(itemText); }
        }
        public ListViewFindItemWithText()
        {
            this.Name = "ListView FindItemWithText";
            this.NodeType = KGraph.NodeType.Function;
            this.ReturnType = typeof(System.Windows.Forms.ListViewItem);
            AddPort(control);
            AddPort(itemText);
            AddPort(get);
            Information = "Finds ListViewItem with the specified text in the ListView.";
        }
        public override string Code()
        {
            return "return" + GetValue(control) + ".FindItemWithText(" + GetValue(itemText) + ");";
        }
    }
}