Exemplo n.º 1
0
        public CallNodeModel ExpandChild(int nodeIndex)
        {
            CallTree.EnsureLazyChildren();

            foreach (CallNodeModel child in CallTree.Children)
            {
                if (child.CallRecordIndex == nodeIndex)
                {
                    child.IsExpanded = true;
                    return(child);
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        public CallNodeModel GetNodeModel(int nodeIndex)
        {
            CallTree.EnsureLazyChildren();
            var parentIndexes = Frame.GetNodeParentIndexes(nodeIndex, 0).Reverse().ToList();
            // Fist node is not a CallNodeModel
            var currNode = CallTree.Children.Cast <CallNodeModel>().
                           FirstOrDefault(c => c.CallRecordIndex == parentIndexes.First());

            if (currNode == null)
            {
                return(null);
            }
            foreach (var parentIndex in parentIndexes.Skip(1))
            {
                currNode = currNode.GetChild(parentIndex);
            }

            return(currNode.GetChild(nodeIndex));
        }