Пример #1
0
        private void UpdateObjectList()
        {
            _view.tagView.Items.Clear();

            foreach (TagListEntry entry in _map.Tables.Tags.TagList)
            {
                TreeViewItem item = new TreeViewItem();

                foreach (ObjectListEntry objectEntry in _map.Tables.Objects.ObjectList)
                {
                    if (objectEntry.ObjectTag == entry)
                    {
                        TreeViewItem objectItem = new TreeViewItem();
                        objectItem.Header = "0x" + HaloMap.ToHex(objectEntry.Offset);
                        item.Items.Add(objectItem);
                    }
                }

                item.Header = entry.Tags[0].TagName;

                if (item.Items.Count > 0)
                {
                    item.Header += " (" + item.Items.Count + ")";
                }
                item.IsExpanded = false;
                _view.tagView.Items.Add(item);
            }
        }
Пример #2
0
        private void UpdateData()
        {
            _view.Title      = "Soffish - " + _map.Header.MapName;
            IsVisible        = Visibility.Visible;
            MapName          = _map.Header.MapName;
            BuildVersion     = _map.Header.BuildVersion;
            TagAmount        = _map.Tables.TagList.Count;
            ObjectAmount     = _map.Tables.ObjectList.Count;
            ScenarioName     = _map.Header.ScenarioName;
            Type             = _map.Header.Type.ToString();
            XDKVersion       = _map.Header.XDKVersion;
            MapMagic         = "0x" + HaloMap.ToHex(_map.Header.MapMagic);
            IndexOffset      = "0x" + HaloMap.ToHex(_map.Header.IndexOffset);
            MetaDataOffset   = "0x" + HaloMap.ToHex(_map.Header.MetaDataOffset);
            IndexOffsetMagic = "0x" + HaloMap.ToHex(_map.Header.IndexOffsetMagic);

            // Update all binding properties
            OnPropertyChanged(null);

            UpdateObjectList();
        }