public override void RegisterPort() { input = new FlowInput("In", () => { if (open) { Finish(onOpen); } else { Finish(onClosed); } }); toggle = new FlowInput("Toggle", () => { open = !open; }); if (CodeGenerator.isGenerating) { CodeGenerator.RegisterFlowNode(this); string varName = CodeGenerator.AddVariable(new VariableData("open", typeof(bool), open)); input.codeGeneration = () => { return(CodeGenerator.GenerateIfStatement(varName, CodeGenerator.GetFinishCode(this, true, onOpen), CodeGenerator.GetFinishCode(this, true, onClosed))); }; toggle.codeGeneration = () => { return(CodeGenerator.GenerateSetCode(varName, "!" + varName)); }; } }
protected override void RegisterPorts() { // FlowInput _flowIn = AddFlowInput("In", (Flow f) => { BeginAction(); }); //_flowOut = AddFlowOutput("Out"); ResetFlowOutList(); // valueInput _targetValueIn = AddValueInput <string>("Targets"); AutoGeneratePort(); }
public HierarchyPortTree(Node node, FlowInput port, int id, int depth, string displayName) : base(id, depth, displayName) { this.node = node; this.port = port; }
/// <summary> /// Drawing ports /// </summary> protected override void RegisterPorts() { input = AddFlowInput("Input", delegate(Flow flow) { }); output = AddFlowOutput("Output"); }