Ejemplo n.º 1
0
        public void Parse(string fileName, string textToParse, bool reparse, CodeBrowserControl codeBrowser)
        {
            this.codeBrowser = codeBrowser;

            HtmlDocument htmlDocument = (HtmlDocument)DocumentList.GetDocument(fileName);

            if (htmlDocument == null)
            {
                htmlDocument = new HtmlDocument(fileName, textToParse);
                DocumentList.AddDocument(htmlDocument);
            }
            else
            {
                if (reparse)
                {
                    codeBrowser.Clear();
                    htmlDocument.ClearStyleChilds();
                    htmlDocument.ParseDocument(textToParse);
                }
            }

            codeBrowser._tree.BeginUpdate();

            BuildTree(htmlDocument);
            codeBrowser._tree.ExpandAll();
            codeBrowser._tree.EndUpdate();
        }
Ejemplo n.º 2
0
        public CssDocument Parse(string fileName, string textToParse, bool reparse)
        {
            CssDocument cssDocument;

            if (fileName == "")
            {
                cssDocument = new CssDocument(fileName);
                cssDocument.ParseDocument(textToParse);
            }
            else
            {
                cssDocument = (CssDocument)DocumentList.GetDocument(fileName);
                if (cssDocument == null)
                {
                    cssDocument = new CssDocument(fileName);
                    cssDocument.ParseDocument(textToParse);
                    DocumentList.AddDocument(cssDocument);
                }
                else
                {
                    if (reparse)
                    {
                        codeBrowser.Clear();
                        cssDocument.ParseDocument(textToParse);
                    }
                }
            }

            return(cssDocument);
        }
Ejemplo n.º 3
0
        public void ExecutePattern()
        {
            DocumentList d = new DocumentList();
            d.Add(new TextDocument());
            d.Add(new TextDocument());
            d.Add(new XMLDocument());
            d.Add(new XMLDocument());

            d.GetDocument();
        }