//read the games config file and load the assets /// <param name="directory"> directory to load game assets from</param> public void LoadAssets(string directory) { IniParser.FileIniDataParser parser = new IniParser.FileIniDataParser(); IniParser.Model.IniData configData = parser.ReadFile(directory); IniParser.Model.KeyDataCollection gameInfo = configData[assetSection]; string teamName = gameInfo.GetKeyData(teamSection).Value; string gameName = gameInfo.GetKeyData(nameSection).Value; }
/// <summary> /// Parse the team name, game name, etc, out of a given config file using the IniParser. /// </summary> /// <param name="configFilePath"></param> /// <returns></returns> private string GetParameterFromConfig(string param, string configFilePath) { IniParser.FileIniDataParser parser = new IniParser.FileIniDataParser(); IniParser.Model.IniData configData = parser.ReadFile(configFilePath); IniParser.Model.KeyDataCollection gameInfo = configData[gameInfoSection]; return(gameInfo.GetKeyData(param).Value); }