コード例 #1
0
        private void loadDiverates(XmlNode DiveratesNodes)
        {
            foreach (XmlNode Diveratenode in DiveratesNodes)
            {
                TalentDeviate diverate;
                String        TalentName = "";
                int           Value      = 0;

                foreach (XmlNode node in Diveratenode)
                {
                    switch (node.Name)
                    {
                    case ManagmentXMLStrings.TalentElement:    TalentName = node.InnerText; break;

                    case ManagmentXMLStrings.Value:            int x; Int32.TryParse(node.InnerText, out x); Value = x;; break;
                    }
                }
                diverate = new TalentDeviate(TalentName, Value);
                this.diverates.Add(diverate);
            }
        }