예제 #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;
        }
예제 #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;
        }
예제 #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);
            }
        }
예제 #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);
        }
예제 #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));
        }
예제 #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));
        }
예제 #7
0
 public AddLinkAction(SlotInfo slotInfo, NodeInfo nodeInfo)
 {
     SlotInfo = slotInfo;
     NodeInfo = nodeInfo;
 }
예제 #8
0
 public AddLinkAction(SlotInfo slotInfo, NodeInfo nodeInfo)
 {
     SlotInfo = slotInfo;
     NodeInfo = nodeInfo;
 }