Пример #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();
        }