public OutlineDocumentToHtmlWriter(HtmlTextWriter htmlWriter, OutlineDocument document)
        {
            if (htmlWriter == null)
            {
                throw new ArgumentNullException(nameof(htmlWriter));
            }

            _htmlWriter = htmlWriter;
            _document   = document;
        }
        public OutlineDocumentToHtmlFileExporter(OutlineDocument document, string fileName)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            if (fileName == null)
            {
                throw new ArgumentNullException(nameof(fileName));
            }

            _document = document;

            _fileName = fileName;
        }
        private void WriteOutlineDocument(OutlineDocument document)
        {
            if (_isDisposed)
            {
                throw new ObjectDisposedException(nameof(OutlineDocumentToHtmlWriter));
            }

            _htmlWriter.RenderBeginTag(HtmlTextWriterTag.Html);
            _htmlWriter.RenderBeginTag(HtmlTextWriterTag.Head);
            _htmlWriter.RenderBeginTag(HtmlTextWriterTag.Title);
            _htmlWriter.RenderEndTag();
            _htmlWriter.RenderEndTag();
            _htmlWriter.RenderBeginTag(HtmlTextWriterTag.Body);
            _htmlWriter.AddAttribute(HtmlTextWriterAttribute.Class, "SimpleOutline_Outline");
            _htmlWriter.RenderBeginTag(HtmlTextWriterTag.Div);
            WriteOutlineRootItem(document.Items[0]);
            _htmlWriter.RenderEndTag();
            _htmlWriter.RenderEndTag();
            _htmlWriter.RenderEndTag();
            _htmlWriter.Flush();
        }
Exemple #4
0
 public void LoadNewDocument()
 {
     Document = new OutlineDocument();
 }
Exemple #5
0
 public void LoadDocument(string fileName)
 {
     Document = OutlineDocument.Load(fileName);
 }