static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool debugMode = false; if (System.IO.Directory.Exists(g_RPPDBFolder) == false) { g_RPPDBFolder = g_RPPDBFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); g_RDDBFolder = g_RDDBFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); AddonDatabaseService.g_AddonUploadDataFolder = AddonDatabaseService.g_AddonUploadDataFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); AddonDatabaseService.g_AddonUploadStatsFolder = AddonDatabaseService.g_AddonUploadStatsFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); RPPDatabaseHandler.g_AddonContributionsBackupFolder = RPPDatabaseHandler.g_AddonContributionsBackupFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); RDDatabaseHandler.g_AddonContributionsBackupFolder = RDDatabaseHandler.g_AddonContributionsBackupFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); debugMode = true; } AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit; VF_WoWLauncher.ConsoleUtility.CreateConsole(); //if (debugMode == false) { Console.WriteLine("Waiting for ContributorDB to load"); ContributorDB.Initialize(debugMode); while (ContributorDB.GetMongoDB() == null) { ContributorDB.Initialize(debugMode); System.Threading.Thread.Sleep(100); Console.Write("."); } Console.WriteLine("ContributorDB loaded!"); } //VF_RealmPlayersDatabase.Deprecated.ContributorHandler.Initialize(g_RPPDBFolder + "Database\\"); g_RPPDatabaseHandler = new RPPDatabaseHandler(g_RPPDBFolder); g_RDDatabaseHandler = new RDDatabaseHandler(g_RDDBFolder, g_RPPDatabaseHandler, DatabaseHandlerMode.Disabled); AddonDatabaseService.HandleUnhandledFiles("VF_RealmPlayers"); AddonDatabaseService.HandleUnhandledFiles("VF_RaidDamage"); AddonDatabaseService.HandleUnhandledFiles("VF_RealmPlayersTBC"); AddonDatabaseService.HandleUnhandledFiles("VF_RaidStatsTBC"); try { Application.Run(new MainWindow()); } catch (Exception ex) { Logger.LogException(ex); g_RDDatabaseHandler.Shutdown(); g_RPPDatabaseHandler.Shutdown(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool debugMode = false; if (System.IO.Directory.Exists(g_RPPDBFolder) == false) { g_RPPDBFolder = g_RPPDBFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); g_RDDBFolder = g_RDDBFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); AddonDatabaseService.g_AddonUploadDataFolder = AddonDatabaseService.g_AddonUploadDataFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); AddonDatabaseService.g_AddonUploadStatsFolder = AddonDatabaseService.g_AddonUploadStatsFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); RPPDatabaseHandler.g_AddonContributionsBackupFolder = RPPDatabaseHandler.g_AddonContributionsBackupFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); RDDatabaseHandler.g_AddonContributionsBackupFolder = RDDatabaseHandler.g_AddonContributionsBackupFolder.Replace(VF_RealmPlayersDatabase.Utility.DefaultServerLocation, VF_RealmPlayersDatabase.Utility.DefaultDebugLocation); debugMode = true; } AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit; VF_WoWLauncher.ConsoleUtility.CreateConsole(); /*Some Testing*/ #if false WowRealm[] ALL_REALMS = new WowRealm[] { WowRealm.Kronos, WowRealm.NostalGeek, WowRealm.Al_Akir, WowRealm.Valkyrie, WowRealm.VanillaGaming, WowRealm.Nefarian, WowRealm.Rebirth, WowRealm.Archangel, WowRealm.Nostalrius, WowRealm.NostalriusPVE, WowRealm.Emerald_Dream, WowRealm.Warsong, WowRealm.WarsongTBC }; SQLDatabaseMigration.Migrate(SQLDatabaseMigration.MigrationChoice.TestOnly, ALL_REALMS); #endif /*Some Testing*/ //if (debugMode == false) { Console.WriteLine("Waiting for ContributorDB to load"); ContributorDB.Initialize(debugMode); while (ContributorDB.GetMongoDB() == null) { ContributorDB.Initialize(debugMode); System.Threading.Thread.Sleep(100); Console.Write("."); } Console.WriteLine("ContributorDB loaded!"); } //VF_RealmPlayersDatabase.Deprecated.ContributorHandler.Initialize(g_RPPDBFolder + "Database\\"); g_RPPDatabaseHandler = new RPPDatabaseHandler(g_RPPDBFolder); g_RDDatabaseHandler = new RDDatabaseHandler(g_RDDBFolder, g_RPPDatabaseHandler); AddonDatabaseService.HandleUnhandledFiles("VF_RealmPlayers"); AddonDatabaseService.HandleUnhandledFiles("VF_RaidDamage"); AddonDatabaseService.HandleUnhandledFiles("VF_RealmPlayersTBC"); AddonDatabaseService.HandleUnhandledFiles("VF_RaidStatsTBC"); try { Application.Run(new MainWindow()); } catch (Exception ex) { Logger.LogException(ex); g_RDDatabaseHandler.Shutdown(); g_RPPDatabaseHandler.Shutdown(); } }