private static void InitGameData() { using (var fs = new WzFileSystem { BaseDir = Constants.GameDataPath }) { fs.Init(Constants.GameDataPath + @"img\Data"); var sw = new Stopwatch(); sw.Start(); Task.WaitAll(Task.Run(() => { StringData = new StringProvider(fs); }), Task.Run(() => { EquipTemplates = new EquipProvider(fs); }), Task.Run(() => { ItemOptionTemplates = new ItemOptionProvider(fs); }), Task.Run(() => { ItemTemplates = new ItemProvider(fs); }), Task.Run(() => { QuestTemplates = new QuestProvider(fs); }), Task.Run(() => { MobSkillTemplates = new MobSkillProvider(fs); }), Task.Run(() => { SkillTemplates = new SkillProvider(fs); }), Task.Run(() => { ItemMakeTemplates = new ItemMakeProvider(fs); }), Task.Run(() => { CommodityProvider = new CashCommodityProvider(fs); }), Task.Run(() => { PackageProvider = new CashPackageProvider(fs); }), Task.Run(() => { NpcTemplates = new NpcProvider(fs); }), Task.Run(() => { ReactorTemplates = new ReactorProvider(fs); }), Task.Run(() => { MapTemplates = new MapProvider(fs); }), Task.Run(() => { MobTemplates = new MobProvider(fs); }) ); sw.Stop(); Log.Info("Startup seconds elapsed: " + sw.ElapsedMilliseconds / 1000); } }
private void LoadContentsOfFolder(string folder) { if (!Directory.Exists(folder)) { return; } var fs = new WzFileSystem(); fs.Init(folder); BeginTreeUpdate(); LoadContentsSmart(fs); EndTreeUpdate(); AddLastDir(folder); }
private void LoadContentsOfFolder(string folder) { if (folder.EndsWith(".exe")) { LoadMapleInstall(folder); return; } if (!Directory.Exists(folder)) { return; } var fs = new WzFileSystem(); fs.Init(folder); BeginTreeUpdate(); LoadContentsSmart(fs); EndTreeUpdate(); AddLastDir(folder); LoadedFolderPath = folder; openFolderInExplorerToolStripMenuItem.Visible = true; }