Set Windows Theme


Node Information
Sets the control theme to Windows Theme.
General Information
• This node doesn't have other available options.
Visual
Visual

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

Source
namespace Korduene.KGraph.Nodes.UI.Control
{
    [IsNode("Set Windows Theme")]
    public class ControlSetWindowsTheme : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Set");
        Port objectRef = new Port(PortType.IN, typeof(object), AcceptsLinks.MULTIPLE, "Controls");
        public ControlSetWindowsTheme()
        {
            this.Name = "Set Windows Theme";
            this.NodeType = KGraph.NodeType.Method;
            AddPort(run);
            AddPort(objectRef);
            Information = "Sets the control theme to Windows Theme.";
        }
        public override string Code()
        {
            string code = string.Empty;
            if (objectRef.ConnectedPorts.Count != 0)
            {
                foreach (var port in objectRef.ConnectedPorts)
                {
                    if (port != null)
                    {
                        code += "WindowsTheme.Set(" + port.ParentNode.ReferenceName + ");";
                    }
                }
            }
            return code;
        }
    }
}