示例#1
0
 public void ParseRomId()
 {
     CarInfo.Clear();
     foreach (XElement element in xRomId.Elements())
     {
         CarInfo.Add(element.Name.ToString(), element.Value.ToString());
     }
     if (CarInfo.ContainsKey("internalidstring"))
     {
         internalId = CarInfo["internalidstring"];
     }
     if (CarInfo.ContainsKey("internalidaddress"))
     {
         internalIdAddress = int.Parse(CarInfo["internalidaddress"], System.Globalization.NumberStyles.AllowHexSpecifier);
     }
     if (CarInfo.ContainsKey("xmlid"))
     {
         if (CarInfo["xmlid"].Contains("BASE"))
         {
             internalId = CarInfo["xmlid"].ToString();
         }
     }
 }