Ejemplo n.º 1
0
        private void Init(FrameHeader header, List <Entry> entries, FrameGroup group)
        {
            Header     = header;
            Group      = group;
            Categories = new List <Entry>();

            Entries = entries;
            foreach (Entry entry in entries)
            {
                if (entry.Description.Color.A != 0)
                {
                    Categories.Add(entry);
                }
            }

            categoriesTree = new EventTree(this, Categories);

            root  = new EventTree(this, Entries);
            board = new Board <EventBoardItem, EventDescription, EventNode>(root);

            Synchronization = new List <SyncInterval>();
            FiberSync       = new List <FiberSyncInterval>();

            IsLoaded = true;
        }
Ejemplo n.º 2
0
        protected void ReadInternal(BinaryReader reader)
        {
            Header         = FrameHeader.Read(reader);
            Categories     = ReadEventList(reader, DescriptionBoard);
            CategoriesTree = new EventTree(this, Categories);

            Synchronization = new List <SyncInterval>();
            FiberSync       = new List <FiberSyncInterval>();
        }
Ejemplo n.º 3
0
        public void MergeWith(EventFrame frame)
        {
            Categories.AddRange(frame.Categories);
            Categories.Sort();

            Entries.AddRange(frame.Entries);
            Entries.Sort();

            root  = new EventTree(this, Entries);
            board = new Board <EventBoardItem, EventDescription, EventNode>(root);

            CategoriesTree = new EventTree(this, Categories);
        }
Ejemplo n.º 4
0
        public override void Load()
        {
            lock (loading)
            {
                if (!IsLoaded)
                {
                    entries = ReadEventList(reader, DescriptionBoard);

                    root  = new EventTree(this, entries);
                    board = new Board <EventBoardItem, EventDescription, EventNode>(root);

                    reader   = null;
                    IsLoaded = true;
                }
            }
        }
Ejemplo n.º 5
0
        protected void ReadInternal(BinaryReader reader)
        {
            Header         = FrameHeader.Read(reader);
            Categories     = ReadEventList(reader, DescriptionBoard);
            CategoriesTree = new EventTree(this, Categories);

            Synchronization = ReadEventTimeList(reader);
            Synchronization.Sort();
            Synchronization = LinearizeEventList(Synchronization);

            SynchronizationDuration = 0.0;
            foreach (EventData interval in Synchronization)
            {
                SynchronizationDuration += interval.Duration;
            }
        }
Ejemplo n.º 6
0
        private void LazyLoad()
        {
            lock (loading)
            {
                if (tags == null)
                {
                    tags = new List <Tag>();
                    if (Header.ThreadIndex != -1 && Group.Threads[Header.ThreadIndex].TagsPack != null)
                    {
                        Utils.ForEachInsideIntervalStrict(Group.Threads[Header.ThreadIndex].TagsPack.Tags, Header, tag => { tags.Add(tag); });
                    }
                }

                if (root == null)
                {
                    root = new EventTree(this, Entries);
                    root.BuildTags(tags);
                }
            }
        }
Ejemplo n.º 7
0
 public override void Clear()
 {
     Parent = null;
     if (null != root)
     {
         root.Clear();
         root = null;
     }
     if (null != categoriesTree)
     {
         categoriesTree.Clear();
         categoriesTree = null;
     }
     if (null != tags)
     {
         tags.Clear();
         tags = null;
     }
     if (null != Entries)
     {
         foreach (var entry in Entries)
         {
             entry.Clear();
         }
         Entries = null;
     }
     if (null != Categories)
     {
         foreach (var category in Categories)
         {
             category.Clear();
         }
         Categories = null;
     }
     Group = null;
 }