Exemplo n.º 1
0
        public static SlotInfo From(NodeInfo nodeInfo, Slot slot)
        {
            SlotInfo slotInfo;

            if (!slotInfos.TryGetValue(slot, out slotInfo))
                slotInfos.Add(slot, slotInfo = new SlotInfo(nodeInfo, slot));

            return slotInfo;
        }
Exemplo n.º 2
0
        private LinkInfo(NodeInfo nodeInfo, Slot slot, Node node)
        {
            Slot     = slot;
            SlotInfo = SlotInfo.From(nodeInfo, slot);
            SlotInfo.PropertyChanged += SlotInfo_PropertyChanged;

            Node     = node;
            NodeInfo = NodeInfo.From(nodeInfo.FlowInfo, node);
            NodeInfo.PropertyChanged += NodeInfo_PropertyChanged;
        }
Exemplo n.º 3
0
        private void Slot_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Border           border           = sender as Border;
            ContentPresenter contentPresenter = VisualTreeHelper.GetParent(border) as ContentPresenter;
            SlotInfo         slotInfo         = Slots.ItemContainerGenerator.ItemFromContainer(contentPresenter) as SlotInfo;

            if (SlotMouseDown != null)
            {
                SlotMouseDown(slotInfo, e);
            }
        }
Exemplo n.º 4
0
        public static SlotInfo From(NodeInfo nodeInfo, Slot slot)
        {
            SlotInfo slotInfo;

            if (!slotInfos.TryGetValue(slot, out slotInfo))
            {
                slotInfos.Add(slot, slotInfo = new SlotInfo(nodeInfo, slot));
            }

            return(slotInfo);
        }
Exemplo n.º 5
0
        private void NodeControl_SlotMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton == MouseButtonState.Released || Keyboard.IsKeyDown(Key.Space))
            {
                return;
            }

            SlotInfo slotInfo = sender as SlotInfo;

            Border border = e.OriginalSource as Border;
            Anchor anchor = VisualTreeHelper.GetChild(border, 0) as Anchor;

            newLinkSlot = slotInfo;

            SourceAnchorBinder.Anchor      = anchor;
            DestinationAnchorBinder.Anchor = anchor;

            creatingNewLink = true;

            NotifyPropertyChanged(nameof(SourceAnchorBinder));
            NotifyPropertyChanged(nameof(DestinationAnchorBinder));
            NotifyPropertyChanged(nameof(NewLinkVisibility));
        }
Exemplo n.º 6
0
        private void NodeControl_SlotMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton == MouseButtonState.Released || Keyboard.IsKeyDown(Key.Space))
                return;

            SlotInfo slotInfo = sender as SlotInfo;

            Border border = e.OriginalSource as Border;
            Anchor anchor = VisualTreeHelper.GetChild(border, 0) as Anchor;

            newLinkSlot = slotInfo;

            SourceAnchorBinder.Anchor = anchor;
            DestinationAnchorBinder.Anchor = anchor;

            creatingNewLink = true;

            NotifyPropertyChanged(nameof(SourceAnchorBinder));
            NotifyPropertyChanged(nameof(DestinationAnchorBinder));
            NotifyPropertyChanged(nameof(NewLinkVisibility));
        }
Exemplo n.º 7
0
 public AddLinkAction(SlotInfo slotInfo, NodeInfo nodeInfo)
 {
     SlotInfo = slotInfo;
     NodeInfo = nodeInfo;
 }
Exemplo n.º 8
0
 public AddLinkAction(SlotInfo slotInfo, NodeInfo nodeInfo)
 {
     SlotInfo = slotInfo;
     NodeInfo = nodeInfo;
 }