Exemple #1
0
 private void AWebBrowserwebview1_NavigationStarting1(WebView sender, WebViewNavigationStartingEventArgs args)
 {
     if (sendthere12)
     {
         args.Cancel = true;
         //AWebBrowserwebview2.Navigate(args.Uri);
         string             ua        = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)" + "AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25";
         Uri                targetUri = (args.Uri);
         HttpRequestMessage hrm       = new HttpRequestMessage(HttpMethod.Get, targetUri);
         hrm.Headers.Add("User-Agent", ua);
         AWebBrowserwebview2.NavigateWithHttpRequestMessage(hrm);
     }
     else
     {
         if (!stupidWebviewLatch)
         {
             stupidWebviewLatch = true;
             args.Cancel        = true;
             //AWebBrowserwebview2.Navigate(args.Uri);
             string             ua        = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)" + "AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25";
             Uri                targetUri = (args.Uri);
             HttpRequestMessage hrm       = new HttpRequestMessage(HttpMethod.Get, targetUri);
             hrm.Headers.Add("User-Agent", ua);
             try
             {
                 AWebBrowserwebview1.NavigateWithHttpRequestMessage(hrm);
             }
             catch { }
         }
         else
         {
             stupidWebviewLatch = false;
         }
     }
 }
Exemple #2
0
 private void AWebBrowserwebview2_NavigationStarting2(WebView sender, WebViewNavigationStartingEventArgs args)
 {
     if (check3)
     {
         args.Cancel = true;
         AWebBrowserwebview23.Navigate(args.Uri);//change from = to ( ) if can do
         string             ua        = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)" + "AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25";
         Uri                targetUri = (args.Uri);
         HttpRequestMessage hrm       = new HttpRequestMessage(HttpMethod.Get, targetUri);
         hrm.Headers.Add("User-Agent", ua);
         AWebBrowserwebview23.NavigateWithHttpRequestMessage(hrm);
     }
     else
     {
         if (stupidWebviewLatch2)
         {
             stupidWebviewLatch2 = true;
             args.Cancel         = true;
             //AWebBrowserwebview2.Navigate(args.Uri);
             string             ua        = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)" + "AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25";
             Uri                targetUri = (args.Uri);
             HttpRequestMessage hrm       = new HttpRequestMessage(HttpMethod.Get, targetUri);
             hrm.Headers.Add("User-Agent", ua);
             AWebBrowserwebview2.NavigateWithHttpRequestMessage(hrm);
         }
         else
         {
             stupidWebviewLatch2 = false; //modifier touch move URL from webview 1 to webview 2. press button in corner with one hand, then second
             //so position one is: suppose bottom left modifier area. press and hold or modify/check. then. 2nd part of gesture is
             //timeing could be used to make this gesture a one-pointer gesture. click, click, click....
             //anyhow the gesture is one fing on button hold, release when 2nd gesture done. when 2nd gesture is drag from one window to the next
             //the url will transfer from the first iwndow to the second
             //bot left tap + right-hand (these are right-handed gestures i suppose) "drag drop" url from one window to the next.
             //if no second window a new window can be created. sizez not determied and dynamic C# code generation fo the xaml and yeah, yeah, , ..., not ready
         }
     }
 }