Beispiel #1
0
 public void ReadXml(XmlReader reader)
 {
     ressource = new Ressource();
     if (reader.ReadToDescendant("HoldedRessource"))
     {
         while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "HoldedRessource")
         {
             ressource.ReadXml(reader);
         }
     }
     reader.Read();
 }
Beispiel #2
0
 public void ReadXml(XmlReader reader)
 {
     timeToProduce           = Convert.ToInt32(reader["Speed"]);
     timeSinceLastProduction = Convert.ToInt32(reader["LastProd"]);
     ressource = new Ressource();
     if (reader.ReadToDescendant("GeneratedRessource"))
     {
         while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "GeneratedRessource")
         {
             ressource.ReadXml(reader);
         }
     }
     reader.Read();
 }