public void Create() { Capabilities.Clear(); width = 100; height = 50; ProductDataBase.Device device = ProductDataBase.GetDeviceByID(DeviceType); if (device != null) { Capability capability = new Capability(this); ProductDataBase.Device.RemoteEvent evnt = device.GetRemoteEventByID(EventID); if (evnt != null) { foreach (ProductDataBase.Device.RemoteEvent.Output o in evnt.Outputs) { capability.AddDataOutput(o.Name, o.Type); } foreach (ProductDataBase.Device.RemoteEvent.Input i in evnt.Inputs) { if (i.Type == "void") capability.AddTriggerInput(i.Name); else capability.AddDataInput(i.Name, i.Type); } if (capability.TriggerInputs.Count == 0 && (capability.TriggerInputs.Count != 0 || capability.DataOutputs.Count == 0)) { capability.AddTriggerInput("Trigger"); } } } UpdateConnectors(); }
public BlockDelay() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddTriggerOutput(""); capability.AddTriggerInput("Reset"); capability.AddDataInput("Delay", "int"); UpdateConnectors(); }
public BlockSetDebugLed() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("State", "bool"); capability.AddTriggerInput(""); UpdateConnectors(); Name = "Set Debug LED"; }
public BlockGenericEventInvoke() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddTriggerInput("Trigger"); UpdateConnectors(); //TriggerInputs[0].X += width / 3; }
public BlockIfNot() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddDataInput("Condition", "bool"); capability.AddTriggerInput(""); capability.AddTriggerOutput(""); UpdateConnectors(); Name = "If not"; }
public BlockDigitalOutputToggleState() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); UpdateConnectors(); Name = "k8055 toggle output"; }
public BlockEventDelay() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataOutput("Running ?", "bool"); capability.AddTriggerOutput(""); capability.AddTriggerInput("Start"); capability.AddTriggerInput("Abort"); UpdateConnectors(); }
public BlockControlSwitch() { width = 100; height = 100; Capability capability = new Capability(this); capability.AddTriggerOutput(""); capability.AddTriggerInput("Toggle"); UpdateConnectors(); Name = "Switch"; }
public BlockDigitalOutputSetState() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); capability.AddDataInput("State", "bool"); UpdateConnectors(); Name = "K8055 set output"; }
public BlockSwitchSetState() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); capability.AddDataInput("State", "bool"); UpdateConnectors(); Name = "Set state"; }
public BlockSpeak() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddTriggerInput(""); UpdateConnectors(); }
public BlockMathPrint() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput("Invoke"); capability.AddDataInput("Value", "int"); UpdateConnectors(); }
public BlockMathEquals() { width = 100; height = 50; Capability capability = new Capability(this); capability.AddDataInput("A", "int"); capability.AddDataInput("B", "int"); capability.AddTriggerInput("Trigger"); capability.AddTriggerOutput("True"); capability.AddTriggerOutput("False"); UpdateConnectors(); }
public BlockInvokeRemote() { width = 100; height = 25; Capability capability = new Capability(this); capability.AddTriggerInput(""); UpdateConnectors(); Name = "Invoke Remote Event"; }