Ejemplo n.º 1
0
 public FocusFrameEventArgs(RoutedEvent routedEvent, Data.Frame frame, Data.EventNode node = null, ITick tick = null)
     : base(routedEvent)
 {
     Frame = frame;
     Node  = node;
     Tick  = tick;
 }
Ejemplo n.º 2
0
        private void BuildTree(List <Entry> entries)
        {
            if (entries.Count == 0)
            {
                return;
            }

            Stack <EventNode> curNodes = new Stack <EventNode>();

            curNodes.Push(this);
            depth = curNodes.Count;

            foreach (var entry in entries)
            {
                if (entry.Start == entry.Finish)
                {
                    continue;
                }

                while (entry.Start >= curNodes.Peek().Entry.Finish)
                {
                    curNodes.Pop();
                }

                EventNode node = new EventNode(this, entry);

                curNodes.Peek().AddChild(node);
                curNodes.Push(node);
                depth = Math.Max(depth, curNodes.Count);
            }

            while (curNodes.Count > 0)
            {
                curNodes.Pop();
            }
        }
Ejemplo n.º 3
0
        public void ApplyTags(List <Tag> toAdd, ref int index)
        {
            if (index < toAdd.Count && toAdd[index].Start < Entry.Start)
            {
                ++index;
            }

            if (index < toAdd.Count && Entry.IsValid && Entry.Finish < toAdd[index].Start)
            {
                return;
            }

            for (int i = 0; i < Children.Count; ++i)
            {
                EventNode child = Children[i] as EventNode;
                while (index < toAdd.Count && toAdd[index].Start < child.Entry.Start)
                {
                    if (tags == null)
                    {
                        tags = new List <Tag>();
                    }
                    tags.Add(toAdd[index++]);
                }

                child.ApplyTags(toAdd, ref index);
            }

            while (index < toAdd.Count && Entry.IsValid && toAdd[index].Start <= Entry.Finish)
            {
                if (tags == null)
                {
                    tags = new List <Tag>();
                }
                tags.Add(toAdd[index++]);
            }
        }
Ejemplo n.º 4
0
 public EventNode(EventNode root, Entry entry)
     : base(root, entry.Description, entry.Duration)
 {
     Entry = entry;
 }
Ejemplo n.º 5
0
 public EventNode(EventNode root, Entry entry)
     : base(root, entry.Description, entry.Duration)
 {
     Entry = entry;
     Tags  = new List <Tag>();
 }