Exemple #1
0
        void titleToolStripTextBox_Validated(object sender, EventArgs e)
        {
            SdsiteXmlDocument      doc = Service.Sdsite.CurrentDocument;
            PageSimpleExXmlElement ele = doc.GetPageElementById(_htmlDesigner.PageId);

            ele.Title = titleToolStripTextBox.Text;
            doc.Save();

            PageXmlDocument pageDoc = doc.GetPageDocumentById(_htmlDesigner.PageId);

            pageDoc.Title = titleToolStripTextBox.Text;
            pageDoc.Save();
        }
Exemple #2
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();
        }