Inheritance: Cocoa.Object
Esempio n. 1
0
        /// <summary>
        /// Navigate to the page in the history, by index.
        /// </summary>
        /// <param name="index">
        /// A <see cref="System.Int32"/> representing an absolute index in the
        /// history (that is, > -1 and < history length
        /// </param>
        public void Go(int index)
        {
            if (index < 0)
            {
                return;
            }


            webkit.WebBackForwardList history = webview.BackForwardList;
            int len = history.ForwardLength + history.BackLength + 1;

            if (index > len)
            {
                return;
            }
            webkit.WebHistoryItem item = history.GetNthItem(index);
            Gdk.Threads.Enter();
            webview.GoToBackForwardItem(item);
            Gdk.Threads.Leave();
        }
Esempio n. 2
0
 private void loadHistoryItem(WebHistoryItem item)
 {
     string url = item.URL;
     string content = "";
     Node n;
     try {
     content = help_tree.RenderUrl(url, out n);
     } catch (Exception e) {
     content = "Exception Rendering the requested URL: " + e;
     }
     if (content != null && !content.Equals("")) {
     content=content.Replace("a href='", "a href='http://monodoc/load?");
     content=content.Replace("a href=\"", "a href=\"http://monodoc/load?");
     webView.Render (content);
     }
 }