Exemplo n.º 1
0
        private void _DoLoadingThread(ProgressForm progressForm, Object var)
        {
            //// Single Player/Standard data files ////
            progressForm.SetCurrentItemText("Loading File Manager...");
            _fileManager = new FileManager(Config.HglDir);
            //_fileManager = new FileManager(Config.HglDir, FileManager.ClientVersions.Mod);

            foreach (PackFile file in _fileManager.IndexFiles) file.BeginDatReading();
            progressForm.SetCurrentItemText("Loading Excel and Strings Tables...");
            if (!_fileManager.LoadTableFiles())
            {
                MessageBox.Show("Failed to load excel and strings files!", "Data Table Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            foreach (PackFile file in _fileManager.IndexFiles) file.EndDatAccess();

            if (_fileManager.IsVersionMod) _fileManager.ProcessTables();

            if (!Config.LoadTCv4DataFiles) return;

            //// TCv4 data files ////
            progressForm.SetCurrentItemText("Loading TCv4 File Manager...");
            _fileManagerTCv4 = new FileManager(Config.HglDir, FileManager.ClientVersions.TestCenter);

            foreach (PackFile file in _fileManagerTCv4.IndexFiles) file.BeginDatReading();
            progressForm.SetCurrentItemText("Loading TCv4 Excel and Strings Tables...");
            if (!_fileManagerTCv4.LoadTableFiles())
            {
                MessageBox.Show("Failed to load TCv4 excel and strings files!", "Data Table Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            foreach (PackFile file in _fileManagerTCv4.IndexFiles) file.EndDatAccess();
        }