Ejemplo n.º 1
0
        public static HTMLCompareResult HTMLDocumentCompare(HtmlDocument _oldWebPage, HtmlDocument _newWebPage)
        {
            HTMLCompareResult result;

            if (_oldWebPage.DocumentNode != _newWebPage.DocumentNode)
            {
                result = new HTMLCompareResult(HistoryItemType.WebHasChanges, "something on website changes");
                // HistoryChange(this, myArgs);
            }
            else
            {
                result = new HTMLCompareResult(HistoryItemType.NothingChanges, "no changes on website ");
                // HistoryChange(this, myArgs);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static HTMLCompareResult HTMLNodeCompare(HtmlNode _oldNode, HtmlNode _newNode)
        {
            HTMLCompareResult result;

            if (_oldNode != null || _newNode != null)
            {
                if (_oldNode.OuterHtml != _newNode.OuterHtml)
                {
                    result = new HTMLCompareResult(HistoryItemType.WebHasChanges, "something on website changes");
                    // HistoryChange(this, myArgs);
                }
                else
                {
                    result = new HTMLCompareResult(HistoryItemType.NothingChanges, "no changes on website ");
                    // HistoryChange(this, myArgs);
                }
            }
            else
            {
                result = new HTMLCompareResult(HistoryItemType.Error, "cant find element on Website");
                // HistoryChange(this, myArgs);
            }
            return(result);
        }