public void Create()
        {
            Capabilities.Clear();
            width = 100;
            height = 50;
            ProductDataBase.Device device = ProductDataBase.GetDeviceByID(DeviceType);
            if (device != null)
            {
                ProductDataBase.Device.Event evnt = device.GetEventByID(EventID);
                if (evnt != null)
                {

                    Capability capability = new Capability(this);
                    capability.AddTriggerOutput("Trigger");

                    foreach (ProductDataBase.Device.Event.Output o in evnt.Outputs)
                    {
                        capability.AddDataOutput(o.Name, o.Type);
                    }
                }
            }

            UpdateConnectors();
        }
 public BlockDelay()
 {
     width = 100;
     height = 50;
     Capability capability = new Capability(this);
     capability.AddTriggerOutput("");
     capability.AddTriggerInput("Reset");
     capability.AddDataInput("Delay", "int");
     UpdateConnectors();
 }
 public BlockGenericEvent()
 {
     width = 100;
     height = 50;
     Capability capability = new Capability(this);
     capability.AddTriggerOutput("");
     UpdateConnectors();
 }
 public BlockIfNot()
 {
     width = 100;
     height = 25;
     Capability capability = new Capability(this);
     capability.AddDataInput("Condition", "bool");
     capability.AddTriggerInput("");
     capability.AddTriggerOutput("");
     UpdateConnectors();
     Name = "If not";
 }
 public BlockEventSwitchToggle()
 {
     width = 100;
     height = 50;
     Capability capability = new Capability(this);
     capability.AddTriggerOutput("");
     UpdateConnectors();
     Name = "Switch toggle";
 }
 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 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();
        }