Hide


Node Information
Hides the controls.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Hide IN RUN MULTIPLE FALSE FALSE
Controls IN Object MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.Control
{
    [IsNode("Hide")]
    public class ControlHide : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Hide");
        Port objectRef = new Port(PortType.IN, typeof(object), AcceptsLinks.MULTIPLE, "Controls");
        public ControlHide()
        {
            this.Name = "Hide";
            this.NodeType = KGraph.NodeType.Method;
            AddPort(run);
            AddPort(objectRef);
            Information = "Hides the controls.";
        }
        public override string Code()
        {
            string code = string.Empty;
            if (objectRef.IsConnected)
            {
                foreach (var port in objectRef.ConnectedPorts)
                {
                    if (port != null)
                    {
                        code += port.ParentNode.ReferenceName + ".Hide();" + Environment.NewLine;
                    }
                }
            }
            return code;
        }
    }
}