コード例 #1
0
 public Building(BuildingSite buildingSite, XmlNode xmlNode)
 {
     BuildingSite = buildingSite;
     foreach (XmlAttribute obj in xmlNode.Attributes)
     {
         if (obj.Name == "Name")
         {
             Name = obj.Value;
         }
     }
     WallTypeList    = new List <WallType>();
     OpeningTypeList = new List <OpeningType>();
     foreach (XmlNode childNode in xmlNode.ChildNodes)
     {
         if (childNode.Name == "WallType")
         {
             WallTypeList.Add(new WallType(this, childNode));
         }
         if (childNode.Name == "OpeningType")
         {
             OpeningTypeList.Add(new OpeningType(this, childNode));
         }
     }
     LevelList = new List <Level>();
     foreach (XmlNode childNode in xmlNode.ChildNodes)
     {
         if (childNode.Name == "Level")
         {
             LevelList.Add(new Level(this, childNode));
         }
     }
 }
コード例 #2
0
 public Building(BuildingSite buildingSite)
 {
     Name            = "Мое здание";
     BuildingSite    = buildingSite;
     LevelList       = new List <Level>();
     WallTypeList    = new List <WallType>();
     OpeningTypeList = new List <OpeningType>();
 }