Ejemplo n.º 1
0
        private void ShowDBCFile(string path)
        {
            selectedDbcFile = new DBCFile(path);

            DataGridView view  = UI_DBCTable;
            DBCFile      file  = selectedDbcFile;
            DBCTable     table = file.Table;

            // Reset
            view.Columns.Clear();

            for (int i = 0; i < table.getColumnCount(); i++)
            {
                view.Columns.Add(table.getColumnName(i), table.getColumnName(i));
            }

            foreach (DBCRecord record in table.getRecords())
            {
                view.Rows.Add(record.getValues());
            }
        }
Ejemplo n.º 2
0
        public override void parse()
        {
            if (readUInt32() != MAGIC)
                throw new Exception("Invalid DBC file format!");

            Header = readHeader();

            // Locate string data before processing.
            int preSeek = seek;
            skip((int)(Header.RecordCount * Header.RecordSize));
            stringRefOffset = seek;
            seekPosition(preSeek);

            Table = getTable(Path.GetFileNameWithoutExtension(BaseName));
        }