/// <summary> /// Get an address from the XML file with the associated ID. /// </summary> /// <param name="identifer"></param> /// <returns></returns> public static int GetAddress(string identifer) { if (xml != null) { const string prefix = "0x"; string RawString = xml.GetString(identifer); string value = RawString.Replace(prefix, ""); //Check US XML if the value is null in the other region's XML if (value == "" && currentRegion != (int)RegionId.Region.USA) { int tempRegion = currentRegion; currentRegion = (int)RegionId.Region.USA; value = new XMLManager(folderLocation + XMLFileName).GetString(identifer).Replace(prefix, ""); currentRegion = tempRegion; } return((value == "") ? nullAddress : Convert.ToInt32(value, 16)); } else { throw new Exception("Run \"SetupRegion\" first."); } }
/// <summary> /// Get a string from the XML file with the associated ID. /// </summary> /// <param name="identifer"></param> /// <returns></returns> public static string GetString(string identifer) { return(xml.GetString(identifer)); }