Пример #1
0
        public GGPackExplorerWindow(GGPack pack)
            : base("GGPack Explorer")
        {
            Width = Dim.Fill();
            Y = 1;
            Height = Dim.Fill();

            _pack = pack;

            var entries = _pack.Entries.Select(e => e.Name).ToList();
            _listViewEntries = new ListView(entries)
            {
                Width = Dim.Percent(50),
                Height = Dim.Fill()
            };
            _detailView = new TextView
            {
                X = Pos.Percent(50),
                Width = Dim.Fill(),
                Height = Dim.Fill(),
                Text = string.Empty,
            };
            _listViewEntries.SelectedChanged += OnSelectedChanged;
            Add(_listViewEntries, _detailView);
            OnSelectedChanged();
        }
Пример #2
0
 public GGPackHelper(Stream stream)
 {
     _reader = new GGBinaryReader(new BinaryReader(stream));
     _pack   = _reader.ReadPack();
 }