/*! \brief This fonction load a molecule \param node The xml node to parse \param type The molecule type \param molecules The array of molecules where to add new molecules \return Return always true */ private bool storeMolecule(XmlNode node, Molecule.eType type, ArrayList molecules) { Molecule mol = new Molecule(); mol.setType(type); foreach (XmlNode attr in node) { switch (attr.Name) { case "name": mol.setName(attr.InnerText); break; case "description": mol.setDescription(attr.InnerText); break; case "concentration": mol.setConcentration(float.Parse(attr.InnerText.Replace(",", "."))); break; case "degradationRate": mol.setDegradationRate(float.Parse(attr.InnerText.Replace(",", "."))); break; case "FickFactor": mol.setFickFactor(float.Parse(attr.InnerText.Replace(",", "."))); break; } } molecules.Add(mol); return true; }