示例#1
0
        /// <summary>
        /// Loads the face from the specified Xml element.
        /// </summary>
        /// <param name="el">The source Xml element.</param>
        /// <param name="currentFileName">Name of the current file.</param>
        public void Load(XmlElement el, string currentFileName)
        {
            foreach (XmlElement child in el.ChildNodes.OfType <XmlElement>())
            {
                switch (child.Name)
                {
                case "background":
                    this.Background.Load(child, currentFileName); break;

                case "size":
                    this.Size.Load(child, currentFileName); break;

                case "control":
                    this.Controls.Add(GuiControl.Load(Game, child, currentFileName)); break;
                }
            }
        }