Exemplo n.º 1
0
 private void UpdatePortInputs()
 {
     foreach (var port in inputContainer.OfType <LogicPort>())
     {
         if (!_portInputContainer.OfType <PortInputView>().Any(a => Equals(a.Description, port.Description)))
         {
             var portInputView = new PortInputView(port.Description)
             {
                 style = { positionType = PositionType.Absolute }
             };
             _portInputContainer.Add(portInputView);
             port.RegisterCallback <GeometryChangedEvent>(evt => UpdatePortInput((LogicPort)evt.target));
         }
     }
 }
Exemplo n.º 2
0
 void UpdatePortInputs()
 {
     foreach (var port in inputContainer.Children().OfType <LogicPort>())
     {
         if (!_portInputContainer.Children().OfType <PortInputView>().Any(a => Equals(a.Description, port.Slot)))
         {
             var portInputView = new PortInputView(port.Slot)
             {
                 style = { position = Position.Absolute }
             };
             _portInputContainer.Add(portInputView);
             if (float.IsNaN(port.layout.width))
             {
                 port.RegisterCallback <GeometryChangedEvent>(UpdatePortInput);
             }
             else
             {
                 SetPortInputPosition(port, portInputView);
             }
         }
     }
 }
Exemplo n.º 3
0
 void SetPortInputPosition(LogicPort port, PortInputView inputView)
 {
     inputView.style.top           = port.layout.y;
     inputView.parent.style.height = inputContainer.layout.height;
 }