private void GroupRemoved(object sender, TransparentContainer <Group> .ElementEventArgs <Group> e) { foreach (var p in e.Element.Content) { PatternRemoved(sender, new TransparentContainer <Pattern> .ElementEventArgs <Pattern>(p)); } Nodes.Remove(nodeMap[e.Element]); e.Element.ElementAdded -= PatternAdded; e.Element.ElementRemoved -= PatternRemoved; }
private void GroupAdded(object sender, TransparentContainer <Group> .ElementEventArgs <Group> e) { AddNode(nodeMap[e.Element.Project], e.Element, e.Element.Name, 1); e.Element.ElementAdded += PatternAdded; e.Element.ElementRemoved += PatternRemoved; foreach (var p in e.Element.Content) { PatternAdded(sender, new TransparentContainer <Pattern> .ElementEventArgs <Pattern>(p)); } }
private void PatternRemoved(object sender, TransparentContainer <Pattern> .ElementEventArgs <Pattern> e) { Nodes.Remove(nodeMap[e.Element]); }
private void PatternAdded(object sender, TransparentContainer <Pattern> .ElementEventArgs <Pattern> e) { AddNode(nodeMap[e.Element.Group], e.Element, e.Element.Name, 2); }