예제 #1
0
        private void removeLODSettings(MeType gameId)
        {
            enableGameDataMenu(false);
            GameData gameData = new GameData(gameId, _configIni);
            string   path     = gameData.EngineConfigIniPath;
            bool     exist    = File.Exists(path);

            if (exist)
            {
                ConfIni engineConf = new ConfIni(path);
                LODSettings.removeLOD(gameId, engineConf);
                MessageBox.Show("INFO: Game configuration file at " + path + " updated.");
            }
            else
            {
                MessageBox.Show("INFO: Game configuration file at " + path + " not exist, nothing done.");
            }
            enableGameDataMenu(true);
        }
예제 #2
0
        void updateMEConfig(MeType gameId)
        {
            enableGameDataMenu(false);
            string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
                                       Assembly.GetExecutingAssembly().GetName().Name);

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            string filename = Path.Combine(path, "me" + (int)gameId + "map.bin");

            if (!File.Exists(filename))
            {
                MessageBox.Show("Unable to update LOD settings.\nYou must scan your game using Texture Manager first always!");
                enableGameDataMenu(true);
                return;
            }
            GameData gameData = new GameData(gameId, _configIni);

            path = gameData.EngineConfigIniPath;
            bool exist = File.Exists(path);

            if (!exist)
            {
                if (gameId == MeType.ME1_TYPE)
                {
                    MessageBox.Show("Missing game configuration file.\nYou need atleast once launch the game first.");
                }
                Directory.CreateDirectory(Path.GetDirectoryName(path));
            }
            ConfIni engineConf = new ConfIni(path);

            LODSettings.removeLOD(gameId, engineConf);
            LODSettings.updateLOD(gameId, engineConf);
            MessageBox.Show("Game configuration file at " + path + " updated.");
            enableGameDataMenu(true);
        }