private void ParseINI(string[] iniFile, string romCode)
{
bool getValues = false;
foreach (string s in iniFile)
{
if (s.Equals("[" + romCode + "]"))
{
getValues = true;
continue;
}
if (getValues)
{
if (s.Equals(@"[/" + romCode + "]"))
{
break;
}
else
{
uint value = 0;
bool success = UInt32.TryParse(s.Split('=')[1], out value);
if (!success)
{
success = UInt32.TryParse(ToDecimal(s.Split('=')[1]), out value);
if (!success)
{
MessageBox.Show("Error parsing the move keyword value from the main ini. Are you sure it is formatted correctly as a number?");
}
}
keywords.Add(s.Split('=')[0].ToUpper(), value);
}
}
}
}