/* #region BOTS_PMCWAR * private void LoadBotsPmcWarSettings() * { * if (!ErrorHandler.isError(102)) * { * PmcWarEnabled.IsChecked = serverSettings.GetBotsPmcWarEnabled(); * PmcWarUsecChance.Text = serverSettings.GetBotsPmcWarUsecChance(); * } * } * * private void OnChangePmcWarEnabled(object sender, RoutedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsPmcWarEnabled((bool)PmcWarEnabled.IsChecked); * } * * private void OnChangePmcWarUsecChance(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsPmcWarUsecChance(PmcWarUsecChance.Text); * } #endregion * #region BOTS_LIMIT * private void LoadBotsLimitSettings() * { * if (!ErrorHandler.isError(102)) * { * LimitKilla.Text = serverSettings.GetBotsLimitKilla(); * LimitBully.Text = serverSettings.GetBotsLimitBully(); * LimitBullyFollowers.Text = serverSettings.GetBotsLimitBullyFollowers(); * LimitMarksman.Text = serverSettings.GetBotsLimitMarksman(); * LimitPmcBot.Text = serverSettings.GetBotsLimitPmcBot(); * LimitScav.Text = serverSettings.GetBotsLimitScav(); * } * } * * private void OnChangeLimitKilla(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitKilla(LimitKilla.Text); * } * * private void OnChangeLimitBully(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitBully(LimitBully.Text); * } * * private void OnChangeLimitBullyFollower(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitBullyFollowers(LimitBullyFollowers.Text); * } * * private void OnChangeLimitMarksman(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitMarksman(LimitMarksman.Text); * } * * private void OnChangeLimitPmcBot(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitPmcBot(LimitPmcBot.Text); * } * * private void OnChangeLimitScav(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsLimitScav(LimitScav.Text); * } #endregion * #region BOTS_SPAWN * private void LoadBotsSpawnSettings() * { * if (!ErrorHandler.isError(102)) * { * SpawnGlasses.Text = serverSettings.GetBotsSpawnGlasses(); * SpawnFaceCover.Text = serverSettings.GetBotsSpawnFaceCover(); * SpawnHeadwear.Text = serverSettings.GetBotsSpawnHeadwear(); * SpawnBackpack.Text = serverSettings.GetBotsSpawnBackpack(); * SpawnArmorVest.Text = serverSettings.GetBotsSpawnArmorVest(); * SpawnMedPocket.Text = serverSettings.GetBotsSpawnMedPocket(); * SpawnItemPocket.Text = serverSettings.GetBotsSpawnItemPocket(); * } * } * * private void OnChangeSpawnGlasses(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnGlasses(SpawnGlasses.Text); * } * * private void OnChangeSpawnFaceCover(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnFaceCover(SpawnFaceCover.Text); * } * * private void OnChangeSpawnHeadwear(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnHeadwear(SpawnHeadwear.Text); * } * * private void OnChangeSpawnBackpack(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnBackpack(SpawnBackpack.Text); * } * * private void OnChangeSpawnArmorVest(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnArmorVest(SpawnArmorVest.Text); * } * * private void OnChangeSpawnMedsPocket(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnMedPocket(SpawnMedPocket.Text); * } * * private void OnChangeSpawnItemPocket(object sender, TextChangedEventArgs e) * { * if (!ErrorHandler.isError(102)) * serverSettings.SetBotsSpawnItemPocket(SpawnItemPocket.Text); * } #endregion */ #endregion #region LAUNCHER_SETTINGS private void LoadLauncherSettings() { // reload config files LoadAllSettings(); // load the settings //load locations ClientLocation.Text = laucherSettings.GetClientLocation(); ServerLocation.Text = laucherSettings.GetServerLocation(); ScreenMode.SelectedIndex = laucherSettings.GetScreenMode(); //load filenames ClientFileName.Text = laucherSettings.GetClientFilename(); ServerFileName.Text = laucherSettings.GetServerFilename(); }
private void LoadAllSettings() { laucherSettings = new LauncherSettings(); BackendIP.Text = laucherSettings.LoadIP(); Port.Text = laucherSettings.LoadPort(); ScreenMode.SelectedIndex = laucherSettings.GetScreenMode(); //replace names if no error exist for client and server if (!ErrorHandler.isError(101)) { clientWatcher.ChangeAppName(laucherSettings.GetClientFilename()); } if (!ErrorHandler.isError(102)) { serverWatcher.ChangeAppName(laucherSettings.GetServerFilename()); serverSettings = new ServerSettings(laucherSettings.GetServerLocation() + @"\"); ProfileSettings = new ProfileSettings(laucherSettings.GetServerLocation() + @"\data\profiles"); } }