Exemplo n.º 1
0
        private void ReadBorn(XmlElement xml)
        {
            XmlNodeList bornList = XmlRead.GetList(xml, "born_pos");

            m_dicBornData.Clear();
            foreach (XmlNode node in bornList)
            {
                XmlElement ele   = node as XmlElement;
                BornData   pBorn = DataBase.CreateInstance <BornData>();
                pBorn.FromXml(ele);
                int team = 0;
                XmlRead.Attr(ele, "team", ref team);
                if (m_dicBornData.ContainsKey(team))
                {
                    m_dicBornData[team].Add(pBorn);
                }
                else
                {
                    m_dicBornData[team] = new List <BornData>()
                    {
                        pBorn
                    };
                }
            }
        }
Exemplo n.º 2
0
        private void ReadMapCell(XmlElement xml, string name, List <MapCellData> list)
        {
            XmlNodeList xmlList = XmlRead.GetList(xml, name);

            list.Clear();
            foreach (XmlNode node in xmlList)
            {
                XmlElement  ele   = node as XmlElement;
                MapCellData pData = DataBase.CreateInstance <MapCellData>();
                pData.FromXml(ele);
                list.Add(pData);
            }
        }