namespace Korduene.KGraph.Nodes.UI.Control
{
[IsNode("BringToFront")]
public class ControlBringToFront : Node
{
Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "BringToFront");
Port objectRef = new Port(PortType.IN, typeof(object), AcceptsLinks.MULTIPLE);
public ControlBringToFront()
{
this.Name = "BringToFront";
this.NodeType = KGraph.NodeType.Method;
AddPort(run);
AddPort(objectRef);
Information = "Brings the control to the front of z-order.";
}
public override string Code()
{
string code = string.Empty;
if (objectRef.IsConnected)
{
foreach (var port in objectRef.ConnectedPorts)
{
if (port !=null)
{
code += port.ParentNode.ReferenceName + ".BringToFront();" + Environment.NewLine;
}
}
}
return code;
}
}
}