Example #1
0
        public PageInfo(PageSectionInfo parent)
        {
            if (parent == null)
                throw new ArgumentNullException("parent");

            _parent = parent;
        }
Example #2
0
        public PageInfo(XmlNode xmlNode, PageSectionInfo parent)
            : this(parent)
        {
            ReadXmlAttributes(xmlNode);
            ReadChilds(xmlNode);

            _isNew = false;
        }
Example #3
0
        public Boolean CreateSection(String name, String theme)
        {
            Boolean isCreated = false;

            if (!IsNew)
            {
                PageSectionInfo section = new PageSectionInfo(this);

                if (section.SetName(name) && (String.IsNullOrEmpty(theme) || section.SetTheme(theme)))
                {
                    _sections.Add(section);

                    isCreated = true;
                }
            }

            return isCreated;
        }
Example #4
0
 public PageInfo(Int32 id, PageSectionInfo parent)
     : this(parent)
 {
     _id = id;
     _isNew = true;
 }
Example #5
0
 private static String GetFullName(PageSectionInfo section, String name)
 {
     return section.FullName + "." + name;
 }
Example #6
0
        public Boolean CanMoveTo(PageSectionInfo section)
        {
            PageInfo existsPage = PageManager.Current.FindPage(GetFullName(section, _name));

            return !IsNew && (existsPage == null || this.ID == existsPage.ID);
        }