ListView Item Info


Node Information
Gets information about the specified ListView item.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
IN ListView ONE FALSE FALSE
Text OUT String MULTIPLE FALSE FALSE
Name OUT String MULTIPLE FALSE FALSE
Name OUT Int32 MULTIPLE FALSE FALSE
SubItems OUT String MULTIPLE FALSE FALSE
ForeColor OUT Color MULTIPLE FALSE FALSE
BackColor OUT Color MULTIPLE FALSE FALSE
IsChecked OUT Boolean MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListView
{
    [IsNode("Item Info")]
    public class ListViewItemInfo : Node
    {
        Port text = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "Text");
        Port name = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "Name");
        Port indx = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "Name");
        Port subitems = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "SubItems");
        Port forecolor = new Port(PortType.OUT, typeof(System.Drawing.Color), AcceptsLinks.MULTIPLE, "ForeColor");
        Port backcolor = new Port(PortType.OUT, typeof(System.Drawing.Color), AcceptsLinks.MULTIPLE, "BackColor");
        Port chcked = new Port(PortType.OUT, typeof(bool), AcceptsLinks.MULTIPLE, "IsChecked");
        Port objectRef = new Port(PortType.IN, typeof(Korduene.Designer.Standard.ListView), AcceptsLinks.ONE);
        public ListViewItemInfo()
        {
            this.Name = "ListView Item Info";
            AddPort(objectRef);
            AddPort(text);
            AddPort(name);
            AddPort(indx);
            AddPort(subitems);
            AddPort(forecolor);
            AddPort(backcolor);
            AddPort(chcked);
            text.Instructions = "init";
            name.Instructions = "init";
            indx.Instructions = "init";
            subitems.Instructions = "init";
            forecolor.Instructions = "init";
            backcolor.Instructions = "init";
            chcked.Instructions = "init";
            Information = "Gets information about the specified ListView item.";
        }
        public override void UpdateResults()
        {
            if (objectRef.ConnectedPorts.Count != 0)
            {
                string o = GetValue(objectRef);
                text.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").Text";
                name.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").Name";
                indx.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").Index";
                subitems.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").SubItems";
                forecolor.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").ForeColor";
                backcolor.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").BackColor";
                chcked.Instructions = "((System.Windows.Forms.ListViewItem) " + o + ").Checked";
            }
        }
    }
}