void BuildEntryList(List <Entry> entries, SamplingNode node, double offset)
        {
            if (node.Description != null)
            {
                entries.Add(new Entry(new EventDescription(node.NameWithModule), Durable.MsToTick(offset), Durable.MsToTick(offset + node.Duration)));
            }

            offset += node.SelfDuration * 0.5;

            foreach (SamplingNode child in node.Children)
            {
                BuildEntryList(entries, child, offset);
                offset += child.Duration;
            }
        }
        void InitThreadList(SamplingFrame frame)
        {
            Frame = frame;

            List <ThreadRow> rows = new List <ThreadRow>();

            if (frame != null)
            {
                List <Entry> entries = new List <Entry>();

                SamplingNode root = frame.Root;

                BuildEntryList(entries, root, 0.0);

                EventFrame eventFrame = new EventFrame(new FrameHeader()
                {
                    Start = 0, Finish = Durable.MsToTick(root.Duration)
                }, entries, frame.Group);
                ThreadData threadData = new ThreadData(null)
                {
                    Events = new List <EventFrame> {
                        eventFrame
                    }
                };
                EventsThreadRow row = new EventsThreadRow(frame.Group, new ThreadDescription()
                {
                    Name = "Sampling Node"
                }, threadData, Settings);
                row.LimitMaxDepth   = false;
                row.EventNodeHover += Row_EventNodeHover;
                rows.Add(row);
                ThreadViewControl.Scroll.ViewUnit.Width = 1.0;
                ThreadViewControl.InitRows(rows, eventFrame.Header);
            }
            else
            {
                ThreadViewControl.InitRows(rows, null);
            }
        }