Inheritance: DocumentRange
コード例 #1
0
ファイル: Browser.cs プロジェクト: neismit/emds
 public void Navigate(Link link)
 {
     Address target = link.Target;
     while (1 != 0)
     {
         if (target.Url != null)
         {
             this.Navigate(target.Url);
             return;
         }
         this.Navigate(target.Original);
         if (0 == 0)
         {
             return;
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// Called by loadContents to load a link on the page.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadLink(int index, Tag tag)
        {
            var link = new Link(_page);
            String href = tag.GetAttributeValue("href");

            if (href != null)
            {
                link.Target = new Address(_baseURL, href);
                link.Begin = index;
                link.End = FindEndTag(index + 1, tag);
                _page.AddContent(link);
            }
        }
コード例 #3
0
ファイル: Browser.cs プロジェクト: OperatorOverload/encog-cs
        /// <summary>
        /// Navigate to a new page based on a link.
        /// </summary>
        /// <param name="link">The link to navigate to.</param>
        public void Navigate(Link link)
        {
            Address address = link.Target;

            if (address.Url != null)
            {
                Navigate(address.Url);
            }
            else
            {
                Navigate(address.Original);
            }
        }
コード例 #4
0
ファイル: LoadWebPage.cs プロジェクト: neismit/emds
 protected void LoadLink(int index, Tag tag)
 {
     Link span = new Link(this._xbbe2f7d7c86e0379);
     string attributeValue = tag.GetAttributeValue("href");
     if (attributeValue != null)
     {
         span.Target = new Address(this._x1554c0f0264b8597, attributeValue);
         span.Begin = index;
         if ((((uint) index) + ((uint) index)) >= 0)
         {
             span.End = this.FindEndTag(index + 1, tag);
         }
         this._xbbe2f7d7c86e0379.AddContent(span);
     }
 }
コード例 #5
0
        /// <summary>
        /// Called by loadContents to load a link on the page.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadLink(int index, Tag tag)
        {
            Link link = new Link(this.page);
            String href = tag.GetAttributeValue("href");

            if (href != null)
            {
                link.setTarget(new Address(this.baseURL, href));
                link.Begin = index;
                link.End = FindEndTag(index + 1, tag);
                this.page.AddContent(link);
            }
        }