public MainForm() { InitializeComponent(); try { new GameInstallationInfo(); } catch (AutoException) { MessageBox.Show("The game could not be found on your computer! Please select your game executable.", "Error: Game not found!", MessageBoxButtons.OK, MessageBoxIcon.Error); string gamePath = GetGamePath(); if (gamePath == null || gamePath == "") { //If the game path was not found, we skip all initialisation this.Visible = false; this.Close(); return; } new GameInstallationInfo(gamePath); } m_sectorManager = new SectorManager(); }
public SEConfigTool() { InitializeComponent(); m_numberFormatInfo = CultureInfo.GetCultureInfo("EN-US").NumberFormat; m_decimalSeparator = m_numberFormatInfo.CurrencyDecimalSeparator; m_groupSeparator = m_numberFormatInfo.NumberGroupSeparator; m_negativeSign = m_numberFormatInfo.NegativeSign; //Determine wether or not we could find the game installation try { new GameInstallationInfo(); } catch (AutoException) { string gamePath = GetGamePath(); if (gamePath == null || gamePath == "") { //If the game path was not found, we skip all initialisation this.Visible = false; return; } new GameInstallationInfo(gamePath); } m_sectorManager = new SectorManager(); m_blockDefinitionsManager = new BlocksManager(GetContentDataFile("CubeBlocks.sbc")); m_ammoMagazinesDefinitionsManager = new AmmoMagazinesDefinitionsManager(); m_containerTypesDefinitionsManager = new ContainerTypesDefinitionsManager(); m_globalEventsDefinitionsManager = new GlobalEventsDefinitionsManager(); m_spawnGroupsDefinitionsManager = new SpawnGroupsDefinitionsManager(); m_physicalItemsDefinitionsManager = new PhysicalItemDefinitionsManager(); m_componentsDefinitionsManager = new ComponentDefinitionsManager(); m_blueprintsDefinitionsManager = new BlueprintDefinitionsManager(); m_voxelMaterialsDefinitionsManager = new VoxelMaterialDefinitionsManager(); m_scenariosDefinitionManager = new ScenariosDefinitionsManager(); m_transparentMaterialsDefinitionManager = new TransparentMaterialsDefinitionManager(); m_configurationDefinitionManager = new ConfigurationDefinition(); m_environmentDefinitionManager = new EnvironmentDefinition(); m_handItemsDefinitionManager = new HandItemsDefinitionManager(); }