Esempio n. 1
0
        /// <summary>
        /// 设为首页
        /// </summary>
        /// <param name="myTree"></param>
        internal void SetAsIndexPage()
        {
            ///先将之前的默认页的Node的字体恢复普通
            PageNode defaultPageNode = ((ChannelFolderNode)this.CurrentNode.Parent).GetDefaultPageNode();

            if (defaultPageNode != null)
            {
                defaultPageNode.NodeFont = null;
            }

            ///将当前选择的页面的Node加粗
            CurrentNode.BoldFont();

            ///设置默认页
            SdsiteXmlDocument doc       = Service.Sdsite.CurrentDocument;
            FolderXmlElement  folderEle = ((BaseFolderElementNode)CurrentNode.Parent).Element;
            string            pageID    = ((PageNode)CurrentNode).Element.Id;

            folderEle.DefaultPageId = pageID;
            doc.Save();
        }