Example #1
0
 public override bool Save()
 {
     _pageDoc.PageText = HtmlDesign.PageText;
     //_pageEle.Title = HtmlDesign.ContentTitle;wang
     _pageDoc.Save();
     //_htmldesign.PageText = _pageDoc.PageText;//wm
     return(true);
 }
Example #2
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();
        }
Example #3
0
        /// <summary>
        /// 将窗体值转入xml文件中
        /// </summary>
        public void WritePageTextProp(PageTextPropertyItem property, string PageId)
        {
            PageXmlDocument        doc = Service.Sdsite.CurrentDocument.GetPageDocumentById(PageId) as PageXmlDocument;
            PageSimpleExXmlElement ele = Service.Sdsite.CurrentDocument.GetPageElementById(PageId) as PageSimpleExXmlElement;

            ele.IsModified     = true;
            doc.Title          = property.Title;
            doc.PageTitleAlias = property.TitleAlias;
            doc.PageCreateTime = property.DeliverTime;
            doc.PageSummary    = property.Summary;
            doc.Author         = property.AuthorAlias;
            doc.AuthorAlias    = property.AuthorAlias;
            doc.ModifyAlias    = property.ModifyBy;
            doc.DesignSummary  = property.DesignSummary;

            doc.PageKeywords  = property.tag.ToArray();
            doc.ContentSource = property.ContentSource;

            //                doc.DocumentElement.Attributes["content_source"].Value = property.ContentSource;
            //doc.DocumentElement.Attributes["is_always_pub"].Value = property.IsAlwaysPub.ToString();

            //doc.DocumentElement.Attributes["stop_time"].Value = property.EndPubTime;
            doc.Save();
            Service.Sdsite.CurrentDocument.Save();
            ///写入文章摘要

            /*
             *
             * doc.DocumentElement.Attributes["content_source"].Value = property.ContentSource;
             * doc.DocumentElement.Attributes["is_always_pub"].Value = property.IsAlwaysPub.ToString();
             *
             * doc.DocumentElement.Attributes["stop_time"].Value = property.EndPubTime;
             *
             *
             * XmlNode tagNode = ContentDoc.SelectSingleNode("/content/tags");
             * WriteXmlTag(property.tag, tagNode);
             *
             * if (text != "")
             * {
             *   ///重新存储
             *   XmlNode textNode = ContentDoc.SelectSingleNode("/content/article_text");
             *   textNode.RemoveAll();
             *   XmlCDataSection xmlData = ContentDoc.CreateCDataSection(text);
             *   textNode.AppendChild(xmlData);
             * }*/
        }