예제 #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();
        }
예제 #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);
        }
예제 #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();
        }