public void MoveComponentNode(ComponentNode component, Position2D to)
 {
     if (_componentNodes.Contains(component))
     {
         component.Position = to;
     }
 }
 public ComponentNode AddComponent(IStudioComponent component, Position2D targetPosition)
 {
     if (!_components.Contains(component))
     {
         component = base.AddComponent(component);
         if (component != null)
         {
             var componentNode = new ComponentNode(component)
             {
                 Position = targetPosition
             };
             componentNode.PositionChanged += ComponentNode_PositionChanged;
             _componentNodes.Add(componentNode);
             ComponentNodeAdded?.Invoke(this, componentNode);
             return(componentNode);
         }
     }
     return(null);
 }