/// <summary> /// abre as paginas que estao no xml /// </summary> /// <param name="FilePath">nome do xml de paginas</param> public void LoadPages(string FilePath) { Pages = new SitePageCollection(); XmlDocument PagesDoc = new XmlDocument(); //PagesDoc.Load(FilePath); PagesDoc.Load(FilePath); XmlNode PagesNode = PagesDoc.FirstChild.NextSibling; for (int i = 0; i < PagesNode.ChildNodes.Count; i++) { SitePage Pg = new SitePage(); Pg.PageName = PagesNode.ChildNodes[i].Attributes.GetNamedItem("nome").Value; Pages.Add(Pg); } }
/// <summary> /// Adiciona paginas a colection /// </summary> /// <param name="NewItem">Nova pagina</param> public virtual void Add(SitePage NewItem) { this.List.Add(NewItem); }