Пример #1
0
        // *** WEBVIEW ***

        public void navigate(string url, int index)
        {
            if (!isUIThread)
            {
                Dispatcher.BeginInvoke(delegate() { navigate(url, index); }); return;
            }
            RhodesWebBrowser.Navigate(new Uri(url));
        }
Пример #2
0
 public void Refresh(int index)
 {
     if (!isUIThread)
     {
         Dispatcher.BeginInvoke(delegate() { Refresh(index); }); return;
     }
     RhodesWebBrowser.Navigate(new Uri(RhodesWebBrowser.Source.AbsoluteUri, UriKind.Absolute));
     // another possible implementation: RhodesWebBrowser.InvokeScript("eval", "history.go()");
 }
Пример #3
0
        // *** WEBVIEW ***

        public void navigate(string url, int index)
        {
            if (!isUIThread)
            {
                Dispatcher.BeginInvoke(delegate() { navigate(url, index); }); return;
            }
            if (isDefaultBrowser())
            {
                RhodesWebBrowser.Navigate(new Uri(url));
            }
            else
            {
                ((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).Navigate(new Uri(url));
            }
        }
Пример #4
0
 public void Refresh(int index)
 {
     if (!isUIThread)
     {
         Dispatcher.BeginInvoke(delegate() { Refresh(index); }); return;
     }
     if (isDefaultBrowser())
     {
         RhodesWebBrowser.Navigate(new Uri(RhodesWebBrowser.Source.AbsoluteUri, UriKind.Absolute));
     }
     // another possible implementation: RhodesWebBrowser.InvokeScript("eval", "history.go()");
     else
     {
         ((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).Navigate(
             new Uri(((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).Source.AbsoluteUri, UriKind.Absolute));
     }
 }
Пример #5
0
        // *** WEBVIEW ***

        public void navigate(string url, int index)
        {
            if (!isUIThread)
            {
                Dispatcher.BeginInvoke(delegate() { navigate(url, index); }); return;
            }

            /*if(url.Contains("http://") == false)
             * {
             *  String appdir = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
             *  url = "file:///" + appdir.Replace(@"\", "/") +"/" + url;
             *
             * }*/

            if (_tabProps.Count == 0)
            {
                index = -1;
            }

            if (url == "")
            {
                return;
            }

            if (index == -1 && !_isBrowserInitialized)
            {
                initUri = url;
                return;
            }
            else if (index > -1 && _tabProps.ContainsKey(index) && _tabProps[index]._isInitialized == false)
            {
                _tabProps[index]._action = url;
                return;
            }

            if (TabbarPivot.Items.Count == 0)
            {
                RhodesWebBrowser.Navigate(new Uri(url, UriKind.RelativeOrAbsolute));
            }
            else
            {
                ((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).Navigate(new Uri(url, UriKind.RelativeOrAbsolute));
            }
        }
Пример #6
0
        // *** WEBVIEW ***

        public void navigate(string url, int index)
        {
            if (!isUIThread)
            {
                Dispatcher.BeginInvoke(delegate() { navigate(url, index); }); return;
            }

            if (_tabProps.Count == 0)
            {
                index = -1;
            }

            if (url == "")
            {
                return;
            }

            if (index == -1 && !_isBrowserInitialized)
            {
                initUri = url;
                return;
            }
            else if (index > -1 && _tabProps.ContainsKey(index) && _tabProps[index]._isInitialized == false)
            {
                _tabProps[index]._action = url;
                return;
            }

            if (TabbarPivot.Items.Count == 0)
            {
                RhodesWebBrowser.Navigate(new Uri(url, UriKind.RelativeOrAbsolute));
            }
            else
            {
                ((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).Navigate(new Uri(url, UriKind.RelativeOrAbsolute));
            }
        }