Beispiel #1
0
        public override int OnCalculateSize(bool force)
        {
            int size = 16;

            foreach (GCTCodeEntryNode n in Children)
            {
                size += n._lines.Length * 8;
            }
            if (_writeInfo)
            {
                _stringTable = new CompactStringTable();
                _stringTable.Add(_name);
                if (!String.IsNullOrEmpty(_gameName))
                {
                    _stringTable.Add(_gameName);
                }

                size += 12;
                foreach (GCTCodeEntryNode n in Children)
                {
                    size += 16;
                    _stringTable.Add(n._name);
                    if (!String.IsNullOrEmpty(n._description))
                    {
                        _stringTable.Add(n._description);
                    }
                }
                size += _stringTable.TotalSize;
            }
            return(size);
        }